Repository navigation
fix(tests): stabilize release/650 authoring Cypress tests - #2007
Merged
Merged
Conversation
Synchronize editor transitions, isolate fixtures, use classic Coral controls, and preserve telephone policy state. Add controlled authoring race regressions and optional remote request authentication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reproduce the early iteration-limit failure with a delayed layer option and allow polling throughout the existing ten-second timeout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the component fixes and shared helpers, remove the synthetic synchronization suite as requested, and update the documented spec selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rismehta
marked this pull request as ready for review
October 6, 2026 10:16
Use Coral option items and the shared selection helper instead of a nativeSelect that is absent on release/650. Isolate the custom-regex case and wait for configure cancellation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wait for the inline toolbar to open and close using bounded outside-click recovery before reopening the editable toolbar. Assert the actual preview label and remove whole-test retries from the reported case. Live validation remains blocked by the offline supplied endpoint. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve same-origin referrer metadata for awaited preferences, policy restoration and fixture cleanup requests. Validate all three paths with normal Chrome user agent against a controlled rejection fixture; keep HTTP errors visible. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use selected layer state and public Granite validation accessors. Preserve Button empty-caption coverage and verify inline persistence. Document normal-browser remote setup and compatibility checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Install Node.js 22.19.0 in the shared Cypress setup and pin Lighthouse to 13.5.0 to prevent JSON import attribute parsing failures on the older test-runner images. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Lighthouse scores (mobile)
|
Lighthouse scores (desktop)
|
Accessibility Violations Found
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stabilize the reported release/650 authoring failures in wizard, checkbox group, dropdown, content/experience fragment, telephone input, Button inline editing, and TextInput validation-pattern tests.
nativeSelect.jcr:title, then retain the original empty-caption edit and verify the empty native button/title before deletion. Add failure-safe named-fixture teardown.baseUrlasReferer, alongside the CSRF token. Requests remain awaited and HTTP errors are not suppressed.getValidationMessage()orvalidationMessage()rather than relying on Coral error-label/tooltip markup.openstate and a unique visible native Insert input instead of internal presentation classes. Include request-login referrer metadata, without changing default UI authentication.docs/e2e-testing/authoring-compatibility.md, linked from the module README andCLAUDE.md.The standalone
authoring.synchronization.cy.jsspec has been removed at the requestor's direction; it is not part of the final PR diff. The shared synchronization fixes remain.Related Issue
Reported release/650 authoring failures supplied for this change; no separate tracking issue was supplied. Related prior work: #2006, which targets
dev, notrelease/650.Motivation and Context
Visible controls can appear before their handlers/editor transitions finish, and classic Coral markup differs from master. Broad selectors, test-order dependencies, and persistent policy mutations amplify those races. This change addresses those causes rather than suppressing application exceptions, adding fixed sleeps, or relying on per-test retries.
Marked ready for review at the requestor's direction; not a claim of complete validation. All live validation uses the supplied HTTPS author endpoint, not localhost. The current
https://panning-endnote-carol.ngrok-free.devbackend is verified as AEM 6.5.25.0 SP, with active Core Forms bundles1.1.83.SNAPSHOT; the same URL previously pointed to LTS. All 17 distinct reported cases have now passed at least once after their relevant corrections on SP, using normal Chrome and no whole-test retries. Actual current-source LTS, the complete 153-spec suite, and final whole-PR review are still pending.The old LTS backend's four unrelated blank-form nodes were preserved under a verified backup with explicit authorization, but could not be restored before that backend disappeared. That backup is absent on the replacement SP backend, whose separate pre-test blank-form baseline had no component child nodes. Old-LTS restoration remains outstanding; do not mistake the replacement server for the original backend or manufacture those nodes on SP.
CI regression on
d3ef7a4f6: all three Cypress variants failed; the requestor reported the same preferences POST 403 across 83 tests in each run. This was introduced by changing browser jQuery POST tocy.request()without preserving referrer metadata. Prior live runs used the non-browserCypress-Live-650user agent, which bypasses Sling's browser-user-agent referrer classification and masked this defect. Those results are historical component evidence, not proof of CI/default-browser compatibility. The new header correction must receive fresh CI results.Separate known CI blocker:
validate_test_filesrejects unchanged, pre-existingit.skipcases in modified files because it scans complete files. The requestor explicitly asked to leave this CI failure/policy unchanged for now. No skipped tests were newly introduced or enabled to bypass the gate. Java 8, 11, and 21 CircleCI passed ond3ef7a4f6; these do not validate the Cypress regression.Eight reported cases passed ten isolated repetitions each on
5fd5c61d1, with exact fixture/policy restoration. The ninth exposed an early layer readiness cutoff: five polling attempts exhausted after about three seconds despite a ten-second timeout. Commit9c0661f94aligns the iteration budget with that timeout. A controlled 4.5-second layer-option delay reproduced the failure before the fix and passed afterward. Repeated acceptance subsequently restarted but was interrupted; the earlier eighty passes are not claimed as final-head acceptance.At
9c0661f94, four cases completed ten repetitions each with no failures, retries, or fixture/policy drift: telephone validation-pattern change, Sites wizard second-panel toolbar, checkbox rule-editor rich enum names, and checkbox duplicate enum values. The standalone-spec removal does not change these component test bodies or their shared helpers. The queued five complete-suite repetition runs were cancelled as requested because the server may become unavailable; they were not run. Other completed live results below are historical investigation evidence, not a claim that the whole repository suite passed.How Has This Been Tested?
Remaining Button and equality-rule failures: final live verification (2026-10-07)
Commit
1953c22491672df72654f94fc5801a1b4e2d2acffixes the two remaining reported cases. The previous Button fix handled lost clicks but did not configure the required editor type:toolbaractionhook.jsselects plaintext when the rendered label/text lacksdata-richtext, so waiting/retrying for.rte-toolbarcannot succeed. The caption-edit case now explicitly enables and savesisTitleRichTextbefore opening RTE, preserving both nonempty and empty-caption save assertions.The equality-rule fix backports master's parsed-JSON/deep-equality assertion for
fd:events.changewithout weakening the expected script. It also uses the existingcy.createRule()readiness helper, cleans the named source fixture before insertion and in a scopedafterEach, and explicitly selects that source field's generated name as the hide target. Selecting the first option could instead choose a leftover sibling and generate the reporteddispatchEventscript. Duplicate rules and wrong behavior still fail the exact assertion.Final live result: both cases passed twice, 4/4 executions, zero failures, retries disabled and one attempt per case. Verified on the supplied ngrok endpoint (
https://panning-endnote-carol.ngrok-free.dev), AEM 6.5.25.0 SP, normal headless Chrome 154.0.8037.98, Cypress 13.17.0, Node 22.19.0. Used documented ngrok warning-bypass headers and optional request authentication, with no browser user-agent override. Source hashes were checked before committing to ensure the published specs exactly match the accepted runs.open Inline edit dialog of Buttonshould add rule on texbox equality operator to hide a text boxThese final two runs included a deliberately seeded unrelated sibling input in the rule form, validating self-target selection rather than only an empty-form success. Both fixture baselines were preserved after each run, including the existing panel in the Button form and the sibling input. The diagnostic sibling was then removed and the original rule-form baseline restored. The diagnostic copies keep current test bodies/hooks, set global retries to
0, remove per-test overrides, and mark only the other cases pending: 2 passing / 0 failing / 11 intentionally pending / 0 skipped-after-hook per combined run. No skips were added to committed specs.Exact executed command (credentials redacted; the session-only runner executes both repetitions):
Passed. Selected
target/isolated/remaining-button.cy.jsandtarget/isolated/ruleeditor/remaining-equality.cy.js, withbaseUrl=https://panning-endnote-carol.ngrok-free.dev,retries=0,video=false, and normal Chrome. An intermediate live attempt passed Button but failed the rule case while Create Rule was still covered by the editor's frozen state; that readiness issue was fixed before these accepted final-source repetitions.Also ran:
Passed: 9/9 offline contract regressions, including plaintext-default behavior, explicit self-target selection with a preceding sibling, structured JSON validation, duplicate/wrong-rule rejection and bounded persistent opening failure. The new positive regressions failed before their relevant fixes.
Both passed. This is focused SP acceptance for the two requested cases, not the entire specs/suite or LTS. Fresh CI on this commit remains required; the failures on
556e4d5edare not evidence about this correction. Two passes do not guarantee that every future race is eliminated.Historical Button runs on 556e4d5 (superseded by the correction above)
Those isolated passes were real but insufficient: subsequent CI exposed the plaintext/RTE mismatch. They do not establish that the earlier lost-click fix resolved the remaining Button failure.
Verified commit
556e4d5ed82a361d5a1ab68d73f4ba62d0995d40againsthttps://panning-endnote-carol.ngrok-free.devafter restart. Product information reports AEM 6.5.25.0; all four Core Forms component bundles were Active, version1.1.83.SNAPSHOT. Browser: normal Chrome 154.0.8037.98 headless; Cypress 13.17.0, Node 22.19.0. Used the documented ngrok warning-bypass headers and optional request-based login, without overriding the browser user agent.The ignored selection copy retains the current Button test bodies and hooks; only the five unrelated cases are marked pending. Global retries are
0, and per-test retry overrides are removed from the diagnostic copy. The runner performs two separate Cypress runs and verifies the fixture baseline after each.open Inline edit dialog of Buttoncheck rich text inline editor is presentResult: 4/4 requested live executions passed, zero failures, no whole-test retries. Each run collected 2 passing / 0 failing / 5 intentionally pending / 0 skipped-after-hook cases. The blank-form container had no child nodes before testing and retained that exact child baseline after both runs; the test-owned Button was removed each time. This confirms the rich-text-inline case works without relying on its preceding test.
Exact executed command (credentials redacted; this session-only runner performs both repetitions):
Passed. The runner uses
target/isolated/button-live-selected.cy.js,target/button-live-support.js,baseUrl=https://panning-endnote-carol.ngrok-free.dev,retries=0,video=false, andcrx.loginViaRequest=truewith ngrok headers on browser subresources, visits and requests. Before these two successful runs, a launch collected no specs because the API spec path resolved against the repository root; that path was corrected before either accepted run. Earlier readiness probes found undeployed content/inactive bundles and did not execute tests.Scope: these are the two requested Button cases on SP, repeated twice—not a full Button spec, full suite, LTS validation, or proof that current CI is green. Finite repetitions cannot guarantee the absence of future races.
Authenticated POST 403 regression
Ran a session-only diagnostic with real Cypress/Chrome, no user-agent override and no retries, extracting the actual helper implementations from the previous head and current source. A local HTTP fixture models Sling's missing-referrer rejection, requires a session cookie and CSRF token, and delays POST completion. This is controlled regression evidence, not a live AEM run; it does not add a standalone synchronization spec to the PR.
Passed its expected-outcome checks: before the fix, all three paths failed with 403 (preferences, policy restoration, fixture deletion); after the fix, all three passed. Preferences were exercised for both enable and disable, completion was awaited, and context-path handling was exercised. A forced server rejection still failed with 403 after the fix, proving errors are not hidden.
Passed. Correction published in
63685e3de. The endpoint was offline at that publication; normal-browser live SP first-pass acceptance has since completed as recorded below. Fresh CI results for the latest corrections remain required.Current live SP first-pass acceptance
Verified
/system/console/status-productinfo.txtas Adobe Experience Manager (6.5.25.0) before generation. Used normal Chrome154, Cypress13.17, global retries0 and selected cases without per-test retries. The temporary ignored selection copies retain actual test bodies/hooks; unrelated tests are pending only in those copies, not newly skipped in repository specs. The ngrok warning header is forwarded with native Chrome CDP and node-side request/initial-visit headers; no non-browser user-agent override, broad interception, or exception suppression is used.From
ui.tests/test-module, each row used this exact command shape with the listed substitution (credentials redacted):<selection>sp-probe-01-text.authoring.cy.jssp-latest-remaining-*.cy.jssp-checkbox-01-checkboxgroup.authoring.cy.jsgetValidationMessage()accessor: Checkbox validation passed, including Number and Boolean.sp-earlier-*.cy.jssp-button-01-button.authoring.cy.js17/17 distinct reported cases have now passed after their relevant corrections. This is first-pass coverage, not a claim that a combined/full suite or LTS has passed. A stopped intermediate Button attempt failed in setup; its exact setup root cause was not established. The owned failed-run Button was verified absent from the original SP baseline and cleaned before successful reruns.
Passed: 8/8 contract checks for both accessor forms/context binding, precedence, missing adapter/accessor, wrong message, valid field and ambiguous selector. These session-only checks execute the current helper, but are not live LTS acceptance.
Passed for the current fixes.
Historical live evidence
Chrome 154 headless, Cypress 13.17.0, Node 22.19.0, supplied remote release/650 AEM author. Credentials are intentionally redacted below; no private diagnostic logs are attached.
From
ui.tests/test-module:Passed: 4/4 framework regressions. Default spec collection excluded the generated isolated file in this command, so the rule case was separately collected and run explicitly:
Passed: 1/1 rule-editor case; six other cases intentionally pending in the session-only selection copy. The generated copy keeps the selected body and hooks unchanged and references the current repository helpers.
Passed: 1/1 live policy snapshot check, including an originally empty custom-format root/item and exact restoration. Its uniquely named temporary policy was removed. Diagnostic selection/policy specs remain ignored, not committed.
Earlier live investigation runs also passed all six dropdown cases, all three content/experience-fragment cases, all six telephone cases, and all eight active wizard cases. Those runs preceded the final combined source revision and are not a substitute for the pending final acceptance.
All passed. ESLint was restored for validation only without changing manifests/lockfiles. The repository's full lint configuration already fails on the actual base
f78320060(18,027 errors); this is not a claim that every candidate lint finding is pre-existing.Historical layer-budget regression (spec subsequently removed): before fix, 3 passed / 1 failed with the same premature iteration limit; after fix, all 4 passed. Remaining-PR focused JavaScript lint and whitespace checks passed again after removal.
Remaining validation limits: not all nine cases have completed ten repetitions on the layer-budget-fixed revision. A complete final-head five-spec run, adjacent helper-consumer/default-auth coverage, final whole-PR review, and current-head CI results remain incomplete. The five affected authoring specs contain 30 active cases and two existing skipped wizard fragment cases. Repeated complete-suite runs are no longer requested. No claim of complete repository-wide validation or a guarantee that flakiness can never recur.
Additional Button and TextInput failures
Both additional reported cases were run once before changes on
https://panning-endnote-carol.ngrok-free.dev, with retries disabled. Both failed: Button left its inline toolbar open and exhausted the normal-toolbar retry loop during deletion; TextInput could not findselect[handle="nativeSelect"].The same selected-case command after the TextInput selector change passed TextInput (1/1, no retries). Its live DOM was a classic
coral-selectwithcoral-select-item/coral-selectlist-itemoptions. Commitbb58b09e2contains that validated fix.The historical Button patch in
d3ef7a4f6waits for the inline toolbar to appear and retries outside-click dismissal only while it remains open. It removes the reported case's whole-test retry override. It was explicitly published before live verification while the endpoint was offline. Its nonempty-span assertion after clearing the caption was incorrect and is replaced by the current live-verified coverage above. An exploratory Save-button approach did not work because that control remained disabled; it was not committed.Passed for both added fixes.
Whole-suite request: run the entire configured Cypress suite once (153 authoring/runtime JS specs), not merely the original affected specs, then review the whole PR. This run has not yet started; the current SP endpoint is available and first-pass fixes are ready for publication before that run. Original-LTS preservation/restoration is a separate outstanding obligation described above; no original nodes were deleted.
Screenshots (if appropriate):
Not attached; private live diagnostics remain local.
Types of changes
Checklist: