mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
drop usage of environment variables for neo4j in cypress:
- the default values in backend's neo4j.js are used
This commit is contained in:
parent
74a054e2b4
commit
b308b290aa
@ -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
|
||||
|
||||
@ -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;')))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user