Remove backendHost

This commit is contained in:
roschaefer 2019-12-03 02:35:27 +01:00
parent 825ad6d266
commit b7e36345b9
2 changed files with 4 additions and 5 deletions

View File

@ -18,8 +18,8 @@ import helpers from "./helpers";
import users from "../fixtures/users.json";
import { GraphQLClient, request } from 'graphql-request'
import { gql } from '../../backend/src/helpers/jest'
import { GRAPHQL_URI } from '../../backend/src/config'
const backendHost = Cypress.env('BACKEND_HOST')
const switchLang = name => {
cy.get(".locale-menu").click();
cy.contains(".locale-menu-popover a", name).click();
@ -31,7 +31,7 @@ const authenticatedHeaders = async (variables) => {
login(email: $email, password: $password)
}
`
const response = await request(backendHost, mutation, variables)
const response = await request(GRAPHQL_URI, mutation, variables)
return { authorization: `Bearer ${response.login}` }
}
@ -101,7 +101,7 @@ Cypress.Commands.add(
async ({email, password}) => {
const headers = await authenticatedHeaders({ email, password })
console.log(headers)
return new GraphQLClient(backendHost, { headers })
return new GraphQLClient(GRAPHQL_URI, { headers })
}
)

View File

@ -2,10 +2,9 @@ import Factory from '../../backend/src/seed/factories'
import { getDriver, getNeode } from '../../backend/src/bootstrap/neo4j'
import neode from 'neode'
const backendHost = Cypress.env('SEED_SERVER_HOST')
const neo4jDriver = getDriver()
const neodeInstance = getNeode()
const factoryOptions = { seedServerHost: backendHost, neo4jDriver, neodeInstance }
const factoryOptions = { neo4jDriver, neodeInstance }
const factory = Factory(factoryOptions)
beforeEach(async () => {