Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cypress #3736

Merged
merged 11 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion venia-integration-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
.DS_Store
.idea
/src/snapshots/integrationTests/pageBuilder/**/__diff_output__/
/src/snapshots/snapshotTests/**/**/__diff_output__/
cypress/results/*
cypress-test-results.json
2 changes: 2 additions & 0 deletions venia-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"posttest:headless": "./report-results.js",
"test": "cypress open --browser chrome --config-file cypress.config.json",
"test:ci": "./run-tests.js -t 4",
"test:ci:functional": "FunctionalTests=true ./run-tests.js -t 6",
"test:ci:snapshot": "SanpshotTests=true ./run-tests.js -t 4",
"test:debug": "node --inspect-brk ./node_modules/cypress/bin/cypress run --browser chrome --config-file cypress.config.json",
"test:devTest": "jest",
"test:firefox": "cypress open --browser firefox --config-file cypress.config.json",
Expand Down
21 changes: 20 additions & 1 deletion venia-integration-tests/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,26 @@ if (!baseUrl) {
process.exit(1);
}

const files = spec ? spec.split(',') : glob.sync('./src/tests/**/*.spec.js');
let files = null;

if (process.env.FunctionalTests) {
files = spec
? spec.split(',')
: glob.sync('./src/tests/**/*.spec.js', {
ignore: ['./src/tests/snapshotTests/**/*']
});
} else if (process.env.SanpshotTests) {
files = spec
? spec.split(',')
: glob.sync('./src/tests/**/*.spec.js', {
ignore: [
'./src/tests/e2eTests/**/*',
'./src/tests/integrationTests/**/*'
]
});
} else {
files = spec ? spec.split(',') : glob.sync('./src/tests/**/*.spec.js');
}

const threadCount = Math.min(files.length, threads);
const testsPerRun = files.length / threadCount;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.