From b41f340ad6b7f7d3b26a81de0ce78fa85ba7b597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 10 Oct 2019 08:15:17 +0200 Subject: [PATCH] Fix Cypher test by correcting syntax of GraphQL report mutation --- backend/src/schema/resolvers/reports.spec.js | 2 +- cypress/integration/common/report.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/schema/resolvers/reports.spec.js b/backend/src/schema/resolvers/reports.spec.js index ed459df17..4b0aa7ba4 100644 --- a/backend/src/schema/resolvers/reports.spec.js +++ b/backend/src/schema/resolvers/reports.spec.js @@ -50,7 +50,7 @@ describe('report', () => { // because of the template `${returnedObject}` the 'gql' tag from 'jest/helpers' is not working here reportMutation = ` mutation($resourceId: ID!, $reasonCategory: String!, $reasonDescription: String!) { - report( resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) ${returnedObject} + report(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) ${returnedObject} } ` client = new GraphQLClient(host, { diff --git a/cypress/integration/common/report.js b/cypress/integration/common/report.js index 7688b51c3..907c3d5eb 100644 --- a/cypress/integration/common/report.js +++ b/cypress/integration/common/report.js @@ -127,7 +127,7 @@ Given('somebody reported the following posts:', table => { cy.factory() .create('User', submitter) .authenticateAs(submitter) - .mutate(`mutation(resourceId: ID!, reasonCategory: String!, reasonDescription: String!) { + .mutate(`mutation($resourceId: ID!, $reasonCategory: String!, $reasonDescription: String!) { report(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) { id }