diff --git a/cypress/cypress.config.js b/cypress/cypress.config.js index 83507ff92..e8bb04bbb 100644 --- a/cypress/cypress.config.js +++ b/cypress/cypress.config.js @@ -2,11 +2,6 @@ const { defineConfig } = require("cypress"); const browserify = require("@badeball/cypress-cucumber-preprocessor/browserify"); const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor"); -const dotenv = require('dotenv'); - -// Import backend .env (smart)? -const { parsed } = dotenv.config({ path: require.resolve('../backend/.env') }); - // Test persistent(between commands) store const testStore = {} @@ -15,11 +10,6 @@ async function setupNodeEvents(on, config) { on("file:preprocessor", browserify.default(config)); - config.env.NEO4J_URI = parsed.NEO4J_URI - config.env.NEO4J_USERNAME = parsed.NEO4J_USERNAME - config.env.NEO4J_PASSWORD = parsed.NEO4J_PASSWORD - config.env.JWT_SECRET = parsed.JWT_SECRET - on("task", { pushValue({ name, value }) { testStore[name] = value diff --git a/cypress/support/factories.js b/cypress/support/factories.js index 2ca46c483..a8cd2d863 100644 --- a/cypress/support/factories.js +++ b/cypress/support/factories.js @@ -1,13 +1,7 @@ import Factory from '../../backend/src/db/factories' import { getNeode } from '../../backend/src/db/neo4j' - -const neo4jConfigs = { - uri: Cypress.env('NEO4J_URI'), - username: Cypress.env('NEO4J_USERNAME'), - password: Cypress.env('NEO4J_PASSWORD') -} -const neodeInstance = getNeode(neo4jConfigs) +const neodeInstance = getNeode() beforeEach(() => cy.then(() => neodeInstance.cypher('MATCH (everything) DETACH DELETE everything;')))