Skip to content

Add CI test job for PRs; fix edit-cue provider injection, disc.spec popup, persistence timing#199

Open
Copilot wants to merge 5 commits into
masterfrom
copilot/code-review-suggestions
Open

Add CI test job for PRs; fix edit-cue provider injection, disc.spec popup, persistence timing#199
Copilot wants to merge 5 commits into
masterfrom
copilot/code-review-suggestions

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 18, 2026

Tests were not gated on PRs, and two spec failures were blocking local test runs: a missing DI provider in edit-cue.component.spec.ts and Karma hanging in disc.spec.ts due to circular-reference serialization.

GitHub Actions

  • Extracted a new test job that runs on both push and pull_request (main/master), making it a required PR check
  • build (deploy to gh-pages) now needs: test and only runs on push

edit-cue.component.spec.ts — NG0201 + Karma popup

  • The spec imported providers from app.module but defined its own inline array without GapiClientService → replaced with providers: providers
  • Added spyOn(window, 'alert') before fixture.detectChanges(): ngOnInit() calls alert() synchronously when no id URL param is present, blocking Chrome in non-headless mode

disc.spec.ts — Karma freeze on circular object comparison

  • Changed toEqualtoBe for Disc.Track / Disc.File identity assertions in the remove test
  • Jasmine's pretty-printer recurses infinitely through track → file → disc → files → track when a toEqual fails, hanging the browser

persistence.spec.ts — intermittent reverse-sync failure

  • discV1 and discV2 were saved within the same millisecond; equal lastmod caused sync to pick the wrong version via syncCommonDisc
  • Added await new Promise(r => setTimeout(r, 1)) between the two saves to guarantee a strictly later timestamp

PromiseRetry.spec.ts + generate-dot-env.ts

  • .then(done).then(() => done()) — same Jasmine 5 fix previously applied to LocalAndDistantPersistence.spec.ts
  • GOOGLE_API_KEY || '' fallback in generate-dot-env.ts: without it, an unset key omits the JSON field, environment-with-dot-env.ts throws in afterAll, and ng test exits with code 1

Net result: 81 tests pass (was 72 — EditCueComponent was silently excluded), exit code 0.

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:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • clientservices.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • www.google-analytics.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/ng test --watch=false --browsers=ChromeHeadlessCI (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/ng test --watch=false --browsers=ChromeHeadlessCI --include=src/app/edit-cue/**/*.spec.ts (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/ng test --watch=false --browsers=ChromeHeadlessCI --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=58659919 --headless --disable-gpu --disable-dev-shm-usage (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4551 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-23048408 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17698720543109095867,3431642268360058015,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-23048408 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=23048408 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4705 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-50519120 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5052830694406610612,5289563395826748463,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • www.youtube.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=7472 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-51663937 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9424112755952267866,570849751029864150,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-51663937 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage http://localhost:9876/?id=51663937 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=8200 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-67747167 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10038901534273585361,3152249369383232032,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)

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


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 2 commits March 18, 2026 15:53
Co-authored-by: Bludwarf <6860189+Bludwarf@users.noreply.github.com>
…t compat; code quality improvements

- Fix Disc.File.newTrack(): use global track count (preceding files + current) for correct track number instead of file-local count, fixing tracks in multi-file discs getting wrong numbers
- Fix Disc.File.remove(): loop started at file index instead of first-following-track index, and incorrectly modified file-local track.index; now only decrements global track.number for tracks in following files
- Fix LocalAndDistantPersistence.spec.ts: replace .catch(done) with .catch(() => done()) to be compatible with Jasmine 5 where done(arg) is treated as test failure
- Fix missing semicolons in Collection.ts pushDiscs/pushDiscIds
- Improve yt-helper.ts: use const/single-quotes consistent with project style

Co-authored-by: Bludwarf <6860189+Bludwarf@users.noreply.github.com>
Copilot AI changed the title [WIP] Propose code corrections and improvements Fix track numbering and file removal bugs; Jasmine 5 test compatibility Mar 18, 2026
Copilot AI requested a review from Bludwarf March 18, 2026 16:00
@Bludwarf Bludwarf marked this pull request as ready for review March 18, 2026 16:10
Copilot AI and others added 2 commits March 18, 2026 16:54
Co-authored-by: Bludwarf <6860189+Bludwarf@users.noreply.github.com>
… toBe; persistence timing; promiseRetry done()

- .github/workflows/main.yml: add pull_request trigger, separate test job (runs on push+PR) and build job (push only, depends on test)
- edit-cue.component.spec.ts: use providers from app.module (fixes NG0201 for GapiClientService) and add spyOn(window, 'alert') to prevent ngOnInit popup blocking tests
- disc.spec.ts: change toEqual → toBe for track/file identity comparisons in the remove test (prevents Jasmine deep-printer circular-reference hang)
- persistence.spec.ts: add 1ms delay between discV1 and discV2 saves in testSync to ensure strictly-later lastmod, fixing intermittent reverse-sync timing failure
- PromiseRetry.spec.ts: .then(done) → .then(() => done()) for Jasmine 5 compatibility
- generate-dot-env.ts: use fallback '' for GOOGLE_API_KEY when not set, preventing afterAll error and exit code 1 in CI

Co-authored-by: Bludwarf <6860189+Bludwarf@users.noreply.github.com>
Copilot AI changed the title Fix track numbering and file removal bugs; Jasmine 5 test compatibility Add CI test job for PRs; fix edit-cue provider injection, disc.spec popup, persistence timing Mar 18, 2026
@Bludwarf Bludwarf force-pushed the master branch 6 times, most recently from bf51510 to a84ac62 Compare April 18, 2026 09:07
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