Skip to content

Commit 9d503d8

Browse files
committed
fixed failing tests
1 parent a9b7688 commit 9d503d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

site/src/pages/WorkspacePage/WorkspacePage.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const renderWorkspacePage = async () => {
4343

4444
const testButton = async (label: string, actionMock: jest.SpyInstance) => {
4545
await renderWorkspacePage()
46+
// open the workspace action popover so we have access to all available ctas
47+
const trigger = await screen.findByTestId("workspace-actions-button")
48+
trigger.click()
4649
// REMARK: exact here because the "Start" button and "START" label for
4750
// workspace schedule could otherwise conflict.
4851
const button = await screen.findByText(label, { exact: true })
@@ -87,6 +90,11 @@ describe("Workspace Page", () => {
8790
.spyOn(api, "deleteWorkspace")
8891
.mockResolvedValueOnce(MockWorkspaceBuild)
8992
await renderWorkspacePage()
93+
94+
// open the workspace action popover so we have access to all available ctas
95+
const trigger = await screen.findByTestId("workspace-actions-button")
96+
trigger.click()
97+
9098
const button = await screen.findByText(Language.delete)
9199
await waitFor(() => fireEvent.click(button))
92100
const confirmDialog = await screen.findByRole("dialog")

0 commit comments

Comments
 (0)