Skip to content

test(many): add missing await on userEvent calls in vitest#2644

Open
ToMESSKa wants to merge 1 commit into
masterfrom
INSTUI-5100-fix-missing-await-on-user-event-click-in-vitest
Open

test(many): add missing await on userEvent calls in vitest#2644
ToMESSKa wants to merge 1 commit into
masterfrom
INSTUI-5100-fix-missing-await-on-user-event-click-in-vitest

Conversation

@ToMESSKa

@ToMESSKa ToMESSKa commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

INSTUI-5100

ISSUE:

  • 63 userEvent.* calls in vitest tests were missing await. Without "wait," the test fires the click and immediately runs its check — before the click has actually done anything. So the test can say "passed" even when the feature is broken.

TEST PLAN:

  • confirm no userEvent action is left un-awaited anywhere

@ToMESSKa ToMESSKa self-assigned this Jul 17, 2026
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2644/

Built to branch gh-pages at 2026-07-17 12:31 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Jul 17, 2026
@github-actions

Copy link
Copy Markdown

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.


await waitFor(() => {
expect(onChange).not.toHaveBeenCalled()
expect(onChange).toHaveBeenCalledWith(['tester', 'test-value-1'])

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A controlled CheckboxGroup is supposed to fire onChange on every click (that's how it reports the user's intent to the parent) — it just never changes its own checked state.

@ToMESSKa
ToMESSKa requested a review from git-nandor July 17, 2026 12:54
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