Skip to content

feat(ui): add pause notifications and E2E test suite#21

Merged
vertefra merged 22 commits intomasterfrom
16-feature-add-pause-notifications-options-when-dismissing-overlay
Jan 29, 2026
Merged

feat(ui): add pause notifications and E2E test suite#21
vertefra merged 22 commits intomasterfrom
16-feature-add-pause-notifications-options-when-dismissing-overlay

Conversation

@vertefra
Copy link
Contributor

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

  • Pause/Snooze Feature:
    • New PauseMenu component for duration selection.
    • Updated BrowserStorage to handle global snooze timestamps and per-tab session state.
    • Integrated pause logic into ProductView and useProductPageState.
  • E2E Testing:
    • Integrated Playwright for automated testing.
    • Added tests for "Close" flow, extension loading, and "I Don't Need It" flow.
    • Configured GitHub Actions for CI testing.
  • UI/UX Improvements:
    • Added PrivacyBadge to emphasize local data storage.
    • Updated Header and Card components for a more premium look.
    • Refactored ProductView to support the new interaction states.
  • Documentation:
    • Created detailed interaction flow markdown files in tests/flows/.

List of Modified Files

  • components/ui/PauseMenu.tsx
  • components/ui/PrivacyBadge.tsx
  • storage/BrowserStorage.ts
  • hooks/useProductPageState.ts
  • views/ProductView.tsx
  • .github/workflows/e2e-tests.yml
  • tests/e2e/
  • tests/flows/

Breaking Changes

  • Updated IStorage interface to include pause-related methods.

Testing Notes

  • Verified "Close for now" flow hides the overlay across tabs.
  • Verified duration-based snoozing persists in local storage.
  • E2E tests pass locally with `HEADLESS=true npm run test:e2e`.

CC: @vertefra @emypeeler

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
@vertefra vertefra merged commit a173033 into master Jan 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add "Pause Notifications" options when dismissing overlay

1 participant