diff --git a/frontend/tests/window/test_window.py b/frontend/tests/window/test_window.py index 3827538..525a0ee 100644 --- a/frontend/tests/window/test_window.py +++ b/frontend/tests/window/test_window.py @@ -339,6 +339,8 @@ def listing(route): eject = page.locator(".fl-imp-eject") eject.wait_for(state="attached", timeout=15_000) page.wait_for_function("() => document.querySelector('.fl-imp-row.is-on')?.dataset.path === 'E:\\\\'", timeout=15_000) + # The dialog marks the source row before it scans; Eject is set in the same step that writes the scan result, so wait for that. + page.wait_for_function("() => document.querySelector('.fl-imp-status')?.textContent === '0 photos'", timeout=15_000) visible = eject.is_visible() browser.close() assert visible, "Eject after import stayed hidden on a removable Windows drive"