Skip to content

fix(e2e): deflake viewQualifiedName authoring test (toolbar teardown race) - #1960

Merged
rismehta merged 1 commit into
devfrom
fix/viewqualifiedname-toolbar-flake
Aug 14, 2026
Merged

fix(e2e): deflake viewQualifiedName authoring test (toolbar teardown race)#1960
rismehta merged 1 commit into
devfrom
fix/viewqualifiedname-toolbar-flake

Conversation

@rismehta

Copy link
Copy Markdown
Collaborator

Problem

viewQualifiedName.authoring.cy.js is flaky, failing with:

Timed out retrying after 10000ms: expected '[ <button…afActionCustomFont>, 10 more… ]' to be 'visible'
This element is not visible because its parent `<div#EditableToolbar>` has CSS property: `display: none`
    at Context.eval (webpack://…/libs/support/commands.js:311:28)

Root cause (data-backed)

A component config-dialog submit fires an asynchronous editable re-render (cq-editables-updatedcq-overlays-repositioned) that repositions the overlays and hides the shared #EditableToolbar. The test proceeded straight to openEditableToolbar, so the late re-render tore the toolbar down after it was opened. openEditableToolbar's recurse retries only the overlay click; the trailing cy.get(path).should('be.visible') (commands.js:311) is passive — it only re-checks visibility, never re-clicks — so it spins for the full timeout and fails.

The earlier recurse change fixed a lost click, but never synchronised on this re-render, so retries only masked it.

Reproduction (retries=0):

Baseline After fix
Result 4 FAIL / 1 PASS (all at commands.js:311) 20 PASS / 0 FAIL

At CI's retries: 3 the baseline is still ≈ 0.8⁴41% chance to fail all attempts.

Fix

  • New central command cy.submitConfigureDialog(selector) (libs/support/commands.js) — registers the same cq-editables-updated + cq-overlays-repositioned listeners deleteComponentByPath already relies on before clicking submit, then blocks until both fire, so the editor is fully settled before the next openEditableToolbar. Reusable by the other submit sites across specs.
  • Use it in both the Forms-editor (dropComponentAndSetName) and Sites-editor flows of the spec.
  • Suppress the intermittent CoralUI3 Cannot create property '_namespace' on boolean 'true' editor-bootstrap error in the index.js uncaught:exception allow-list. It is a Coral custom-element upgrade race that self-recovers and has no functional impact on the form under test; it was simply missing from the existing allow-list, so it randomly failed the test whenever it fired.

Verification

20 consecutive runs of the previously-failing Wizard case at retries=0zero failures (baseline 4/5 failing).

🤖 Generated with Claude Code

…race)

A config-dialog submit fires an asynchronous editable re-render that
repositions overlays and hides the shared #EditableToolbar. The test
proceeded straight to openEditableToolbar, so the late re-render tore the
toolbar down after it was opened and the trailing should('be.visible')
(commands.js:311, never re-clicks) timed out with "#EditableToolbar has
display: none". At retries=0 this reproduced 4/5; masked but still ~41%
flaky at CI retries=3.

- Add central cy.submitConfigureDialog() command that registers the same
  cq-editables-updated + cq-overlays-repositioned listeners
  deleteComponentByPath uses BEFORE submit and blocks until both fire, so
  the editor is settled before the next openEditableToolbar. Reusable by
  the other submit sites across specs.
- Use it in the Forms-editor and Sites-editor flows of the spec.
- Suppress the intermittent CoralUI3 "Cannot create property '_namespace'
  on boolean 'true'" editor-bootstrap error in the index.js allow-list; it
  is racy, self-recovers, and has no functional impact on the form.

Verified: 20 consecutive post-fix runs at retries=0 with zero failures
(baseline 4/5 failing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
page-has-heading-one moderate
target-size serious

@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@rismehta
rismehta merged commit 4d26c89 into dev Aug 14, 2026
10 checks passed
@rismehta
rismehta deleted the fix/viewqualifiedname-toolbar-flake branch August 14, 2026 07:17
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.

2 participants