Skip to content

test(desktop): stub the computer use availability hook in the prevent-sleep tests - #10182

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-test-computer-use-stub
Nov 18, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-test-computer-use-stub

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Follow-up to fix(computer-use): show computer use controls on organization Desktop settings #10176: desktop.test.tsx renders the whole Desktop page, whose Computer Use section now reads useComputerUseAvailability (React Query) instead of useUserPermissionConfig. The test still mocked the old hook, so its two prevent-sleep cases throw No QueryClient set on staging
  • Stubs the new hook the way the old mock neutralized the old one; these tests cover the prevent-sleep switch, not computer use (that is covered by computer-use.test.tsx with a real QueryClient)

Type of Change

  • Bug fix

Testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 18, 2026 6:58pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Updates the desktop prevent-sleep tests to stub the Computer Use availability hook used by the settings page.

  • Desktop prevent-sleep tests now stub Computer Use availability.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "test(desktop): stub the computer use ava..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 4fdef1e into staging Nov 18, 2026
49 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/desktop-test-computer-use-stub branch November 18, 2026 20:09

This branch was previously deployed

1 inactive deployment
Preview — 4d28857e Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant