-
Notifications
You must be signed in to change notification settings - Fork 0
Gate E2E tests behind APPLESCRIPT_E2E flag; auto-skip in CI #10
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -109,8 +109,16 @@ const ALL_APPS = [ | |||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // ─── Test suite ─────────────────────────────────────────────────────────────── | ||||||||||||||||||||||||||||
| // These tests require macOS with Automation permissions and real apps running. | ||||||||||||||||||||||||||||
| // Gate behind APPLESCRIPT_E2E=1 and skip automatically in CI. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| describe("E2E app tests", () => { | ||||||||||||||||||||||||||||
| const skipReason: string | undefined = process.env.CI | ||||||||||||||||||||||||||||
| ? "Skipped in CI environment (set APPLESCRIPT_E2E=1 and unset CI to run)" | ||||||||||||||||||||||||||||
| : !process.env.APPLESCRIPT_E2E | ||||||||||||||||||||||||||||
| ? "Set APPLESCRIPT_E2E=1 to run E2E tests locally" | ||||||||||||||||||||||||||||
| : undefined; | ||||||||||||||||||||||||||||
|
Comment on lines
+115
to
+119
|
||||||||||||||||||||||||||||
| const skipReason: string | undefined = process.env.CI | |
| ? "Skipped in CI environment (set APPLESCRIPT_E2E=1 and unset CI to run)" | |
| : !process.env.APPLESCRIPT_E2E | |
| ? "Set APPLESCRIPT_E2E=1 to run E2E tests locally" | |
| : undefined; | |
| const skipReason: string | undefined = | |
| process.platform !== "darwin" | |
| ? "AppleScript E2E tests require macOS (process.platform !== 'darwin')" | |
| : process.env.CI | |
| ? "Skipped in CI environment (set APPLESCRIPT_E2E=1 and unset CI to run)" | |
| : !process.env.APPLESCRIPT_E2E | |
| ? "Set APPLESCRIPT_E2E=1 to run E2E tests locally" | |
| : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gate is documented as
APPLESCRIPT_E2E=1, but the check uses truthiness (!process.env.APPLESCRIPT_E2E). Values likeAPPLESCRIPT_E2E=0are truthy and would incorrectly enable these tests. Consider checking explicitly for the expected value (e.g.,process.env.APPLESCRIPT_E2E === "1") so the flag behaves as documented.