test: regression coverage for favicon mask-icon and error handler fallbacks#2809
Draft
cursor[bot] wants to merge 2 commits into
Draft
test: regression coverage for favicon mask-icon and error handler fallbacks#2809cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
- Unit + integration tests for Safari mask-icon exclusion in getFaviconList - History and new-tab error listener edge cases matching onboarding coverage
Contributor
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/cursor/test-coverage-automation-b7a5")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/cursor/test-coverage-automation-b7a5
git -C submodules/content-scope-scripts checkout origin/pr-releases/cursor/test-coverage-automation-b7a5Pin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "c5880b591ff25ce22220ada257a11071bbaa12c2")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/cursor/test-coverage-automation-b7a5
git -C submodules/content-scope-scripts checkout c5880b591ff25ce22220ada257a11071bbaa12c2 |
Contributor
[Beta] Generated file diffTime updated: Mon, 29 Jun 2026 08:08:17 GMT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Asana Task/Github Issue: Test coverage automation (cron)
Description
Adds missing regression tests for two recently merged production changes:
Favicon mask-icon exclusion (Exclude Safari mask-icon links from favicon collection #2772) — The dedicated unit test was removed during review with the assumption integration tests already covered
getFaviconList, but no test asserted Safarirel="mask-icon"links are excluded. This PR adds unit tests (jsdom) and an integration test with mask-icon fixtures.Special-pages error handler fallbacks (Fall back to ErrorEvent.message in special-pages error handlers #2714) — Production handlers in history and new-tab were updated alongside onboarding, but only onboarding received integration coverage for cross-origin
ErrorEvent.messagefallback, unknown-error fallback, non-Error throws, and primitive rejection reasons. This PR brings history and new-tab to parity.Risky behavior now covered
mask-icon/MASK-ICONlinks are excluded from favicon collection while real SVG favicons remainevent.messageinstead of[uncaught] unknown errorundefined,null,0) report distinct messages instead of bucketing to a generic unknownTest files added/updated
injected/unit-test/favicon.spec.js(new)injected/integration-test/favicon.spec.jsinjected/integration-test/test-pages/favicon/svg-test.html+ mask-icon SVG fixturesspecial-pages/pages/history/integration-tests/history.spec.jsspecial-pages/pages/new-tab/integration-tests/new-tab.spec.jsWhy these tests materially reduce regression risk
m_mac_onboarding_exception-reported); history/new-tab share identical handler logic and would silently regress without page-specific testsTesting Steps
cd injected && npx jasmine unit-test/favicon.spec.jscd injected && npm run test-int -- favicon.spec.js --grep "mask-icon" --reporter listcd special-pages && npm run test-int -- pages/history/integration-tests/history.spec.js --grep "global error listeners" --reporter listcd special-pages && npm run test-int -- pages/new-tab/integration-tests/new-tab.spec.js --grep "global error listeners" --reporter listChecklist