Skip to content

Commit

Permalink
refactor: pass all args to test-e2e script
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjoeio committed Apr 15, 2021
1 parent d6f0725 commit 450fcd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ci/dev/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
cd test
PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 yarn folio --config=config.ts --reporter=list
# We set these environment variables because they're used in the e2e tests
# they don't have to be these values, but these are the defaults
PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 yarn folio --config=config.ts --reporter=list "$@"
}

main "$@"
6 changes: 4 additions & 2 deletions test/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const cookieToStore = {
}

globalSetup(async () => {
console.log("\n🚨 Running Global Setup for Jest End-to-End Tests")
console.log("\n🚨 Running globalSetup for playwright end-to-end tests")
console.log("👋 Please hang tight...")

if (process.env.WTF_NODE) {
Expand All @@ -45,7 +45,7 @@ globalSetup(async () => {
// Save storage state and store as an env variable
// More info: https://playwright.dev/docs/auth?_highlight=authe#reuse-authentication-state
process.env.STORAGE = JSON.stringify(storage)
console.log("✅ Global Setup for Jest End-to-End Tests is now complete.")
console.log("✅ globalSetup is now complete.")
})

const config: Config = {
Expand All @@ -55,6 +55,8 @@ const config: Config = {
}

if (process.env.CI) {
// In CI, retry failing tests 2 times
// in the event of flakiness
config.retries = 2
}

Expand Down

0 comments on commit 450fcd5

Please sign in to comment.