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

chore: Export act from utils #62

Merged
merged 3 commits into from
Jul 25, 2024
Merged

Conversation

georgylobko
Copy link
Contributor

Issue #, if available:

Description of changes:

After exporting act from DOM utils, it turns out that after rewriting the import path from @cloudscape-design/.../dom to @cloudscape-design/.../selectors, act remains in the import statement, which is not expected.

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

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.60%. Comparing base (7c63f39) to head (78084f2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files           5        5           
  Lines         266      266           
  Branches       58       58           
=======================================
  Hits          249      249           
  Misses         17       17           

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

@just-boris
Copy link
Member

Or you could export act from @cloudscape-design/test-utils-core/utils and avoid this dom/selectors duality

@georgylobko
Copy link
Contributor Author

Or you could export act from @cloudscape-design/test-utils-core/utils and avoid this dom/selectors duality

I considered this option, but decided to keep there, because act belongs to dom operations.

@just-boris
Copy link
Member

just-boris commented Jul 25, 2024

Manipulating source code is more hacky operation than using a different file for import.

One may also argue utils.ts is a good place for dom operations, because KeyCode is already there and it is a DOM operation too:

export enum KeyCode {

@georgylobko georgylobko marked this pull request as ready for review July 25, 2024 13:23
@georgylobko georgylobko requested a review from a team as a code owner July 25, 2024 13:23
@georgylobko georgylobko changed the title chore: Exclude act from selectors chore: Export act from utils Jul 25, 2024
@georgylobko georgylobko merged commit c19106e into main Jul 25, 2024
31 checks passed
@georgylobko georgylobko deleted the fix/exclude-act-from-selectors branch July 25, 2024 13:50
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