forked from verdnatura/salix-front
fix: refs #6695 update Cypress configuration and test result paths
This commit is contained in:
parent
aa6ec5d6b1
commit
9ac6db2c5d
|
@ -31,6 +31,7 @@ yarn-error.log*
|
|||
# Cypress directories and files
|
||||
/test/cypress/videos
|
||||
/test/cypress/screenshots
|
||||
/junit
|
||||
|
||||
# VitePress directories and files
|
||||
/docs/.vitepress/cache
|
||||
|
|
|
@ -116,7 +116,7 @@ pipeline {
|
|||
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
|
||||
sh 'cypress run'
|
||||
sh 'cypress run --browser chromium || true'
|
||||
// sh '''
|
||||
// find test/cypress/integration -name "*.spec.js" | xargs -n 1 -P 2 -I {} sh -c "xvfb-run -a cypress run --headless --browser chromium --spec '{}'"
|
||||
// wait
|
||||
|
@ -128,7 +128,7 @@ pipeline {
|
|||
always {
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} down -v"
|
||||
junit(
|
||||
testResults: 'test/cypress/results/junit-*.xml',
|
||||
testResults: 'junit/e2e-*.xml',
|
||||
allowEmptyResults: true
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { defineConfig } from 'cypress';
|
||||
|
||||
let urlHost, reporter, reporterOptions;
|
||||
let urlHost, reporter, reporterOptions, defaultCommandTimeout;
|
||||
|
||||
if (process.env.CI) {
|
||||
urlHost = 'front';
|
||||
|
@ -8,7 +8,7 @@ if (process.env.CI) {
|
|||
reporterOptions = {
|
||||
reporterEnabled: 'mocha-junit-reporter, mochawesome',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
mochaFile: 'test/cypress/results/junit-[hash].xml',
|
||||
mochaFile: 'junit/e2e-[hash].xml',
|
||||
},
|
||||
mochawesomeReporterOptions: {
|
||||
reportDir: 'test/cypress/results',
|
||||
|
@ -17,6 +17,7 @@ if (process.env.CI) {
|
|||
json: false,
|
||||
},
|
||||
};
|
||||
defaultCommandTimeout = 30000;
|
||||
} else {
|
||||
urlHost = 'localhost';
|
||||
reporter = 'cypress-mochawesome-reporter';
|
||||
|
@ -28,13 +29,14 @@ if (process.env.CI) {
|
|||
reportDir: 'test/cypress/reports',
|
||||
inlineAssets: true,
|
||||
};
|
||||
defaultCommandTimeout = 10000;
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
baseUrl: `http://${urlHost}:9000`,
|
||||
experimentalStudio: false,
|
||||
defaultCommandTimeout: 10000,
|
||||
defaultCommandTimeout,
|
||||
trashAssetsBeforeRuns: false,
|
||||
requestTimeout: 10000,
|
||||
responseTimeout: 30000,
|
||||
|
@ -59,7 +61,6 @@ export default defineConfig({
|
|||
viewportWidth: 1280,
|
||||
viewportHeight: 720,
|
||||
},
|
||||
experimentalMemoryManagement: true,
|
||||
defaultCommandTimeout: 10000,
|
||||
defaultCommandTimeout,
|
||||
numTestsKeptInMemory: 0,
|
||||
});
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"eslint-plugin-cypress": "^4.1.0",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"husky": "^8.0.0",
|
||||
"mocha": "^11.1.0",
|
||||
"mocha-junit-reporter": "^2.2.1",
|
||||
"mocha-multi-reporters": "^1.5.1",
|
||||
"mochawesome": "^7.1.3",
|
||||
|
|
|
@ -91,6 +91,9 @@ devDependencies:
|
|||
husky:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.3
|
||||
mocha:
|
||||
specifier: ^11.1.0
|
||||
version: 11.1.0
|
||||
mocha-junit-reporter:
|
||||
specifier: ^2.2.1
|
||||
version: 2.2.1(mocha@11.1.0)
|
||||
|
|
Loading…
Reference in New Issue