Repository navigation
fix(e2e): fix failing session, user-management, attachment and image-preview tests - #793
Conversation
…th handling and device identification
There was a problem hiding this comment.
Important
The openUsersPage re-login fix does not address the failure it targets — the URL is sampled before the SPA redirects to the login page, so the guard still skips re-authentication.
Approach: sound for the session, attachment, and inline-image fixes; the users-management change needs a deterministic wait rather than a URL snapshot.
Reviewed changes
- Sessions specs: fake devices now use Edge user agents and "Edge on Windows/iOS" labels, avoiding collisions with the Firefox and mobile-safari project UAs; the server maps
Edg/andEdgiOS/to Edge before Chrome/Safari, so the labels render as asserted. - Users management:
openUsersPageswitches frompage.url().includes('/admin')to a parsed pathname check. - Inline image preview: Firefox hit-tests BlockNote's
.bn-visual-media-wrapper, so the description click handler now accepts it; both file-manager tests click the wrapper to match. - Attachment preview specs: the two "opens in a new tab" tests now expect the in-app preview (
1/1) and assert no popup, matchingFilePreview.
ℹ️ Feature files still describe the old browser and preview behaviour
The spec changes leave two feature files — the repo's spec of record, even though they are not executed — describing the previous behaviour. They should be updated with the specs.
Technical details
# Feature/spec drift
## Affected sites
- `apps/e2e/features/auth/sessions.feature:19-20` — still says "Firefox on Windows", while the spec now asserts "Edge on Windows"
- `apps/e2e/features/projects/task-detail.feature:440-450` — still says attachment previews open "in a new browser tab", while the spec now asserts the in-app preview
## Required outcome
- Each feature file describes the behaviour its corresponding spec now asserts.deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the one commit pushed since the previous pullfrog review (c0767cc), which touches only apps/e2e/tests/admin/users-management.spec.ts.
openUsersPagenow keys off rendered content, not the URL: afterpage.goto('/admin/users')it waits for theUser Managementheading or theUsernametextbox, so the SPA auth-guard redirect can complete before the decision is made.- Re-login accepts both landing paths: the post-sign-in wait matches
/homeor/admin/users, matchinguse-login-form.ts(window.location.assign(redirectTo)for a path-valued redirect, otherwisenavigate({ to: "/home" })).
The other four files are unchanged since the prior review, and their open concern — feature files still describing the old browser/preview behaviour — remains a documentation nit already recorded.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Summary
Fixes the failures in the
e2e-testsworkflow run on Firefox and mobile-safari (plus one real Firefox bug in the app).Changes
sessions.spec.ts: the fake "other device" used Firefox-on-Windows / Safari-on-iOS user agents, which are the same ones Playwright's Firefox and mobile-safari projects report, so its label collided with the "This device" row. It now uses Edge user agents, which no Playwright project reports.users-management.spec.ts:openUsersPagedecided whether to log in again by checkingpage.url().includes('/admin'). After an earlier test logs the shared admin out, the login redirect URL (/?redirect=/admin/users) still contains/admin, so the re-login was skipped and every following test failed. It now checks the URL path only.description-section.tsx(app fix): in Firefox, clicking an inline image hits BlockNote's.bn-visual-media-wrapperinstead of the<img>, so the in-app preview never opened. The click handler now accepts the wrapper as well.file-manager.spec.tsclicks the wrapper to match.task-attachments.spec.ts: two tests still expected a new browser tab, but attachments now preview in the app. They now expect the in-app preview and no popup.Not changed
Three tests that failed and then passed on retry (MFA, docs rename, automation toggle) are timing flakes and are left alone.
Testing
tsc -bpasses forapps/web.