-
Notifications
You must be signed in to change notification settings - Fork 2
/
cypress.config.ts
56 lines (51 loc) · 1.53 KB
/
cypress.config.ts
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
44
45
46
47
48
49
50
51
52
53
54
55
56
import { verifyDownloadTasks } from 'cy-verify-downloads'
import { defineConfig } from 'cypress'
const { lighthouse, prepareAudit } = require("@cypress-audit/lighthouse")
const fs = require('fs-extra')
const xlsx = require('xlsx')
export default defineConfig({
env: { parseSpecialCharSequences: false },
chromeWebSecurity: false,
pageLoadTimeout: 100000,
defaultCommandTimeout: 50000,
video: false,
trashAssetsBeforeRuns: true,
viewportWidth: 1300,
viewportHeight: 800,
watchForFileChanges: false,
numTestsKeptInMemory: 1,
reporter: 'mochawesome',
reporterOptions: {
reportDir: 'cypress/results',
overwrite: false,
html: false,
timestamp: 'mmddyyyy_HHMMss',
json: true,
inline: true,
},
retries: {
runMode: 2,
openMode: 0,
},
screenshotsFolder: 'mochawesome-report/assets',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
on("before:browser:launch", (browser = Cypress.browser, launchOptions) => {
prepareAudit(launchOptions);
})
on('task', verifyDownloadTasks)
on('task', {
readXlsx({file, sheet}) {
const buf = fs.readFileSync(file);
const workbook = xlsx.read(buf, {type:'buffer'})
const rows = xlsx.utils.sheet_to_json(workbook.Sheets[sheet])
return rows
}
})
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'https://dev-madie.hcqis.org',
},
})