forked from nih-sparc/sparc-app-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
43 lines (42 loc) · 1.9 KB
/
cypress.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { defineConfig } from "cypress";
import dynamicConfig from './tests/cypress/support/dynamicConfig.js'
export default defineConfig({
defaultCommandTimeout: 5000,
experimentalMemoryManagement: true,
numTestsKeptInMemory: 0,
retries: 2,
e2e: {
baseUrl: process.env.ROOT_URL ? process.env.ROOT_URL : 'http://localhost:3000',
blockHosts: ["*google-analytics.com"],
experimentalStudio: true,
projectId: process.env.CYPRESS_PROJECT_ID,
specPattern: "tests/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
supportFile: "tests/cypress/support/e2e.js",
viewportWidth: 1600,
viewportHeight: 900,
//Prevent huge amount of time on reloading page
testIsolation: true,
// pageLoadTimeout: 1024*1024*1024,
setupNodeEvents(on, config) {
return dynamicConfig(config)
},
env: {
PORTAL_API: process.env.PORTAL_API_HOST ? process.env.PORTAL_API_HOST : 'https://sparc-api.herokuapp.com',
// databrowser.js
PAGE_LIMIT: process.env.PAGE_LIMIT ? process.env.PAGE_LIMIT : '20',
SEARCH_KEYWORDS: process.env.SEARCH_KEYWORDS ? process.env.SEARCH_KEYWORDS : 'Spine, Neck',
FILTER_FACETS: process.env.FILTER_FACETS ? process.env.FILTER_FACETS : 'Human, Heart',
// datasets.js
DATASET_IDS: process.env.DATASET_IDS ? process.env.DATASET_IDS : '54, 76, 117, 226, 385',
// mapsviewer.js
TAXON_MODELS: process.env.TAXON_MODELS ? process.env.TAXON_MODELS : 'Rat, Pig',
THREE_SYNC_VIEW: process.env.THREE_SYNC_VIEW ? process.env.THREE_SYNC_VIEW : 'Human Male',
SEARCH_IN_MAP: process.env.SEARCH_IN_MAP ? process.env.SEARCH_IN_MAP : 'Heart',
SCAFFOLD_DATASET_IDS: process.env.SCAFFOLD_DATASET_IDS ? process.env.SCAFFOLD_DATASET_IDS : '150, 155',
}
},
fixturesFolder: "tests/cypress/fixtures",
screenshotsFolder: "tests/cypress/screenshots",
videosFolder: "tests/cypress/videos",
downloadsFolder: "tests/cypress/downloads",
});