Skip to content

Conversation

@p-sw
Copy link
Owner

@p-sw p-sw commented Oct 25, 2025

Integrate Playwright for end-to-end syncing tests and automate their execution via GitHub Actions on frontend PRs.

These tests verify key sync behaviors, including joining an existing key, server-to-client and client-to-server data propagation, and multi-client updates, by simulating real user interactions and data changes.


Open in Cursor Open in Web

cursoragent and others added 2 commits October 25, 2025 02:01
…flow

Adds Playwright to the frontend workspace, configures local web servers (backend via Bun and Vite dev server), and implements an E2E test that covers sync key join, server→client updates, client→server propagation, and multi-client synchronization. Adds a GitHub Action to run Playwright E2E on PRs that change the frontend.
@cursor
Copy link

cursor bot commented Oct 25, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 25, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
psw-chat befddd3 Oct 25 2025, 03:09 AM

@p-sw
Copy link
Owner Author

p-sw commented Oct 25, 2025

@cursor erase existing test cases in the current test and add new one that:

  • Tests if creating new sync key is working
  • Tests if joining existing sync key is working
  • After joining, tests if successfully synced all data in localStorage

@cursor
Copy link

cursor bot commented Oct 25, 2025

Done. I replaced the existing E2E with a single, focused test that:

  • Tests creating a new sync key via the UI.
  • Tests joining an existing sync key via the UI on a second client.
  • After joining, asserts that all pre-seeded localStorage data synced to the second client.

How it works

  • Seeds two localStorage keys before app scripts run.
  • Uses “Generate New Key” to create and enable sync.
  • Verifies the server contains the seeded keys.
  • Opens a second browser context, “Use Key” to join.
  • Verifies both seeded keys exist in client 2 localStorage.

You can run it locally:

  • From packages/frontend: bun run test:e2e -g "sync:"

Open in Cursor Open in Web

Learn more about Cursor Agents

cursoragent and others added 2 commits October 25, 2025 03:03
- Test generating a new sync key via UI
- Test joining existing sync key via UI
- Verify all localStorage data is synced after join
@p-sw
Copy link
Owner Author

p-sw commented Oct 25, 2025

@cursor add sync.db and test_results in frontend's .gitignore and remove it from git

@cursor
Copy link

cursor bot commented Oct 25, 2025

Added ignores and removed from git:

  • Updated packages/frontend/.gitignore to include:
    • test-results/
    • sync.db
  • Untracked any existing files:
    • Removed packages/frontend/sync.db and packages/frontend/test-results/.last-run.json from the index.

Committed the change.


Open in Cursor Open in Web

Learn more about Cursor Agents

…from git

Prevents committing local dev DB and E2E artifacts.
@p-sw p-sw marked this pull request as ready for review October 25, 2025 03:08
@cursor
Copy link

cursor bot commented Oct 25, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 12.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@p-sw p-sw merged commit c7d7384 into master Oct 25, 2025
3 checks passed
@p-sw p-sw deleted the cursor/add-playwright-end-to-end-tests-for-syncing-a11a branch October 25, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants