Skip to content

Commit 55e08a0

Browse files
committed
Fix test
1 parent 859241c commit 55e08a0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

webview-ui/src/components/cloud/__tests__/CloudView.spec.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,15 @@ describe("CloudView", () => {
308308
expect(taskSyncToggle).toBeInTheDocument()
309309
expect(taskSyncToggle).toHaveAttribute("tabindex", "-1")
310310

311-
// Check that the organization message is displayed
312-
expect(screen.getByText("Task sync is managed by your organization")).toBeInTheDocument()
311+
// Check that the lock icon is displayed (indicating organization control)
312+
const lockIcon = screen.getByTestId("task-sync-toggle").parentElement?.querySelector(".lucide-lock")
313+
expect(lockIcon).toBeInTheDocument()
314+
315+
// Check that the tooltip trigger is present (which contains the organization message)
316+
const tooltipTrigger = screen
317+
.getByTestId("task-sync-toggle")
318+
.parentElement?.querySelector('[data-slot="tooltip-trigger"]')
319+
expect(tooltipTrigger).toBeInTheDocument()
313320
})
314321

315322
it("should enable task sync toggle for non-organization users", () => {

0 commit comments

Comments
 (0)