mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-20 13:53:32 +08:00
test: wait for desktop repository launch readiness
The branch label can render before the parent composer receives the launch-ready callback, especially after the main branch notification UI changes added more render work. The test now waits for the same enabled Run state a user can interact with before submitting. Constraint: The product intentionally disables Run while repository context is still resolving Rejected: Loosen the create-session assertion | the assertion is still the behavior this flow must guarantee Confidence: high Scope-risk: narrow Tested: cd desktop && bun run test -- src/pages/EmptySession.test.tsx --run
This commit is contained in:
parent
d1bf65d107
commit
d1f3b1f91b
@ -163,7 +163,12 @@ describe('EmptySession', () => {
|
|||||||
expect(screen.getByText('main')).toBeInTheDocument()
|
expect(screen.getByText('main')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole('button', { name: /Run/i }))
|
const runButton = screen.getByRole('button', { name: /Run/i })
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(runButton).not.toBeDisabled()
|
||||||
|
})
|
||||||
|
|
||||||
|
fireEvent.click(runButton)
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(mocks.createSession).toHaveBeenCalledWith({
|
expect(mocks.createSession).toHaveBeenCalledWith({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user