Files
coder/site
Andrew Aquino e8489d556e test: await copy created token button before clicking (#26174)
fixes DEVEX-375

Replaces `getByRole` with async `findByRole`, which returns a promise /
rejects if no matching element is found after a default timeout of
1000ms

Co-written with Coder Agents. Relevant chat responses:

[I couldn't repro locally, so I inquired if there was a commit/PR that
fixed the flake within the past 3 weeks]

>No, this flake has not been fixed. There have been zero commits to
`CreateTokenPage`, `CopyButton`, `CodeExample`, or `useClipboard.ts`
since the failing CI run (13bf0e11f1, May 20).

>`getByRole` is synchronous, so it doesn't wait for the success modal
(containing the "Copy code" button) to render after the `createToken()`
mutation resolves. When the mutation is slow, the DOM still shows the
form (Cancel / Create token), and the query fails.
2026-06-11 16:36:16 -07:00
..
…
…
…