Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history: default to an empty query when 'all' is selected #1472

Merged

Conversation

shakyShane
Copy link
Contributor

@shakyShane shakyShane commented Feb 10, 2025

Asana Task/Github Issue: https://app.asana.com/0/1201141132935289/1209364150538084

Description

  • The tests show the functionality, but in short: any click on 'All' (left sidebar) should issue an empty query - it's the equivalent of removing all state
  • This project is very much WIP (eg: not used in production), so many of the features I'm adding are not complete, but I'm adding E2E tests for everything to make future refactoring simple :)

Testing Steps

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

Copy link

netlify bot commented Feb 10, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit e46f0df
🔍 Latest deploy log https://app.netlify.com/sites/content-scope-scripts/deploys/67a9d7555808a00008d563a3
😎 Deploy Preview https://deploy-preview-1472--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 site configuration.

@shakyShane
Copy link
Contributor Author

shakyShane commented Feb 10, 2025

Copy link

github-actions bot commented Feb 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.

Copy link

github-actions bot commented Feb 10, 2025

[Beta] Generated file diff

Time updated: Mon, 10 Feb 2025 10:43:28 GMT

Integration
    - integration/pages/history/dist/index.js
  • integration/pages/history/locales/en/history.json

File has changed

Windows
    - windows/pages/history/dist/index.js
  • windows/pages/history/locales/en/history.json

File has changed

Apple
    - dist/pages/history/dist/index.js
  • dist/pages/history/locales/en/history.json

File has changed

@shakyShane shakyShane marked this pull request as ready for review February 10, 2025 10:42
@shakyShane shakyShane requested review from mgurgel and a team as code owners February 10, 2025 10:42
Comment on lines +75 to 87
test('selecting `all` resets to an empty query', async ({ page }, workerInfo) => {
const hp = HistoryTestPage.create(page, workerInfo).withEntries(300);
await hp.openPage({});

// start with a fresh range query
await hp.selectsRange('today');
await hp.selectsToday();
await hp.didMakeNthQuery({ nth: 1, query: { range: 'today' } });

// click 'all' (to reset)
await hp.selectsRange('all');
await hp.selectsAll();

// ensure it's a full reset
await hp.didMakeNthQuery({ nth: 2, query: { term: '' } });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was skipped before, but is now passing :)

@shakyShane shakyShane changed the title ntp: default to an empty query when 'all' is selected history: default to an empty query when 'all' is selected Feb 10, 2025
@shakyShane shakyShane merged commit 2ad8273 into main Feb 11, 2025
23 checks passed
@shakyShane shakyShane deleted the 02-10-ntp_default_to_an_empty_query_when_all_is_selected branch February 11, 2025 09:56
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