Remove gql tag of cypress code.

This commit is contained in:
elweyn 2023-03-03 20:40:16 +01:00
parent 3a5349c547
commit a09960aa54
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,4 @@
import { Given } from "cypress-cucumber-preprocessor/steps"; import { Given } from "cypress-cucumber-preprocessor/steps";
import gql from 'graphql-tag'
Given('somebody reported the following posts:', table => { Given('somebody reported the following posts:', table => {
table.hashes().forEach(({ submitterEmail, resourceId, reasonCategory, reasonDescription }) => { table.hashes().forEach(({ submitterEmail, resourceId, reasonCategory, reasonDescription }) => {
@ -10,7 +9,7 @@ Given('somebody reported the following posts:', table => {
cy.factory() cy.factory()
.build('user', {}, submitter) .build('user', {}, submitter)
.authenticateAs(submitter) .authenticateAs(submitter)
.mutate(gql`mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) { .mutate(`mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
fileReport(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) { fileReport(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) {
reportId reportId
} }

View File

@ -15,11 +15,10 @@
/* globals Cypress cy */ /* globals Cypress cy */
import "cypress-file-upload"; import "cypress-file-upload";
import { GraphQLClient, request } from 'graphql-request' import { GraphQLClient, request } from 'graphql-request'
import gql from 'graphql-tag'
import config from '../../backend/src/config' import config from '../../backend/src/config'
const authenticatedHeaders = (variables) => { const authenticatedHeaders = (variables) => {
const mutation = gql` const mutation = `
mutation($email: String!, $password: String!) { mutation($email: String!, $password: String!) {
login(email: $email, password: $password) login(email: $email, password: $password)
} }