Skip to content

Fix flaky e2e tests#179

Open
tameware wants to merge 5 commits into
dds-bridge:developfrom
tameware:fix-flaky-e2e-tests
Open

Fix flaky e2e tests#179
tameware wants to merge 5 commits into
dds-bridge:developfrom
tameware:fix-flaky-e2e-tests

Conversation

@tameware

@tameware tameware commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

tameware and others added 3 commits June 8, 2026 11:33
…d passes it to Node as DDS_MVP_JS (reliable under Bazel on Linux).

web/tests/dds_mvp_test.mjs — Uses DDS_MVP_JS first, with fallbacks for direct node --test runs from the repo.
Pass the resolved dds_mvp.js path via DDS_MVP_JS for Bazel runfiles, and add focus() to mock DOM elements so clearTestData and pageLoad work when merged with web changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware tameware marked this pull request as ready for review June 9, 2026 02:59
@zzcgumn zzcgumn requested a review from Copilot June 10, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a deterministic unit-test harness for web/dds_mvp.js by running a Node --test suite from a Bazel py_test, aiming to reduce reliance on flaky browser-based e2e coverage for basic JS behavior.

Changes:

  • Add a Node test suite (web/tests/dds_mvp_test.mjs) that loads web/dds_mvp.js in a VM with a mocked DOM and validates key functions.
  • Add a Bazel-driven Python wrapper test (web/tests/test_dds_mvp_js.py) to execute the Node test runner in CI (//web:dds_mvp_js_test).
  • Update web/dds_mvp.js header comments to reference the new unit tests and commands.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
web/tests/test_dds_mvp_js.py Python unittest wrapper that invokes node --test and wires runfiles/env for Bazel.
web/tests/dds_mvp_test.mjs Node built-in test runner suite with a mocked document and VM execution of dds_mvp.js.
web/dds_mvp.js Replaces TODO with pointers to the new unit tests and how to run them.
web/BUILD.bazel Adds dds_mvp_js_test and includes it in the web_tests test suite.

Comment thread web/tests/test_dds_mvp_js.py Outdated
Comment thread web/tests/test_dds_mvp_js.py Outdated
tameware and others added 2 commits June 10, 2026 19:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@tameware

Copy link
Copy Markdown
Contributor Author

Please ask Copilot for another review. I had to merge with develop. I'd like to make sure I didn't miss anything. Cursor's agent is happy, but they each catch things the other doesn't.

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.

2 participants