Skip to content

feat(components/grids): add test harness for grid component#9

Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1768232330-grids-test-harness
Open

feat(components/grids): add test harness for grid component#9
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1768232330-grids-test-harness

Conversation

@devin-ai-integration
Copy link
Copy Markdown

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

feat(components/grids): add test harness for grid component

Summary

Adds a comprehensive test harness for the @skyux/grids component, which was identified as a high-priority component lacking test harness support. The implementation follows established patterns from existing harnesses in the codebase (forms, indicators, lists).

The harness includes:

  • SkyGridHarness - Main harness extending SkyComponentHarness with methods for columns, rows, multiselect, highlighting, fit mode, and toolbar detection
  • SkyGridColumnHarness - Harness for column headers with sorting support
  • SkyGridRowHarness - Harness for rows with cell access, selection, and highlighting
  • Filter interfaces for all harnesses
  • Public API exports via @skyux/grids/testing
  • Comprehensive test suite

Updates since last revision

  • Added @angular/cdk as a peer dependency (required for CDK testing utilities used by the harness)
  • Updated project.json with testing module configuration via npm run dev:update-library-dependencies
  • CI checks now passing: Build, Lint, Code coverage, Check formatting, Check dependencies and resources

Review & Testing Checklist for Human

  • Verify CSS selectors match grid component - The harness uses selectors like sky-cmp-id, sky-grid-multiselect-selected-row, aria-current="true", sky-grid-fit, sky-grid-has-toolbar. Confirm these match the actual grid component implementation.
  • Test multiselect behavior - The select()/deselect() methods click the row element. Verify this correctly toggles selection.
  • Verify harness patterns match other SKY UX harnesses - Compare with @skyux/forms/testing or @skyux/indicators/testing for consistency.

Recommended test plan:

  1. Import @skyux/grids/testing in a consuming application and verify the harness works with actual grid components
  2. Test each harness method against a real grid to confirm behavior matches expectations

Notes

  • CI status: Build, lint, tests, and dependency checks all pass. The failing checks (risk labels, conventional-title, Percy e2e) are unrelated to this PR (repo config / missing auth tokens).
  • The grid component is deprecated (per its documentation), but the harness was requested for existing applications that still use it
  • Tests include 30+ test cases covering columns, rows, multiselect, highlighting, and grid properties

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

Add comprehensive test harness for @skyux/grids component including:
- SkyGridHarness for testing grid component
- SkyGridColumnHarness for testing grid columns
- SkyGridRowHarness for testing grid rows
- Filter interfaces for all harnesses
- Public API exports
- Path mapping in tsconfig.base.json
- Comprehensive test coverage

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

…tting

- Add @angular/cdk as peer dependency for test harness CDK imports
- Fix code formatting with Prettier

Co-Authored-By: benc@cognition.ai <Benc@windsurf.com>
…iguration

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