Repository navigation
fix(e2e): assert ADR-023 without routing through the empty state - #379
rubenvdlinde wants to merge 1 commit into
Conversation
E2E fails on development: ADR-023: fresh install is usable by non-admins — the empty-state Create CTA it is offered actually works locator(.workspace-shell__empty-cta) — element(s) not found #361 (SeedDefaultDashboard) provisions an instance-wide, group-shared dashboard on install, so a brand-new non-admin resolves to THAT and never reaches the empty state this test clicked through. #373 handled the two REQ-SHELL-005 specs in this same file for exactly that reason and said the rule underneath now needs an assertion that does not route through the empty state. This third test in the same file was left behind. This is that assertion. The create affordance a non-admin is offered today is the switcher sidebars Add dashboard button, gated on the same allowUserDashboards the test already sets. The valuable part is unchanged and is why the test exists: the POST must not come back 401/403/404/5xx. The closing assertion changes with it. Asserting the empty state is gone would prove nothing now — it was never there — so it asserts the users own dashboard is listed in the switcher instead.
Quality Report — ConductionNL/launchpad @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 538/538 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | 🚨 NO VERDICT — enabled but never ran | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-28 18:49 UTC
Download the full PDF report from the workflow artifacts.
|
Closing as superseded — and theirs is the better fix. df2cf81 ("fix(e2e): assert create authorization directly, not through the empty state") landed at 18:51 with the same diagnosis: #361's SeedDefaultDashboard makes Where mine drove the switcher sidebar's Add dashboard button, theirs asserts REQ-ASET-003 against the endpoint with Basic-Auth — no UI affordance in the path at all. That is strictly more robust: my version would have gone red again the next time the sidebar markup moved, which is precisely the class of breakage this whole file keeps suffering. Their |
Fixes the E2E failure on
development(1 failed, 134 passed).The failure
Cause — and it is a straggler from #373
#361 (
SeedDefaultDashboard) provisions an instance-wide, group-shared dashboard on install, so a brand-new non-admin resolves to that and never reaches the empty state this test clicked through.#373 handled the two
REQ-SHELL-005specs in this same file for exactly that reason, and said in as many words:This third test in the same file was left behind. This PR is that assertion, rather than a third exclusion.
What it does now
The create affordance a non-admin is actually offered is the switcher sidebar's Add dashboard button — gated on the very same
allowUserDashboardsthis test already sets viasetAllowUserDashboards(true).The sidebar-opening recipe is not invented: it is copied from a passing test higher in this same file (
.launchpad-sidebar-toggle→ wait for.dashboard-switcher-sidebar.open).The valuable assertion is unchanged and is why the test exists:
401, 403, 404 and every 5xx still fail. That is the ADR-023 regression this test was written for.
The closing assertion had to change too
It used to assert the empty state was gone after reload. That would now prove nothing — it was never there. It instead asserts the user's own dashboard is listed as theirs in the switcher, which is the honest end-to-end check that the row persisted.
Selectors, all verified against source
.launchpad-sidebar-toggle.dashboard-switcher-sidebar.open[data-testid="add-dashboard-button"]DashboardSwitcherSidebar.vue:287.dashboard-switcher-sidebar__item--personalDashboardSwitcherSidebar.vue:229My first draft asserted on
.dashboard-switcher-sidebar__personal-section, which does not exist — I checked the component's rendered class list and corrected it before pushing rather than shipping a selector that could only ever fail.Verified:
node --experimental-strip-types --checkclean; pushed file byte-identical.