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

fix: Make sure clearVisualRefreshState helper removes the class too #118

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

just-boris
Copy link
Member

Issue #, if available:

Description of changes:

This utility should live the pristine state

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@just-boris just-boris requested a review from a team as a code owner February 11, 2025 11:35
@just-boris just-boris requested review from johannes-weber and removed request for a team February 11, 2025 11:35
@@ -18,8 +18,10 @@ describe('useVisualRefresh', () => {
return <div data-testid="current-mode">{isRefresh.toString()}</div>;
}

beforeEach(() => clearVisualRefreshState());
afterEach(() => document.body.classList.remove('awsui-visual-refresh'));
Copy link
Member Author

Choose a reason for hiding this comment

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

Why was this not captured before – we cleaned it up in the unit tests manually

When I tried to use this utility in cloudscape-design/components, I found that it does not reset to classic properly

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.30%. Comparing base (9b48c5e) to head (a660a1d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   99.30%   99.30%           
=======================================
  Files          29       29           
  Lines         715      717    +2     
  Branches      194      187    -7     
=======================================
+ Hits          710      712    +2     
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@just-boris just-boris changed the title npm fix: Make sure clearVisualRefreshState helper removes the class too fix: Make sure clearVisualRefreshState helper removes the class too Feb 11, 2025
@just-boris just-boris added this pull request to the merge queue Feb 11, 2025
Merged via the queue into main with commit a0d2bc6 Feb 11, 2025
36 of 37 checks passed
@just-boris just-boris deleted the vr-cleanup branch February 11, 2025 12:58
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