Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

The CRT preset system was refactored from SMALL_WEBGL/LARGE_WEBGL to context-based naming (SMALL_VIDEO_WEBGL, LARGE_VIDEO_WEBGL, SMALL_IMAGE_WEBGL), and bloomEnabled was replaced with bloomIntensity. Tests were not updated to reflect these changes, causing 49 failures across infrastructure, player, and UI component features.

Changes

Infrastructure - CRT Storage Service (22 tests)

  • Added missing ALERT_SERVICE dependency injection using TestBed
  • Injected mock IAlertService provider to satisfy service constructor requirements

Infrastructure - CRT Validation (8 tests)

  • Updated error message expectations: now includes "periods, and underscores"
  • Changed underscore test from rejection to acceptance (validation now allows underscores)
  • Replaced deprecated preset keys with context-based equivalents:
    • small-webglsmall-video-webgl
    • large-webgllarge-video-webgl

Player Features (14 tests)

  • Updated preset key references to match new naming:
    • File image component: SMALL_WEBGLSMALL_IMAGE_WEBGL
    • Video components: SMALL_WEBGLSMALL_VIDEO_WEBGL, LARGE_WEBGLLARGE_VIDEO_WEBGL
  • Replaced bloomEnabled: false assertions with bloomIntensity: 0 (or 0.3 for LARGE_VIDEO_WEBGL)

Example change:

// Before
expect(settings.bloomEnabled).toBe(false);
component.onCrtPresetSelected(CRT_PRESET_KEYS.SMALL_WEBGL);

// After
expect(settings.bloomIntensity).toBe(0);
component.onCrtPresetSelected(CRT_PRESET_KEYS.SMALL_VIDEO_WEBGL);

UI Components - Dialog Rendering (5 tests)

  • Fixed dialog component queries in crt-settings-panel.component.spec.ts
  • Issue: Tests were querying fixture.nativeElement for dialog components that are rendered in CDK overlay container
  • Root Cause: Dialogs are rendered at document body level via Angular CDK Overlay, not in component's DOM tree
  • Fix: Changed all queries from fixture.nativeElement.querySelector() to document.querySelector('.cdk-overlay-container')

Test Results

  • Infrastructure: 264 passed, 0 failed (was 30 failed)
  • Player: 587 passed, 0 failed (was 14 failed)
  • UI Components: 95 passed, 0 failed (was 5 failed)
  • Total: All 49 test failures resolved
Original prompt

read the @docs\test-repair-reports\test-baseline-2025-12-18.md report and let's fix all the associated tests. Please make sure to check for TS errors and lint when doing repairs.

Created from Copilot CLI via the copilot delegate command.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 18, 2025 22:55
…ow passing

Co-authored-by: MetalHexx <9291740+MetalHexx@users.noreply.github.com>
…Intensity

Co-authored-by: MetalHexx <9291740+MetalHexx@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix tests based on test baseline report Fix CRT preset test failures after refactoring to context-based naming Dec 18, 2025
Copilot AI requested a review from MetalHexx December 18, 2025 23:07
@MetalHexx
Copy link
Owner

@copilot I want all tests repaired please. I see youleft 5 tests still failing.

Co-authored-by: MetalHexx <9291740+MetalHexx@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot I want all tests repaired please. I see youleft 5 tests still failing.

All 5 remaining tests have been fixed in commit ba3454f. The issue was that the dialog components are rendered in a CDK overlay container at the document body level, but the tests were incorrectly querying fixture.nativeElement. I updated all 5 tests to query document.querySelector('.cdk-overlay-container') instead.

All 49 originally failing tests are now passing:

  • Infrastructure: 264 passed ✅
  • Player: 587 passed ✅
  • UI Components: 95 passed ✅
  • Total: 2810 passed | 8 skipped | 0 failed

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node node index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@MetalHexx MetalHexx marked this pull request as ready for review December 19, 2025 00:16
Copilot AI review requested due to automatic review settings December 19, 2025 00:16
@MetalHexx MetalHexx merged commit 8f90127 into main Dec 19, 2025
6 checks passed
@MetalHexx MetalHexx deleted the copilot/striped-peacock branch December 19, 2025 00:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR successfully fixes 49 test failures caused by the CRT preset system refactoring from legacy naming (SMALL_WEBGL/LARGE_WEBGL) to context-based naming (SMALL_VIDEO_WEBGL, LARGE_VIDEO_WEBGL, SMALL_IMAGE_WEBGL) and the replacement of bloomEnabled with bloomIntensity. The changes comprehensively update test files across infrastructure, player features, and UI components to align with the new CRT preset architecture.

Key Changes:

  • Updated test mocks and expectations to use new context-based preset keys (e.g., SMALL_VIDEO_WEBGL instead of SMALL_WEBGL)
  • Fixed validation test expectations for the expanded character set (now allows underscores and periods)
  • Replaced bloomEnabled assertions with bloomIntensity values (0 for compact displays, 0.3 for fullscreen)
  • Added missing ALERT_SERVICE dependency injection in CRT storage service tests
  • Corrected Angular CDK dialog component queries from fixture.nativeElement to document.querySelector('.cdk-overlay-container') to properly access overlay-rendered dialogs

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crt-settings-panel.component.spec.ts Fixed 5 dialog component queries to use CDK overlay container instead of fixture.nativeElement, resolving test failures for dialog rendering verification
crt-validation.spec.ts Updated 8 validation tests: corrected error message to include "periods, and underscores", changed underscore test from rejection to acceptance, updated reserved preset names to context-based format
crt-storage.service.spec.ts Added TestBed configuration with mock IAlertService provider to satisfy constructor dependency injection requirements, fixing 22 test failures
video-dialog.component.spec.ts Updated 8 tests to use LARGE_VIDEO_WEBGL preset key and verify bloomIntensity: 0.3 instead of bloomEnabled: false
video-capture.component.spec.ts Updated 2 tests to use SMALL_VIDEO_WEBGL preset key and verify bloomIntensity: 0 for compact video display
file-image.component.spec.ts Updated 2 tests to use SMALL_IMAGE_WEBGL preset key and verify bloomIntensity: 0 for static image display
test-baseline-2025-12-18.md Added comprehensive test failure analysis report documenting the 49 test failures and repair strategy
TEST_BASELINE_REPORT_2025-12-02.md Removed outdated test baseline report from December 2nd

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants