Skip to content

Commit 02a8073

Browse files
test(e2e): increase timing budget for CI and assert repos before save
The LoadingScreen runs in a background thread and then fires a 1.5 s set_timer before pushing DashboardScreen. On slow CI runners the combined latency can exceed the previous 3 s (30x100 ms) polling budget, leaving app.original_repo / app.forked_repo still None when Save is clicked. This caused save_member() to raise RuntimeError, which was silently absorbed by on_button_pressed, so the screen never transitioned to SaveLoadingScreen. - Increase LoadingScreen poll budget to 5 s (50x100 ms) - Increase SaveLoadingScreen poll budget to 5 s (50x100 ms) - Assert app.original_repo and app.forked_repo are not None after DashboardScreen is reached, making the failure obvious if repos are not initialised in time
1 parent 3a6bda9 commit 02a8073

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

tests/e2e/test_app_e2e.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,19 @@ async def test_full_app_flow(
5858
await pilot.click("#login-btn")
5959

6060
# 3. Loading Screen
61-
# Wait for background task to finish and transition to Dashboard
62-
for _ in range(20):
61+
# The background thread sets app repos; advance_screen fires after a
62+
# 1.5 s timer. Give it up to 5 s total to reach DashboardScreen in CI.
63+
for _ in range(50):
6364
await pilot.pause(0.1)
6465
if isinstance(app.screen, DashboardScreen):
6566
break
6667

67-
for _ in range(10):
68-
await pilot.pause(0.1)
69-
if isinstance(app.screen, DashboardScreen):
70-
break
7168
assert isinstance(app.screen, DashboardScreen)
7269

70+
# Verify repos were populated by LoadingScreen before proceeding
71+
assert app.original_repo is not None
72+
assert app.forked_repo is not None
73+
7374
# 4. Dashboard -> Add Member
7475
await pilot.click("#dash-add")
7576
await pilot.pause()
@@ -109,8 +110,8 @@ async def test_full_app_flow(
109110

110111
await pilot.click("#member-form-save")
111112

112-
# 6. Save Loading Screen
113-
for _ in range(40):
113+
# 6. Save Loading Screen — give up to 5 s for the background work
114+
for _ in range(50):
114115
await pilot.pause(0.1)
115116
if (
116117
isinstance(app.screen, SaveLoadingScreen)

0 commit comments

Comments
 (0)