Skip to content

feat/contact persistence clients tests - #2

Open
prabhash-nw wants to merge 10 commits into
mainfrom
feat/contact-persistence-clients-tests
Open

prabhash-nw wants to merge 10 commits into
mainfrom
feat/contact-persistence-clients-tests

Conversation

@prabhash-nw

Copy link
Copy Markdown
Owner
  • feat(clients): add regex text assertions
  • test(typescript): close client test parity gaps

Support text regex selectors in Python and TypeScript client
commands and models so assertVisible/assertNotVisible can match
platform-specific contact label formats.

Update contact_persists e2e flow to use a regex assertion that
accepts both "Alice Tester" and "Tester, Alice" renderings.
Add missing TypeScript client unit coverage for command serialization,
assertion variants, tapFirstMatch failure paths, and device endpoint
error handling to match Python coverage intent.

Add Android e2e smoke test that mirrors status/device-info/launch/
assert/input/screenshot/source/back API flow and include it in the
Android device test script.

Refactor repetitive unit serialization checks into table-driven tests
without changing assertions.
@github-actions

Copy link
Copy Markdown

e2e-android: Run #21

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4 2 2 0 0 0 0 not captured

❌ Some tests failed!

Name Failure Message
❌ ContactPersists: ContactPersists should persist contact after relaunch No failure message
❌ AddContact: AddContact should add and verify a contact No failure message

Github Test Reporter by CTRF 💚

Android drivers now handle textRegex field for case-insensitive regex matching.
Updated both uiautomator2 and devicelab drivers.
Bumped test runner skills to v1.2.0 for serial device execution policy.
@github-actions

Copy link
Copy Markdown

e2e-android: Run #22

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4 4 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

- improve TypeScript step failure diagnostics and teardown hooks
- capture diagnostics on TypeScript e2e test failures
- harden Python contact persistence assertions for CI timing
- run YAML, TypeScript, and Python Android suites in separate
  emulator runs with fresh -wipe-data -no-snapshot-load boots
@github-actions

Copy link
Copy Markdown

e2e-android: Run #23

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4 4 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

- deploy Android E2E reports and diagnostics to GitHub Pages on main
- include Python and TypeScript diagnostics directories in pages payload
- add Pages URL to workflow job summary for quick access
- post or update a PR comment with the stable Pages URL
Resolve ruff F401 in test_contact_persists so Python client lint
matches CI expectations.
@github-actions

Copy link
Copy Markdown

Android E2E reports page: https://prabhash-nw.github.io/maestro-runner/

@github-actions

Copy link
Copy Markdown

e2e-android: Run #24

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
2 2 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

@github-actions

Copy link
Copy Markdown

e2e-android: Run #25

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4 4 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

Stop masking Android E2E pytest failures and collect reports from
client/python/reports where the Python client actually writes its
JUnit and HTML artifacts.
@github-actions

Copy link
Copy Markdown

e2e-android: Run #27

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
2 0 2 0 0 0 0 not captured

❌ Some tests failed!

Name Failure Message
❌ pytest: test_add_and_verify_contact maestro_runner.exceptions.StepError: Timed out after 15000ms (140 iteration(s)) waiting for screen to become static; diffs=[] threshold=0.0050
❌ pytest: test_contact_persists_after_relaunch maestro_runner.exceptions.StepError: Timed out after 15000ms (150 iteration(s)) waiting for screen to become static; diffs=[] threshold=0.0050

Github Test Reporter by CTRF 💚

@github-actions

Copy link
Copy Markdown

e2e-android-yaml: Run #1

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
2 2 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

Replace the monolithic CI workflow with unit-tests workflow updates.
Align Python and TypeScript client tests/docs with the new flow.
@github-actions

Copy link
Copy Markdown

e2e-android-yaml: Run #2

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
2 1 1 0 0 0 0 not captured

❌ Some tests failed!

Name Failure Message
❌ maestro-runner: Contact persists after relaunch Element not visible: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters

Github Test Reporter by CTRF 💚

pr4bh4sh referenced this pull request in pr4bh4sh/maestro-runner-old Aug 23, 2026
Lets the browser driver reuse a user-data-dir across runs so cookies,
localStorage, sessionStorage, and installed extensions survive between
test invocations. Useful for:
  - speeding up auth-heavy CI suites (log in once, reuse across flows)
  - testing flows that depend on installed Chrome extensions
  - keeping a stable browser profile for cookie-driven behaviour

Usage:

  maestro-runner --platform web --user-data-dir ~/.cache/mr-profile \
    test flow.yaml

Also exposed via MAESTRO_USER_DATA_DIR for shell-driven CI configuration.
Default unset → identical to current ephemeral-profile behaviour (no
backward-compat risk).

Implementation:
  - cdpdriver.Config gains UserDataDir field.
  - When non-empty, passed to Rod's launcher as `user-data-dir=<path>`.
    Existing prefs-file write (writeChromePref) already handled this dir,
    so password-manager disabling still works on persistent profiles.
  - CLI plumbing: --user-data-dir flag → RunConfig.UserDataDir → web.go
    construction.
  - Caller manages the directory's lifecycle (the runner doesn't create
    or clean it up).

Tests:
  - TestUserDataDir — end-to-end persistence: two New() calls against
    the same dir, localStorage written in run #1, read back in run #2.
    Uses manually-managed temp dir because t.TempDir() races Chrome's
    lock-file release on macOS.

Real-flow verification:
  - Two `maestro-runner test` invocations against `--user-data-dir
    /tmp/profile` and a real http://localhost origin (data: URLs disable
    localStorage). First flow writes; second reads back the value.
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.

1 participant