Skip to content

feat: consolidate workspace buttons/kira pilot #2996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 14, 2022
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
Next Next commit
fixed failing tests
  • Loading branch information
Kira-Pilot committed Jul 14, 2022
commit 9d503d82c964f6a4549e12cfb059af90a1edcd0c
8 changes: 8 additions & 0 deletions site/src/pages/WorkspacePage/WorkspacePage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const renderWorkspacePage = async () => {

const testButton = async (label: string, actionMock: jest.SpyInstance) => {
await renderWorkspacePage()
// open the workspace action popover so we have access to all available ctas
const trigger = await screen.findByTestId("workspace-actions-button")
trigger.click()
// REMARK: exact here because the "Start" button and "START" label for
// workspace schedule could otherwise conflict.
const button = await screen.findByText(label, { exact: true })
Expand Down Expand Up @@ -87,6 +90,11 @@ describe("Workspace Page", () => {
.spyOn(api, "deleteWorkspace")
.mockResolvedValueOnce(MockWorkspaceBuild)
await renderWorkspacePage()

// open the workspace action popover so we have access to all available ctas
const trigger = await screen.findByTestId("workspace-actions-button")
trigger.click()

const button = await screen.findByText(Language.delete)
await waitFor(() => fireEvent.click(button))
const confirmDialog = await screen.findByRole("dialog")
Expand Down