Skip to content

Conversation

@noisysocks
Copy link
Contributor

@noisysocks noisysocks commented Dec 10, 2025

Asana Task/Github Issue:

Description

Expands the NTP screenshot tests to cover more states. That way we can be more confident that #2095 isn’t breaking anything.

Testing Steps

n/a

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Greatly expands NTP screenshot coverage, makes omnibar visible by default (hide with omnibar=false), adds array query param support, and updates tests/config accordingly.

  • Screenshots/Tests:
    • Expand NTP screenshots to cover: omnibar (search/AI states, suggestions, focus, overflow, customize popover), customizer drawer (AI enabled/disabled/hidden setting), favorites (many collapsed/expanded, single, empty), privacy stats (few, cpm), activity (default/empty), update notification (empty/populated), RMF (small/medium/big variants), next steps (two cards), freemium PIR banner (onboarding/scan results), subscription winback (last day).
    • Update/rename screenshots accordingly and remove old omnibar "omnibar=true"-dependent suite.
  • Playwright config:
    • Move NTP screenshots into dedicated projects: ntp-screenshots-light and ntp-screenshots-dark with set viewport and color scheme.
  • Mock/Initialization:
    • Change initialSetup to include omnibar by default; only omit when omnibar='false'.
  • Test helpers:
    • NewtabPage.openPage supports array values in additional (appends multiple params).
  • Integration tests:
    • Update expectations to include omnibar in widgets_setConfig and context menu.
    • Adjust favorites tests to pass omnibar: 'false' where needed for deterministic focus order.

Written by Cursor Bugbot for commit 5943ec7. This will update automatically on new commits. Configure here.

@noisysocks noisysocks requested review from a team, mgurgel and shakyShane as code owners December 10, 2025 02:17
@noisysocks noisysocks added the tests Add or improve existing tests label Dec 10, 2025
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 5943ec7
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/693a6c52f08b7c27b0adf0c0
😎 Deploy Preview https://deploy-preview-2096--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@noisysocks noisysocks changed the title Randerson/expand screenshot tests NTP: Expand screenshot tests Dec 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

[Beta] Generated file diff

Time updated: Wed, 10 Dec 2025 22:42:35 GMT

Integration
    - integration/pages/new-tab/dist/index.js

File has changed

@noisysocks noisysocks mentioned this pull request Dec 10, 2025
8 tasks
@noisysocks

This comment was marked as outdated.

@cursor

This comment was marked as outdated.

@cursor
Copy link

cursor bot commented Dec 10, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@noisysocks

This comment was marked as outdated.

@cursor

This comment was marked as outdated.

Copy link
Contributor

@shakyShane shakyShane left a comment

Choose a reason for hiding this comment

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

@noisysocks thanks for this!

I agree we should increase the coverage - but my request is that we optimise the approach for future debugging/changes instead. I think in this case we should use playwrights projects/fixtures support to avoid the forEach calls in the code.

Tests are the place I don’t want to be DRY, I want debugging super powers instead.

That might mean setting up a project for light screenshots, and then dark etc. I’m not sure exactly on how to solve this, but anything that removes the loops will work.

@noisysocks noisysocks force-pushed the randerson/expand-screenshot-tests branch from 0d57b20 to 13605b5 Compare December 10, 2025 08:49
@noisysocks noisysocks added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 90afa36 Dec 11, 2025
18 checks passed
@noisysocks noisysocks deleted the randerson/expand-screenshot-tests branch December 11, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Add or improve existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants