Skip to content

Commit 450fcd5

Browse files
committed
refactor: pass all args to test-e2e script
1 parent d6f0725 commit 450fcd5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ci/dev/test-e2e.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ set -euo pipefail
44
main() {
55
cd "$(dirname "$0")/../.."
66
cd test
7-
PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 yarn folio --config=config.ts --reporter=list
7+
# We set these environment variables because they're used in the e2e tests
8+
# they don't have to be these values, but these are the defaults
9+
PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 yarn folio --config=config.ts --reporter=list "$@"
810
}
911

1012
main "$@"

test/config.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const cookieToStore = {
3131
}
3232

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

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

5151
const config: Config = {
@@ -55,6 +55,8 @@ const config: Config = {
5555
}
5656

5757
if (process.env.CI) {
58+
// In CI, retry failing tests 2 times
59+
// in the event of flakiness
5860
config.retries = 2
5961
}
6062

0 commit comments

Comments
 (0)