Skip to content

fix(e2e): make the chrome specs pass in a real browser - #767

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/app-chrome-spec-selectors
Sep 4, 2026
Merged

fix(e2e): make the chrome specs pass in a real browser#767
rubenvdlinde merged 1 commit into
developmentfrom
fix/app-chrome-spec-selectors

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

The ADR-114 chrome specs had only ever been collected, never run. Collecting proves a spec parses; it proves nothing about whether it passes. Running them against a real Nextcloud found three defects, all of which shipped in every app's spec.

1. The testid is on the wrapper, not the link

cn-nav-entry-* and cn-nav-admin-settings sit on the <li class="app-navigation-entry-wrapper">. The clickable element and the href both live on the <a class="app-navigation-entry-link"> inside it.

So .click() on the testid resolved the locator and then never became actionable — a 30-second timeout that reads like the navigation is broken — and toHaveAttribute('href', …) on it returned null, which the report renders as the string "null".

2. The setup wizard modal eats the clicks

On a fresh instance CnSetupWizard opens over the app, and its modal subtree intercepts pointer events:

<div class="modal-wrapper modal-wrapper--large"> … subtree intercepts pointer events

Every click-through test failed; every URL-navigation test passed. That asymmetry is exactly what makes this easy to miss — the suite looks two-thirds healthy. The specs now dismiss the wizard in beforeEach.

3. A single-word text probe matched an SVG title

getByText('Open', { exact: false }) matched <title>Opens in a new tab</title> on an external-link icon: attached, hidden, and nothing to do with the report under test. Single-word probes are now scoped to main, .app-content and use a string only the report can supply.

How this was verified

A throwaway Nextcloud on its own compose project and port — deliberately not the shared :8080, and not the other sessions' containers, both of which this fleet has been bitten by before.

  • planninq: 6/6 green (was 3 failed / 3 passed)
  • keepiq: 5/5 green (was 5 failed)

Every other app receives the same mechanical fix, linted and formatted in its own app's style. Their suites are not individually executed here — each needs its own npm ci plus a webpack build to test the icon assertions honestly — so this PR claims the fix, not a per-app green run.

One thing worth recording: an earlier attempt reported keepiq's Reports page rendering "This page is empty". That was not a product defect — it was a borrowed node_modules from a sibling checkout pinning nc-vue 2.27.2 where keepiq declares ^2.32.0, too old to know the reports page type. With the declared version installed, the page renders correctly.

🤖 Generated with Claude Code

Three defects, all found by actually RUNNING the specs rather than
collecting them. Until now they had only ever been listed, which proves a
spec parses and nothing else.

1. The cn-nav-* testids are on the <li> WRAPPER. The clickable element and
   the href both live on the <a class="app-navigation-entry-link"> inside
   it, so clicking the li resolved the locator and then never became
   actionable — a 30s timeout that reads like the navigation is broken —
   and reading href off the li gave null.

2. On a FRESH instance the setup wizard modal opens over the app and
   intercepts pointer events. Every nav click failed while every URL
   navigation passed, which is exactly the shape that hides this: only the
   click-through tests break, and only on a clean install.

3. A bare getByText('Open') matched the SVG <title>Opens in a new tab</title>
   on an external-link icon — attached, hidden, unrelated. Single-word
   probes are now scoped to the page body.

Verified against a throwaway Nextcloud (not the shared :8080, and not the
neighbouring sessions' containers): planninq 6/6 and keepiq 5/5 green.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/hermiq @ 870b11d

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
check-manifest
test-l10n
format
check-l10n-js
check-schema-l10n
composer ✅ 123/123
npm ✅ 730/730
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-03 20:19 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 2350fdb into development Sep 4, 2026
51 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