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

chore: Ignore Applitools by default when running Cypress tests #20789

Merged
merged 4 commits into from
Jul 26, 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
11 changes: 8 additions & 3 deletions .github/workflows/bashlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ cypress-run-all() {
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

cypress-run "*/**/!(*.applitools.test.ts)"
cypress-run "*/**/*"

# After job is done, print out Flask log for debugging
say "::group::Flask log for default run"
Expand All @@ -198,7 +198,7 @@ cypress-run-all() {
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

cypress-run "sqllab/!(*.applitools.test.ts)" "Backend persist"
cypress-run "sqllab/*" "Backend persist"

# Upload code coverage separately so each page can have separate flags
# -c will clean existing coverage reports, -F means add flags
Expand All @@ -220,14 +220,19 @@ eyes-storybook-dependencies() {
}

cypress-run-applitools() {
cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"

local flasklog="${HOME}/flask.log"
local port=8081
local cypress="./node_modules/.bin/cypress run"
local browser=${CYPRESS_BROWSER:-chrome}

export CYPRESS_BASE_URL="http://localhost:${port}"

nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

cypress-run "*/**/*.applitools.test.ts"
$cypress --spec "cypress/integration/*/**/*.applitools.test.ts" --browser "$browser" --headless --config ignoreTestFiles="[]"

codecov -c -F "cypress" || true

Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/cypress-base/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"numTestsKeptInMemory": 0,
"experimentalFetchPolyfill": true,
"requestTimeout": 10000,
"ignoreTestFiles": ["**/!(*.test.js|*.test.ts)"],
"ignoreTestFiles": ["**/!(*.test.js|*.test.ts)", "*.applitools.test.ts"],
"video": false,
"videoUploadOnPasses": false,
"viewportWidth": 1280,
Expand Down