Conversation
This commit adds a comprehensive E2E test suite for the 'Close and Pause' flow, fixes a bug in the storage layer for per-tab session state isolation, and introduces a GitHub Actions workflow for automated testing. - Implement Close-flow.spec.ts with cancel and snooze cases - Fix BrowserStorage.ts to use per-tab storage for session state - Refactor extension verification into a Playwright setup project - Add .github/workflows/e2e-tests.yml using xvfb for headful extension support - Support dynamic headless mode via environment variables
- Add new E2E test for complete sleep on it workflow - Verify product appears in popup after setting 1 minute reminder - Test product transition from sleeping to achievements after expiry - Add test-config.ts for centralized product ID management - Verify all required UI elements: savings, price, name, reminder time
- Implement pause menu with options (For this page, For 1 hour, For 24 hours, Until I unmute) - Update product page state management to handle snooze - Fix E2E tests and linting errors
- Enable headless mode for stability in CI environments - Add Chrome flags for CI compatibility (no-sandbox, disable-setuid-sandbox) - Add 60s timeout to handle slower CI environments - Implement proper cleanup with force kill fallback to prevent hangs
- Navigate to Amazon product page instead of chrome://extensions - Check for plasmo-csui element to verify extension loaded - Fixes net::ERR_INVALID_URL error in headless CI environment
- Add script to generate dev artifacts without running a watch server - Update CI workflow to use - Fix to verify extension load on a real Amazon page instead of - Configure headless mode correctly (true in CI, false locally)
- Introduce page object pattern (OverlayPage, PopupPage, ExtensionHelper) - Add test utilities for storage, product, extension, and error handling - Refactor all e2e test specs to use new architecture - Add Playwright fixtures for consistent test setup - Simplify useProductPageState hook - Enhance storage interface with new helper methods - Remove investigation.md temporary file - Reduce test code complexity (-1325 lines, +634 lines)
Update browser launch configuration with stealth settings: - Updated User-Agent to Chrome 131.0.0.0 - Added locale and timezone settings - Added Chrome args to disable automation detection - Added JavaScript masking via addInitScript - Added realistic HTTP headers (sec-ch-ua, Accept-Language) - Centralized navigation with anti-detection headers
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.
Summary
This PR implements the "Pause Notifications" feature, allowing users to snooze the extension overlay for specific durations (5m, 1h, 1d, 1w, or forever). It also introduces a comprehensive E2E testing suite using Playwright and detailed documentation of interaction flows.
Changes
PauseMenucomponent for duration selection.BrowserStorageto handle global snooze timestamps and per-tab session state.ProductViewanduseProductPageState.PrivacyBadgeto emphasize local data storage.HeaderandCardcomponents for a more premium look.ProductViewto support the new interaction states.tests/flows/.List of Modified Files
components/ui/PauseMenu.tsxcomponents/ui/PrivacyBadge.tsxstorage/BrowserStorage.tshooks/useProductPageState.tsviews/ProductView.tsx.github/workflows/e2e-tests.ymltests/e2e/tests/flows/Breaking Changes
IStorageinterface to include pause-related methods.Testing Notes
CC: @vertefra @emypeeler