-
Notifications
You must be signed in to change notification settings - Fork 39
fix(atomic): don't redirect when hovering a instant result & pressing Enter #4938
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7957507
fix(atomic): don't redirect when hovering a instant result & pressing…
alexprudhomme 5b7f685
add specs
alexprudhomme 6b083e4
more specs for commerce
alexprudhomme 87f50d5
Add jiras
alexprudhomme a060bc9
remove bug
alexprudhomme f1d6019
better tests
alexprudhomme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...mic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
alexprudhomme marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| //https://coveord.atlassian.net/browse/KIT-3955 | ||
| describe('AtomicCommerceSearchBox', () => { | ||
| describe('with instant products & suggestions', () => { | ||
| describe('when using keyboard navigation', () => { | ||
| test('should be able to navigate from the suggestions to the instant results and vice-versa', async () => {}); | ||
| test('should execute the search after pressing "Enter" on a suggestion', async () => {}); | ||
| test('should redirect to the result page after pressing "Enter" on an instant result', async () => {}); | ||
| }); | ||
|
|
||
| describe('when typing and then hovering a suggestion', () => { | ||
| test('should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
alexprudhomme marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| //https://coveord.atlassian.net/browse/KIT-3957 | ||
| describe('AtomicCommerceSearchBoxInstantProducts', () => { | ||
| describe('when clicking', () => { | ||
| test('on a instant product, it should redirect to the product page', async () => {}); | ||
| test('on the "See all products" button, it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('on instant products, it should redirect to the product page', async () => {}); | ||
| test('on the "See all products" button, it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new product', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); | ||
18 changes: 18 additions & 0 deletions
18
...ommerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
alexprudhomme marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| //https://coveord.atlassian.net/browse/KIT-3956 | ||
| describe('AtomicCommerceSearchBoxQuerySuggestions', () => { | ||
| describe('when clicking', () => { | ||
| test('it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('it should reflect the proper suggestion in the search box', async () => {}); | ||
| test('it should execute the proper search after pressing "Enter"', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new suggestion', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); | ||
20 changes: 20 additions & 0 deletions
20
...omic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
alexprudhomme marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| //https://coveord.atlassian.net/browse/KIT-3958 | ||
| describe('AtomicCommerceSearchBoxRecentQueries', () => { | ||
| describe('when clicking', () => { | ||
| test('on a recent query, it should execute the proper search', async () => {}); | ||
| test('on the "Clear" button, it should clear the recent queries', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('on recent queries, it should reflect the proper query in the search box', async () => {}); | ||
| test('on recent queries, it should execute the proper search', async () => {}); | ||
| test('on the "Clear" button, it should clear the recent queries ', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new recent query', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/atomic/src/components/search/atomic-search-box/atomic-search-box.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
| describe('AtomicSearchBox', () => { | ||
| describe('with instant results & suggestions', () => { | ||
| describe('when using keyboard navigation', () => { | ||
| test('should be able to navigate from the suggestions to the instant results and vice-versa', async () => {}); | ||
| test('should execute the search after pressing "Enter" on a suggestion', async () => {}); | ||
| test('should redirect to the result page after pressing "Enter" on an instant result', async () => {}); | ||
| }); | ||
|
|
||
| describe('when typing and then hovering a suggestion', () => { | ||
| test('should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...x-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
| describe('AtomicSearchBoxInstantResults', () => { | ||
| describe('when clicking', () => { | ||
| test('on a instant result, it should redirect to the result page', async () => {}); | ||
| test('on the "See all results" button, it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('on instant results, it should redirect to the result page', async () => {}); | ||
| test('on the "See all results" button, it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new result', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); |
17 changes: 17 additions & 0 deletions
17
...ggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
| describe('AtomicSearchBoxQuerySuggestions', () => { | ||
| describe('when clicking', () => { | ||
| test('it should execute the proper search', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('it should reflect the proper suggestion in the search box', async () => {}); | ||
| test('it should execute the proper search after pressing "Enter"', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new suggestion', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); |
19 changes: 19 additions & 0 deletions
19
...box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import {describe, test} from 'vitest'; | ||
|
|
||
| //TODO: Write those tests during the lit migration | ||
| describe('AtomicSearchBoxRecentQueries', () => { | ||
| describe('when clicking', () => { | ||
| test('on a recent query, it should execute the proper search', async () => {}); | ||
| test('on the "Clear" button, it should clear the recent queries', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation', () => { | ||
| test('on recent queries, it should reflect the proper query in the search box', async () => {}); | ||
| test('on recent queries, it should execute the proper search', async () => {}); | ||
| test('on the "Clear" button, it should clear the recent queries ', async () => {}); | ||
| }); | ||
|
|
||
| describe('when using keyboard navigation and then switching to mouse and hovering a new recent query', () => { | ||
| test('it should execute the search reflected in the search box', () => {}); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.