Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fmt
  • Loading branch information
mtojek committed Dec 9, 2022
commit a34dfe4e255e7f23a5a85b739bafa3cb08f91fdd
12 changes: 3 additions & 9 deletions site/src/pages/WorkspacePage/WorkspacePage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ describe("WorkspacePage", () => {
name: "cancel action",
})

await userEvent
.setup()
.click(cancelButton)
await userEvent.setup().click(cancelButton)

expect(cancelWorkspaceMock).toBeCalled()
})
Expand All @@ -185,9 +183,7 @@ describe("WorkspacePage", () => {
await renderWorkspacePage()
const buttonText = t("actionButton.update", { ns: "workspacePage" })
const button = await screen.findByText(buttonText, { exact: true })
await userEvent
.setup()
.click(button)
await userEvent.setup().click(button)

// getTemplate is called twice: once when the machine starts, and once after the user requests to update
expect(getTemplateMock).toBeCalledTimes(2)
Expand All @@ -209,9 +205,7 @@ describe("WorkspacePage", () => {
await renderWorkspacePage()
const buttonText = t("actionButton.update", { ns: "workspacePage" })
const button = await screen.findByText(buttonText, { exact: true })
await userEvent
.setup()
.click(button)
await userEvent.setup().click(button)

await waitFor(() =>
expect(api.startWorkspace).toBeCalledWith(
Expand Down