Skip to content

refactor(multiple): migrate tests to use whenStable#33317

Merged
ok7sai merged 1 commit into
angular:mainfrom
ok7sai:refactor/use-whenstable
May 29, 2026
Merged

refactor(multiple): migrate tests to use whenStable#33317
ok7sai merged 1 commit into
angular:mainfrom
ok7sai:refactor/use-whenstable

Conversation

@ok7sai
Copy link
Copy Markdown
Member

@ok7sai ok7sai commented May 29, 2026

No description provided.

@ok7sai ok7sai marked this pull request as ready for review May 29, 2026 09:35
@pullapprove pullapprove Bot requested review from andrewseguin and crisbeto May 29, 2026 09:36
const click = async (target: HTMLElement) => {
target.dispatchEvent(new PointerEvent('click', {bubbles: true}));
fixture.detectChanges();
await fixture.whenStable();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the context behind this change? I was under the impression that detectChanges is preferrable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm interesting. IMO if the tests work as we expect, we don't need to change them, but I'm leaving it to your judgement.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration idea came up only because recent experience of creating adev examples out of existing tests then got commented on the detectChanges usage. Agreed that it's not a necessary migration, it's more of a way to prevent the newer Aria tests to use detectChanges.

@ok7sai ok7sai added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate labels May 29, 2026
@ok7sai ok7sai merged commit 62547b3 into angular:main May 29, 2026
33 checks passed
@ok7sai
Copy link
Copy Markdown
Member Author

ok7sai commented May 29, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@ok7sai ok7sai deleted the refactor/use-whenstable branch May 29, 2026 18:53
ok7sai added a commit that referenced this pull request May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants