Switch to 4 workers for Playwright tests; does this cause flakiness?#3420
Draft
kdaviduik wants to merge 4 commits intokd-gift-cards-e2efrom
Draft
Switch to 4 workers for Playwright tests; does this cause flakiness?#3420kdaviduik wants to merge 4 commits intokd-gift-cards-e2efrom
kdaviduik wants to merge 4 commits intokd-gift-cards-e2efrom
Conversation
Add infrastructure for securely loading test secrets from secrets.ejson
using EJSON encryption. This enables E2E tests to use real gift card codes
without hardcoding them in test files.
Example usage in an E2E test file:
```typescript
import {getRequiredSecret} from '../../fixtures/test-secrets';
const GIFT_CARD_CODE_1 = getRequiredSecret('gift_card_code_1');
const GIFT_CARD_CODE_2 = getRequiredSecret('gift_card_code_2');
```
How it works:
- Secrets stored encrypted in secrets.ejson under `e2e-testing` section
- Local dev: Uses ejson keydir at /opt/ejson/keys (standard convention)
- CI: Uses EJSON_PRIVATE_KEY env var passed via --key-from-stdin
- Single code path for both environments
Security considerations:
- Uses execFileSync (not execSync) to prevent shell injection
- Private key passed via stdin, never on command line or disk
- Secrets decrypted in-memory, never written to files
Add comprehensive E2E tests for gift card functionality in the Hydrogen skeleton template. This validates that gift cards can be applied, removed, and persisted across page reloads. Tests use the hydrogenPreviewStorefront store with encrypted gift card codes stored in secrets.ejson. The test suite includes: - Core functionality: apply/remove single and multiple gift cards, persistence across reload - Edge cases: duplicate codes, case-insensitivity, invalid codes, empty/whitespace handling Implementation follows deep module pattern with gift card helpers in StorefrontPage fixture. Uses 3-phase waiting (response → input clear → element visible) to prevent race conditions.
6 tasks
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
2e3c7b2 to
d7e2cc3
Compare
d7e2cc3 to
ba7a43d
Compare
cbc0f22 to
705a2ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
HOW to test your changes?
Post-merge steps
Checklist