Skip to content

Eliminate WorkspaceStore type casts in browser tests #8585

Description

@coderabbitai

Problem

The browser tests currently contain 16 type assertions casting window.app!.extensionManager to WorkspaceStore. These casts are a workaround for incomplete type definitions.

Context

Proposed Approach

As mentioned by @DrJKL:

We need to fix and/or modularize some of the augmentation .d.ts files first, then be more selective about how we access internals in the tests.

Tasks

  1. Fix and/or modularize augmentation .d.ts files in browser_tests/types/
  2. Improve type definitions for window.app.extensionManager to properly expose WorkspaceStore properties
  3. Be more selective about accessing internal store properties in tests
  4. Eliminate all as WorkspaceStore casts throughout the browser tests

Affected Files (16 occurrences)

  • browser_tests/types/globals.d.ts (1 in documentation)
  • browser_tests/tests/colorPalette.spec.ts (1)
  • browser_tests/tests/browserTabTitle.spec.ts (3)
  • browser_tests/tests/actionbar.spec.ts (1)
  • browser_tests/fixtures/components/Topbar.ts (1)
  • browser_tests/fixtures/components/SidebarTab.ts (1)
  • browser_tests/fixtures/helpers/WorkflowHelper.ts (4)
  • browser_tests/fixtures/ComfyPage.ts (2)
  • browser_tests/helpers/actionbar.ts (2)

Benefits

  • Improved type safety
  • Better autocomplete support
  • Reduced maintenance burden
  • Clearer test code without workaround casts

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions