Skip to content

test(site/src/pages/AISettingsPage): wait for added member before saving sharing dialogs - #32413

Merged
jeremyruppel merged 1 commit into
mainfrom
fix-sharing-dialog-add-member-flake
Nov 18, 2026
Merged

jeremyruppel merged 1 commit into
mainfrom
fix-sharing-dialog-add-member-flake

Conversation

@jeremyruppel

Copy link
Copy Markdown
Collaborator

Fixes a test-js flake on main: run 44403867707 failed OrganizationSkillSharingDialog > saves only the changed entries because the PATCH body was missing the added user.

"Add member" is a React 19 <form action>, so its draft update commits in a transition. The test clicked "Save permissions" right after, and under CI load Save could run against the pre-add draft. The tests now wait for the added member's row before saving. ChatModelSharingDialog.test.tsx had the same sequence and gets the same fix.

Investigation notes
  • Reproduced deterministically by running the last two clicks with userEvent.setup({ delay: null }): 3/3 failures with the same diff as CI. Both tests pass under that repro with this change.
  • user-event clicks are not wrapped in act here: @testing-library/[email protected] depends on @testing-library/[email protected], while @testing-library/[email protected] resolves @testing-library/[email protected], so RTL's act event wrapper is never applied. Passing runs also log hundreds of "not wrapped in act" warnings, hidden by silent: "passed-only". Upgrading to RTL 16 would address this suite-wide and is left out of scope.

Generated by Coder Agents on behalf of @jeremyruppel.

@jeremyruppel

Copy link
Copy Markdown
Collaborator Author

I also considered making this not a <form action>, but decided to fix the tests instead. happy to reconsider if anyone has Opinions™

@jeremyruppel
jeremyruppel marked this pull request as ready for review November 18, 2026 22:39
@jeremyruppel
jeremyruppel merged commit 6a62aaf into main Nov 18, 2026
56 checks passed
@jeremyruppel
jeremyruppel deleted the fix-sharing-dialog-add-member-flake branch November 18, 2026 22:42
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — 222010f1 Deployed Nov 18, 2026 by jeremyruppel via cleanup #233
main — 222010f1 Deployed Nov 18, 2026 by jeremyruppel via cla #259944
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants