Skip to content

feat(components): add test harnesses for grids, list-builder, and text-editor#10

Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1768232516-add-test-harnesses
Open

feat(components): add test harnesses for grids, list-builder, and text-editor#10
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1768232516-add-test-harnesses

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Jan 12, 2026

Summary

This PR adds Angular CDK test harnesses for three SKY UX components that were missing them:

  • @skyux/grids: SkyGridHarness with methods for column/row operations (getColumnCount, getRowCount, getCellText, clickRow, etc.)
  • @skyux/list-builder: SkyListHarness with basic container functionality
  • @skyux/text-editor: SkyTextEditorHarness with methods for label, hint text, and state checking (isDisabled, hasErrors, isFocused, isRequired)

Each harness follows the established patterns in the codebase: extends SkyComponentHarness, implements static hostSelector and with() method, uses private locators, and includes filter interfaces.

Updates since last revision

  • Added @angular/cdk as a peer dependency to grids, list-builder, and text-editor package.json files (required since harnesses import from @angular/cdk/testing)
  • Ran npm run dev:update-library-dependencies to update project.json files with proper build inputs and dependencies
  • CI status: The "Check dependencies and resources" check now passes. Builds and tests for grids, list-builder, and text-editor all pass. However, some unrelated CI jobs are failing:
    • manifest:build - exit code 130 (interrupted/timeout)
    • Percy visual regression tests - missing Percy tokens
    • conventional-title - missing GITHUB_TOKEN in workflow

Review & Testing Checklist for Human

  • Verify the unrelated CI failures - Confirm that manifest:build failure and Percy token issues are pre-existing/infrastructure issues, not caused by this PR
  • Review grid harness getCellText logic (grid-harness.ts:76-86) - Uses index calculation (rowIndex * columnCount + columnIndex) to find cells. Verify this works correctly with the actual grid DOM structure.
  • Verify CSS class selectors - Text editor harness relies on classes like sky-text-editor-disabled, sky-text-editor-invalid, sky-text-editor-wrapper-focused. Confirm these match the actual component.
  • Assess list-builder harness completeness - Currently minimal (only hostSelector + with method). Determine if additional methods are needed.

Recommended test plan: Manually test each harness in a consuming application to verify the methods work as expected with real component instances.

Notes

  • The SkyGridHarness includes a @deprecated JSDoc tag since the underlying SkyGridComponent is deprecated
  • Path mappings added to tsconfig.base.json for all three testing exports
  • Tests could not be fully run locally due to Chrome browser issues in the dev environment; TypeScript compilation succeeded

Link to Devin run: https://app.devin.ai/sessions/88b9b3ffe13049679f03c3afe4fa52e3
Requested by: @bcmake

…t-editor

Add test harnesses for the following components:
- @skyux/grids: SkyGridHarness with methods for column/row operations
- @skyux/list-builder: SkyListHarness with basic container functionality
- @skyux/text-editor: SkyTextEditorHarness with label, hint, and state methods

Each harness follows the established patterns:
- Extends SkyComponentHarness
- Implements static hostSelector and with() method
- Uses private locators for internal element access
- Includes filter interfaces for harness filtering
- Includes comprehensive test files

Co-Authored-By: benc@cognition.ai <Benc@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

The test harnesses import from @angular/cdk/testing, so @angular/cdk
must be listed as a peer dependency in the library package.json files.

Co-Authored-By: benc@cognition.ai <Benc@windsurf.com>
Run dev:update-library-dependencies to update project.json files
with proper build inputs and dependencies for the new testing libraries.

Co-Authored-By: benc@cognition.ai <Benc@windsurf.com>
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.

0 participants