From eea90977400e675f0f4b9e092e7c8fc9a93e739b Mon Sep 17 00:00:00 2001 From: timmy Date: Sun, 23 Aug 2026 15:05:19 +0000 Subject: [PATCH] test: cover detail watch in packaged mobile CI --- .gitea/workflows/ci.yml | 2 +- tests/e2e/fake_gitea.py | 2 ++ tests/test_ci_workflow.py | 3 ++- tests/test_detail_watch.py | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2f1c328..128df5d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: pip install -r requirements-e2e.txt python3 -m playwright install --with-deps chromium - name: Exercise packaged mobile work journeys - run: python3 -m pytest tests/e2e/test_mobile_offline_issue_release.py tests/e2e/test_mobile_search_preview_navigation.py tests/e2e/test_mobile_search_week_plan.py tests/e2e/test_mobile_find_work_release.py tests/e2e/test_mobile_home_bootstrap_release.py tests/e2e/test_mobile_sign_out_release.py tests/e2e/test_mobile_today_handoff_release.py tests/e2e/test_mobile_today_wrap_up_release.py tests/e2e/test_mobile_today_summary_release.py tests/e2e/test_mobile_tomorrow_conflict_release.py tests/e2e/test_mobile_week_ahead_release.py tests/e2e/test_mobile_today_week_reschedule_release.py tests/e2e/test_mobile_wrap_up_handoff_release.py tests/e2e/test_mobile_following_release.py -q + run: python3 -m pytest tests/e2e/test_mobile_offline_issue_release.py tests/e2e/test_mobile_search_preview_navigation.py tests/e2e/test_mobile_search_week_plan.py tests/e2e/test_mobile_find_work_release.py tests/e2e/test_mobile_home_bootstrap_release.py tests/e2e/test_mobile_sign_out_release.py tests/e2e/test_mobile_today_handoff_release.py tests/e2e/test_mobile_today_wrap_up_release.py tests/e2e/test_mobile_today_summary_release.py tests/e2e/test_mobile_tomorrow_conflict_release.py tests/e2e/test_mobile_week_ahead_release.py tests/e2e/test_mobile_today_week_reschedule_release.py tests/e2e/test_mobile_wrap_up_handoff_release.py tests/e2e/test_mobile_following_release.py tests/e2e/test_mobile_detail_watch_release.py -q release-candidate: runs-on: ubuntu-latest diff --git a/tests/e2e/fake_gitea.py b/tests/e2e/fake_gitea.py index bbcebcd..694c89d 100644 --- a/tests/e2e/fake_gitea.py +++ b/tests/e2e/fake_gitea.py @@ -125,6 +125,8 @@ class FakeGiteaHandler(BaseHTTPRequestHandler): number = 0 comments = self.server.activity_comments.get(number, []) self._json(200, comments, **{"X-Total-Count": str(len(comments))}) + elif path.startswith("/api/v1/repos/acme/mobile/issues/") and path.endswith("/subscriptions/check"): + self._json(200, {"subscribed": False, "ignored": False}) elif path.startswith("/api/v1/repos/acme/mobile/issues/") and path.endswith("/dependencies"): self._json(200, []) elif path.startswith("/api/v1/repos/acme/mobile/issues/"): diff --git a/tests/test_ci_workflow.py b/tests/test_ci_workflow.py index d497f30..a582f8d 100644 --- a/tests/test_ci_workflow.py +++ b/tests/test_ci_workflow.py @@ -72,7 +72,8 @@ def test_release_promotion_waits_for_packaged_mobile_journeys(): "tests/e2e/test_mobile_week_ahead_release.py " "tests/e2e/test_mobile_today_week_reschedule_release.py " "tests/e2e/test_mobile_wrap_up_handoff_release.py " - "tests/e2e/test_mobile_following_release.py -q" + "tests/e2e/test_mobile_following_release.py " + "tests/e2e/test_mobile_detail_watch_release.py -q" ) in browser assert "needs: [lint, build-release, browser-journey]" in release diff --git a/tests/test_detail_watch.py b/tests/test_detail_watch.py index 57613be..64e1f59 100644 --- a/tests/test_detail_watch.py +++ b/tests/test_detail_watch.py @@ -116,6 +116,7 @@ def test_detail_watch_is_wired_into_both_mobile_work_details_and_bundle(): dashboard = (ROOT / "frontend" / "dashboard.js").read_text() css = (ROOT / "frontend" / "dashboard.css").read_text() bundle = (ROOT / "src" / "frontend_bundle.py").read_text() + workflow = (ROOT / ".gitea" / "workflows" / "ci.yml").read_text() search_preview = (ROOT / "frontend" / "search-preview.js").read_text() assert '' in html @@ -129,6 +130,7 @@ def test_detail_watch_is_wired_into_both_mobile_work_details_and_bundle(): assert 'pullDetailWatch.open(item)' in dashboard assert '#watch-issue-detail' in css assert '#watch-pull-detail' in css + assert 'tests/e2e/test_mobile_detail_watch_release.py' in workflow def test_detail_watch_ignores_a_late_subscription_response_for_the_previous_item():