Skip to content

fix(e2e): fix failing session, user-management, attachment and image-preview tests - #793

Merged
pikann merged 2 commits into
masterfrom
fix/fix-failed-e2e-file-testings
Nov 19, 2026
Merged

pikann merged 2 commits into
masterfrom
fix/fix-failed-e2e-file-testings

Conversation

@pikann

@pikann pikann commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the failures in the e2e-tests workflow 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: openUsersPage decided whether to log in again by checking page.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-wrapper instead of the <img>, so the in-app preview never opened. The click handler now accepts the wrapper as well. file-manager.spec.ts clicks 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 -b passes for apps/web.
  • The e2e specs have not been re-run yet. They need the e2e docker stack, on Firefox and mobile-safari.

@pikann pikann changed the title feat(tests): update user management and session tests for improved pa… fix(e2e): fix failing session, user-management, attachment and image-preview tests Nov 19, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/ and EdgiOS/ to Edge before Chrome/Safari, so the labels render as asserted.
  • Users management: openUsersPage switches from page.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, matching FilePreview.

ℹ️ 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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

  • openUsersPage now keys off rendered content, not the URL: after page.goto('/admin/users') it waits for the User Management heading or the Username textbox, 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 /home or /admin/users, matching use-login-form.ts (window.location.assign(redirectTo) for a path-valued redirect, otherwise navigate({ 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.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 20e3fa2 into master Nov 19, 2026
3 checks passed
@pikann
pikann deleted the fix/fix-failed-e2e-file-testings branch November 19, 2026 17:13
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