🌱 refactor: split DynamicCard.test.tsx into focused modules - #22826
🌱 refactor: split DynamicCard.test.tsx into focused modules#22826kubestellar-hive[bot] wants to merge 2 commits into
Conversation
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
🚫 Scanner Merge Guardrails: Rate Limit ExceededThis PR cannot be auto-merged because the scanner has already merged 5 PRs in the last hour. Rate Limit: 3 merges per hour Reason: This guardrail prevents rapid consecutive merges that can cause build instability. See issue #18218 for context. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
♿ Accessibility Audit (WCAG 2.1 AA)✅ No WCAG 2.1 AA violations detected in audited routes. Powered by axe-core. Target: WCAG 2.1 AA compliance. |
❌ Playwright Tests Failed📊 View Full ReportDownload the To view the report locally: # Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report |
🛑 Fix loop escalated — human attention neededThis PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it. Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate Raw failure evidence (from check-run annotations): Remove the |
fd3c2ec to
c492e53
Compare
/rebase🐝 Hive Agent: — hive: agent=scanner backend=copilot model=auto |
Split the 890-line DynamicCard.test.tsx into a reduced core file plus tier1, tier1.api, and tier2 modules (50 tests preserved, verified by count). Rebased onto main: dropped the AlertsContext, analytics, kubectlProxy, worker.module, and ModalRuntime portions of the original branch since main already contains equivalent splits of those files. Per-file imports trimmed to only what each split part uses. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
c492e53 to
72dd758
Compare
Extract feed state management from the 856-line RSSFeed.tsx into a useRSSFeed hook (RSSFeed.tsx now 395 lines) and add unit tests for the hook. Rebased onto main: dropped the AlertsContext, ModalRuntime, and DynamicCard portions of the original branch since main already contains equivalent splits (DynamicCard split continues in #22826). Removed an unused eslint-disable directive flagged by the lint ratchet. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Rebased onto main. This PR is now scoped to its titled purpose only: the DynamicCard.test.tsx split (890 -> 226 lines plus tier1, tier1.api, and tier2 modules; all 50 tests preserved). The AlertsContext, analytics, kubectlProxy, worker.module, and ModalRuntime portions were dropped because main already contains equivalent splits of those files. Per-file imports trimmed per the AGENTS.md split-refactor rules. |
Remove unused imports/helpers copied into each split part and add a justified eslint-disable for the verbatim-moved require() inside the hoisted vi.mock factory, per AGENTS.md split-refactor rules. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
❌ Playwright Tests Failed📊 View Full ReportDownload the To view the report locally: # Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report |
Extract feed state management from the 856-line RSSFeed.tsx into a useRSSFeed hook (RSSFeed.tsx now 395 lines) and add unit tests for the hook. Rebased onto main: dropped the AlertsContext, ModalRuntime, and DynamicCard portions of the original branch since main already contains equivalent splits (DynamicCard split continues in #22826). Removed an unused eslint-disable directive flagged by the lint ratchet. Signed-off-by: Andrew Anderson <andy@clubanderson.com> Co-authored-by: Andrew Anderson <andy@clubanderson.com>
❌ Playwright Tests Failed📊 View Full ReportDownload the To view the report locally: # Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report |
🛑 Fix loop escalated — human attention neededThis PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it. Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate Raw failure evidence (from check-run annotations): Remove the |
Fixes #22816
This PR splits the monolithic DynamicCard.test.tsx (890 lines) into three focused test modules:
DynamicCard.top-level.test.tsx (170 lines): Tests for the top-level DynamicCard component configuration validation and error handling
DynamicCard.tier1.test.tsx (456 lines): Tests for Tier1CardRuntime covering validation errors, static data rendering, search filters, stats layouts, badge formats, pagination, and API data fetching scenarios
DynamicCard.tier2.test.tsx (357 lines): Tests for Tier2CardRuntime covering compilation, component rendering, error handling, cleanup, and edge cases (Coverage Gap: DynamicCard Tier 2 Runtime Failure #5282 failure paths)
Changes
Test Status
No changes to test logic, only organization. All tests should continue to pass.
— hive: agent=scanner backend=copilot model=auto