Skip to content

test(e2e): cover the anonymous public-share page - #81

Merged
rubenvdlinde merged 3 commits into
developmentfrom
test/public-share-e2e
Aug 9, 2026
Merged

test(e2e): cover the anonymous public-share page#81
rubenvdlinde merged 3 commits into
developmentfrom
test/public-share-e2e

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Closes gate-26, and covers four dashboard-public-share scenarios that had no e2e proof (gate-19: 262 → 258).

Why this surface

The public share is the one page LaunchPad serves to unauthenticated visitors — a separate entry point (templates/public.phpsrc/public.jsDashboardPublicShareView.vue) that bypasses the app shell and the user session entirely. It had no e2e coverage at all.

The discriminating assertions are the negative ones

"An anonymous request with a valid token returns the dashboard" would also pass if the endpoint ignored the token and served any dashboard to anyone — the failure mode that actually matters on a route with no authentication in front of it.

So the positive case is bracketed by two controls, against the same endpoint in the same run:

assertion
before a well-formed but never-issued token must NOT return 200
positive a live token serves data to an anonymous caller
after the token that just worked must stop working once revoked

A pass therefore means the token is what admits the request, rather than the absence of a check.

The browser leg

A fresh context with no credentials, asserting .public-share-view is visible — DashboardPublicShareView's root element, so the assertion is that the public bundle booted and mounted, not merely that some HTML came back. It also asserts the visitor was not bounced to /login: both API legs could pass while the rendered page still demanded a session, which is exactly the bug a public link must not have.

Placement

It lands in tests/e2e/ci/ — the directory the Playwright job actually runs (playwright-test-path: tests/e2e/ci). A spec outside it would satisfy the gate while never executing, which is the shape of every green-but-dead suite in this fleet.

Measured

gate before after
26 visual-coverage 1 0 (PASS)
19 e2e-coverage 262 258

gate-46 (spec-anchor-existence) still passes, so the @spec target and all four @e2e slugs resolve to real scenarios — the drop of exactly 4 is the evidence they matched.

⚠️ Merge only once quality / E2E Tests (Playwright) is green here. The whole point is a test that runs; if CI shows it red, the finding stands and this PR should not land.

Closes gate-26, and covers four dashboard-public-share scenarios that had
no e2e proof (gate-19: 262 -> 258).

The public share is the one page LaunchPad serves to unauthenticated
visitors — a separate entry point (templates/public.php -> src/public.js
-> DashboardPublicShareView.vue) that bypasses the app shell and the user
session entirely. It had no e2e coverage at all.

THE DISCRIMINATING ASSERTIONS ARE THE NEGATIVE ONES. "An anonymous
request with a valid token returns the dashboard" would also pass if the
endpoint ignored the token and served any dashboard to anyone — the
failure mode that actually matters on a route with no authentication in
front of it. So the positive case is bracketed by two controls against
the same endpoint in the same run:

  - a well-formed but never-issued token must NOT return 200 (before)
  - the token that just worked must STOP working once revoked (after)

A pass therefore means the token is what admits the request, rather than
the absence of a check.

The browser leg uses a fresh context with no credentials and asserts
`.public-share-view` is visible — DashboardPublicShareView's root
element, so the assertion is that the public bundle booted and mounted,
not merely that some HTML came back. It also asserts the visitor was not
bounced to /login: both API legs could pass while the rendered page still
demanded a session, which is precisely the bug a public link must not
have.

It lands in tests/e2e/ci/ — the directory the Playwright job actually
runs. A spec outside it would satisfy the gate while never executing,
which is the shape of every green-but-dead suite in this fleet.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ a568dad

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
composer ✅ 102/102
npm ✅ 548/548
PHPUnit
Newman
Playwright
Hydra gates

Quality workflow — 2026-08-09 15:22 UTC

Download the full PDF report from the workflow artifacts.

…it after

CI measured: POST /api/dashboard answered 403 personal_dashboards_disabled.
A fresh instance ships allow_user_dashboards OFF (REQ-ASET-003), so the
test could never reach the surface it exists to cover.

Enabling it is setup, not an assertion — the prior value is read from
GET /api/admin/settings first and restored at the end, so the instance is
left as it was found for whatever runs next in the same job.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 9eda978

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
composer ✅ 102/102
npm ✅ 548/548
PHPUnit
Newman
Playwright
Hydra gates

Quality workflow — 2026-08-09 15:33 UTC

Download the full PDF report from the workflow artifacts.

CI measured: POST /api/dashboard answers
{dashboard: {...uuid...}, placements: [...]} — the new dashboard is
nested and the default widget bundle comes back alongside it, so reading
uuid off the root gave undefined. The assertion message printed the whole
body, which is how the real shape was identified from one run.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 547e530

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
composer ✅ 102/102
npm ✅ 548/548
PHPUnit
Newman
Playwright
Hydra gates

Quality workflow — 2026-08-09 15:44 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit a024f36 into development Aug 9, 2026
27 checks passed
@rubenvdlinde
rubenvdlinde deleted the test/public-share-e2e branch August 9, 2026 19:42
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