Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unnecessary/brittle IT test checks #417

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {"));
}

}
Loading