Skip to content

test(e2e): both URL prefixes now resolve, so invert the positive control - #1807

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/both-url-forms-resolve
Sep 1, 2026
Merged

test(e2e): both URL prefixes now resolve, so invert the positive control#1807
rubenvdlinde merged 1 commit into
developmentfrom
fix/both-url-forms-resolve

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

#1805 made routerBase() derive the router base from window.location.pathname instead of generateUrl(), so a deep link now resolves under both /apps/integriq and /index.php/apps/integriq. That turned this file's third test red on the push run:

Error: /apps/integriq/sources was expected to fall through the catch-all to the app root
Expected substring: not "/sources"
Received string:        "/apps/integriq/sources"

The test was correct when it was written, and the fix is what invalidated it. It was a POSITIVE CONTROL: it proved the two prefixes were distinguishable, so that tests 1 and 2 could not pass vacuously on an instance where the distinction did not exist. With the base now derived from the pathname, the distinction genuinely no longer exists, by design.

The test says what to do in exactly this case, and I followed it rather than reaching for a delete:

…the prefix distinction has stopped mattering and appRoot.ts can be simplified — do that rather than deleting this test.

So the assertion is inverted, not removed. It walks both prefixes and requires each to keep its route and not land on the Dashboard. The guard keeps a real job: it no longer proves the resolver picks the right prefix, it proves the silently swallowed deep link cannot come back. That is the failure this app already paid for once, with 36 specs in manifest-pages.spec.ts passing against the Dashboard while claiming to test other pages.

appRoot.ts is left alone on purpose. It is no longer load-bearing for correctness, since either prefix now works, but it is still correct and still used by six spec files. Simplifying it is a separate change from proving the bug is gone, and I would rather this PR be reviewable as the one thing it is.

Verified locally: prettier clean, eslint clean, and the suite still collects 194 tests across 36 files. The E2E job runs on the push to development rather than on this PR, so the real verdict lands after merge and I will report it there.

#1805 made routerBase() derive the router base from window.location.pathname
instead of generateUrl(), so a deep link resolves under BOTH /apps/integriq and
/index.php/apps/integriq. That broke this file's third test, which asserted the
OTHER prefix was redirected to the app root.

The test was right when it was written and the fix is what invalidated it. Its
own closing comment said so: 'if this assertion ever fails, the prefix
distinction has stopped mattering and appRoot.ts can be simplified — do that
rather than deleting this test.'

So it is inverted, not deleted. It now walks both prefixes and requires each to
KEEP its route and not land on the Dashboard. The guard keeps a job: it no
longer proves the resolver picks the right prefix, it proves the silently
swallowed deep link cannot come back — which is the failure this app already
paid for once, with 36 specs in manifest-pages.spec.ts passing against the
Dashboard.

appRoot.ts is left alone. It is no longer load-bearing for correctness, since
either prefix now works, but it is still correct and still used by six spec
files, and simplifying it is a separate change from proving the bug is gone.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/integriq @ efa2ff8

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
build
check-specs
test-l10n
format
check-schema-l10n
check-l10n-js
composer ✅ 141/141
npm ✅ 537/537
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development
Hydra gates

Quality workflow — 2026-09-01 19:43 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit e6e3f57 into development Sep 1, 2026
52 checks passed
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