Skip to content

test(angular): assert sidemenu routerLink binding instead of flaky rendered href#1879

Merged
ShaneK merged 1 commit into
mainfrom
fix/sidemenu-flaky-urls
Jun 12, 2026
Merged

test(angular): assert sidemenu routerLink binding instead of flaky rendered href#1879
ShaneK merged 1 commit into
mainfrom
fix/sidemenu-flaky-urls

Conversation

@ShaneK

@ShaneK ShaneK commented Jun 12, 2026

Copy link
Copy Markdown
Member

What is the current behavior?

The sidemenu should have urls spec reads ion-item.getAttribute('href') right after a single detectChanges(). Ionic's RouterLinkDelegate applies that href through its own async (rAF-based) write queue, so the attribute is often still null when the assertion runs. The test fails intermittently, and it failed three times in a row on main after #1878 merged, which failed verify-test and skipped the deploy job, so the Angular dependency fix never shipped to the CDN. This is the flakiness tracked in FW-6264.

What is the new behavior?

The test now asserts the routerLink binding directly through the RouterLink directive's urlTree, which resolves synchronously from the bound commands, so it no longer depends on when Ionic writes the rendered href. Applied to both the angular and angular-standalone sidemenu starters. I ran each 12 times locally and both were green every time; the old version flaked on roughly 40% of runs.

The non-standalone should have menu labels test stays xit'd. That one reads ion-label textContent, which is a separate Stencil slot-hydration timing issue, still owned by FW-6264.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Once this lands, the deploy job on main should pass and ship the #1878 dependency fix (FW-7584) to the CDN.

…ndered href

The sidemenu 'should have urls' specs read ion-item.getAttribute('href'),
which Ionic's RouterLinkDelegate applies through its own async write queue.
Reading it after a single synchronous detectChanges() is flaky (FW-6264) and
intermittently fails CI on the angular starter, which blocked the deploy.

Assert the RouterLink binding directly via the directive's urlTree, which
resolves synchronously, so the result no longer depends on Ionic's async
href write. Verified 12/12 green on both the angular and angular-standalone
sidemenu starters.
@ShaneK ShaneK requested a review from a team as a code owner June 12, 2026 21:47
@ShaneK ShaneK requested review from BenOsodrac and removed request for a team June 12, 2026 21:47
@ShaneK ShaneK merged commit 5f5bc7b into main Jun 12, 2026
30 checks passed
@ShaneK ShaneK deleted the fix/sidemenu-flaky-urls branch June 12, 2026 21:55
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