Skip to content

Commit

Permalink
update cypress (#3736)
Browse files Browse the repository at this point in the history
* update cypress

* revert ide updates

* Update package.json

* update prettier

* test fail case

* update snapshot path

* revert fails

* Update package.json

* update imge path

* update typo
  • Loading branch information
dpatil-magento committed Mar 22, 2022
1 parent 7840231 commit f145f1d
Show file tree
Hide file tree
Showing 97 changed files with 33 additions and 12 deletions.
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.

0 comments on commit f145f1d

Please sign in to comment.