Skip to content

Commit a9bb484

Browse files
committed
Fix tests
1 parent 4f0bc77 commit a9bb484

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

site/src/components/WorkspaceActions/WorkspaceActions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
9797
}
9898

9999
return (
100-
<div className={styles.actions}>
100+
<div className={styles.actions} data-testid="workspace-actions">
101101
{canBeUpdated &&
102102
(isUpdating
103103
? buttonMapping[ButtonTypesEnum.updating]
@@ -106,6 +106,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
106106
{canCancel && <CancelButton handleAction={handleCancel} />}
107107
<div>
108108
<Button
109+
data-testid="workspace-options-button"
109110
aria-controls="workspace-options"
110111
aria-haspopup="true"
111112
variant="outlined"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe("WorkspacePage", () => {
9898
await renderWorkspacePage()
9999

100100
// open the workspace action popover so we have access to all available ctas
101-
const trigger = screen.getByTestId("workspace-actions-button")
101+
const trigger = screen.getByTestId("workspace-options-button")
102102
await user.click(trigger)
103103
const buttonText = t("actionButton.delete", { ns: "workspacePage" })
104104

@@ -168,7 +168,7 @@ describe("WorkspacePage", () => {
168168

169169
const workspaceActions = screen.getByTestId("workspace-actions")
170170
const cancelButton = within(workspaceActions).getByRole("button", {
171-
name: "cancel action",
171+
name: "Cancel",
172172
})
173173

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

0 commit comments

Comments
 (0)