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

PER-9881: The location picker never closes #476

Merged
merged 8 commits into from
Oct 25, 2024

Conversation

crisnicandrei
Copy link
Contributor

Change the focus event to keydown event so the location picker closes when the user presses done.

Steps to test:

Open the location picker and select a location, then click done.
The location picker should close

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.47%. Comparing base (6b2e6b1) to head (e307391).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #476      +/-   ##
==========================================
+ Coverage   42.10%   42.47%   +0.37%     
==========================================
  Files         354      354              
  Lines       10952    10954       +2     
  Branches     1788     1789       +1     
==========================================
+ Hits         4611     4653      +42     
+ Misses       6190     6141      -49     
- Partials      151      160       +9     

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

Comment on lines +171 to +176
onLocationEnterPress(e: KeyboardEvent): void {
if (this.canEdit && e.key === 'Enter') {
this.editService.openLocationDialog(this.selectedItem);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you cover this function with some basic tests? You do not need to cover the rest of the component for now.

@crisnicandrei
Copy link
Contributor Author

@meisekimiu it seems codecov still isn't happy, but i will add the other tests myself. Thank you for your help on that one!😄

crisnicandrei and others added 7 commits October 23, 2024 13:49
Change the focus event to keydown event so the location picker closes when the user presses done.
A Pipe was being mocked by shallow-render when we didn't want it to be.
Add a `dontMock` section with the `asRecord` pipe provided. Also add a
null check to `selectedItem.FileVOs`, which seemed to be triggering
issues in tests. Clean up some of the code formatting and unnecessary
lines in the SidebarComponent tests while we're there.
@crisnicandrei crisnicandrei force-pushed the PER-9881-the-location-picker-never-closes branch from afbbc8a to d074975 Compare October 23, 2024 10:49
Copy link

@yeslikesolo yeslikesolo left a comment

Choose a reason for hiding this comment

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

Everything works great!

@crisnicandrei crisnicandrei merged commit 8047b20 into main Oct 25, 2024
8 checks passed
@crisnicandrei crisnicandrei deleted the PER-9881-the-location-picker-never-closes branch October 25, 2024 07:32
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.

3 participants