Skip to content

Commit

Permalink
Removed unnecessary/brittle IT test checks (#417)
Browse files Browse the repository at this point in the history
Remove checking for error message values as these can change over time.
  • Loading branch information
davidjgonzalez authored Aug 8, 2023
1 parent dc43e10 commit 3509656
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ private static AEMHeadlessClient getHeadlessClient(InstanceConfiguration instanc

@Test
public void testQuery() {

String query = "{\n" + //
" articleList{\n" + //
" items{ \n" + //
Expand Down Expand Up @@ -110,9 +109,7 @@ public void testQuery() {

@Test
public void testQueryWithSyntaxError() {

thrown.expect(AEMHeadlessClientException.class);
thrown.expectMessage("Invalid Syntax : offending token");

String query = "{\n" + //
" articleList{\n" + //
Expand All @@ -125,13 +122,10 @@ public void testQueryWithSyntaxError() {

@Test
public void testQueryWithErrorResponse() {

thrown.expect(AEMHeadlessClientException.class);
thrown.expectMessage("Field 'nonExisting' in type 'QueryType' is undefined");

String query = "{ nonExisting { items{ _path } } }";
headlessClientAuthor.runQuery(query);

}

@Test
Expand Down Expand Up @@ -182,7 +176,6 @@ public void testQueryWithParameters() {

@Test
public void testPersistedQuery() {

GraphQlResponse response = headlessClientAuthor.runPersistedQuery("/wknd-shared/adventures-all");
assertNull(response.getErrors());
JsonNode responseData = response.getData();
Expand All @@ -204,7 +197,6 @@ public void testPersistedQuery() {

@Test
public void testListPersistedQueries() {

List<PersistedQuery> listPersistedQueries = headlessClientAuthor.listPersistedQueries("wknd-shared");

assertFalse(listPersistedQueries.isEmpty());
Expand All @@ -213,5 +205,4 @@ public void testListPersistedQueries() {
assertEquals("/wknd-shared/settings/graphql/persistentQueries/adventures-all", adventuresQuery.getLongPath());
assertThat(adventuresQuery.getQuery(), containsString("adventureList {"));
}

}

0 comments on commit 3509656

Please sign in to comment.