mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Remove backendHost
This commit is contained in:
parent
825ad6d266
commit
b7e36345b9
@ -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 })
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -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 () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user