diff --git a/venia-integration-tests/.gitignore b/venia-integration-tests/.gitignore index 6734ca58b7..e7faec723b 100644 --- a/venia-integration-tests/.gitignore +++ b/venia-integration-tests/.gitignore @@ -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 diff --git a/venia-integration-tests/package.json b/venia-integration-tests/package.json index c3f95862d8..03052ace57 100644 --- a/venia-integration-tests/package.json +++ b/venia-integration-tests/package.json @@ -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", diff --git a/venia-integration-tests/run-tests.js b/venia-integration-tests/run-tests.js index 92a263d358..1c65f1b7fa 100755 --- a/venia-integration-tests/run-tests.js +++ b/venia-integration-tests/run-tests.js @@ -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; diff --git a/venia-integration-tests/src/fixtures/pageBuilder/banner/banner6.json b/venia-integration-tests/src/fixtures/pageBuilder/banner/banner6.json index 2b21b7f9cb..2b0c6142d9 100644 --- a/venia-integration-tests/src/fixtures/pageBuilder/banner/banner6.json +++ b/venia-integration-tests/src/fixtures/pageBuilder/banner/banner6.json @@ -2,7 +2,7 @@ "data": { "cmsPage": { "url_key": "home", - "content": "

All Default Alignments should be Center from Row<\/h2>

Poster Alignment Tests<\/h3>

Default Alignment<\/p>

Left<\/p>

Center<\/p>

Right<\/p><\/div>