Skip to content

fix(e2e): click the button inside the Move action, not its li wrapper - #571

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/e2e-move-action-clicks-the-li
Aug 31, 2026
Merged

fix(e2e): click the button inside the Move action, not its li wrapper#571
rubenvdlinde merged 1 commit into
developmentfrom
fix/e2e-move-action-clicks-the-li

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

tests/e2e/workflows/folder-sharing.spec.ts has failed on development since #479 landed. The spec drives the new detail sidebar's "Secret actions" menu, and its Move step targets getByTestId('secret-detail-move').

data-testid falls through to NcActionButton's root element, which is the <li> wrapper, not the <button> that carries the click handler. Dispatching a native click on the <li> is a silent no-op, so SecretMoveDialog never opens.

Why it read as a dialog bug

The testid resolved fine, so the click step passed and only the next assertion timed out:

Error: expect(locator).toBeVisible() failed
Locator: locator('.move-form')
Error: element(s) not found
> 285 | await expect(page.locator('.move-form')).toBeVisible({ timeout: 10_000 })

The failure names .move-form, four lines below the step that actually did nothing.

The fix

Descend to the button so the handler fires. Verified against the installed @nextcloud/vue@9.11.0: NcActionButton's render root is createElementBlock("li") with the <button> inside, and it does not set inheritAttrs: false.

Scope

Checked the whole class rather than the one instance. The other testids this spec clicks natively are unaffected because their roots are the interactive element:

testid component root status
secret-detail-move NcActionButton <li> fixed here
secret-detail-share NcButton <button> fine
secret-detail-more-info native <details> <summary> fine

Verification

E2E does not run on PRs into development (only on the push run), so this needs the post-merge run to confirm green.

The folder-sharing spec drove the new sidebar's "Secret actions" menu via
getByTestId('secret-detail-move'), but data-testid falls through to
NcActionButton's ROOT element, which is the <li> wrapper rather than the
<button> that carries the click handler. Dispatching a native click on the
<li> is a silent no-op, so SecretMoveDialog never opened and the spec failed
on the downstream '.move-form' assertion instead of at the click.

The testid resolving fine is what made this read as a dialog bug: the click
step passed and only the next assertion timed out.

Descend to the button so the handler actually fires. The sibling testids in
this spec (secret-detail-share, secret-detail-more-info) sit on NcButton and
a native <summary>, whose roots ARE the interactive element, so they are
unaffected.
@rubenvdlinde
rubenvdlinde merged commit 4f31612 into development Aug 31, 2026
34 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/e2e-move-action-clicks-the-li branch August 31, 2026 13:58
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 754cd93

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
test-l10n
format
check-l10n-js
check-schema-l10n
composer ✅ 111/111
npm ✅ 536/536
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-08-31 14:04 UTC

Download the full PDF report from the workflow artifacts.

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