mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Format
This commit is contained in:
@@ -39,14 +39,19 @@ describe("WorkspacesPage", () => {
|
||||
// Then
|
||||
const nextPage = await screen.findByRole("button", { name: "Next page" })
|
||||
expect(nextPage).toBeEnabled()
|
||||
await waitFor(async () => {
|
||||
const prevPage = await screen.findByRole("button", { name: "Previous page" })
|
||||
expect(prevPage).toBeDisabled()
|
||||
const pageButtons = await container.querySelectorAll(
|
||||
`button[name="Page button"]`,
|
||||
)
|
||||
expect(pageButtons.length).toBe(2)
|
||||
}, { timeout: 2000 })
|
||||
await waitFor(
|
||||
async () => {
|
||||
const prevPage = await screen.findByRole("button", {
|
||||
name: "Previous page",
|
||||
})
|
||||
expect(prevPage).toBeDisabled()
|
||||
const pageButtons = await container.querySelectorAll(
|
||||
`button[name="Page button"]`,
|
||||
)
|
||||
expect(pageButtons.length).toBe(2)
|
||||
},
|
||||
{ timeout: 2000 },
|
||||
)
|
||||
await screen.findByText(MockWorkspace.name)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user