36 lines
844 B
JavaScript
36 lines
844 B
JavaScript
import { defineConfig } from 'cypress';
|
|
import fs from 'fs';
|
|
import { isFileExist, findFiles } from 'cy-verify-downloads';
|
|
export default defineConfig({
|
|
projectId: '2ckppp',
|
|
viewportWidth: 1440,
|
|
viewportHeight: 768,
|
|
snapshotFileName: './cypress/snapshots.js',
|
|
defaultCommandTimeout: 5000,
|
|
requestTimeout: 5000,
|
|
retries: {
|
|
runMode: 2,
|
|
openMode: 0
|
|
},
|
|
e2e: {
|
|
setupNodeEvents(on, config) {
|
|
on('task', {
|
|
isFileExist,
|
|
findFiles,
|
|
deleteFile(path) {
|
|
fs.rmSync(path);
|
|
return null;
|
|
},
|
|
readFileMaybe(filename) {
|
|
if (fs.existsSync(filename)) {
|
|
return fs.readFileSync(filename, 'utf8');
|
|
}
|
|
return null;
|
|
}
|
|
});
|
|
},
|
|
baseUrl: 'http://localhost:3000',
|
|
specPattern: 'cypress/e2e/**/*.spec.ts'
|
|
}
|
|
});
|