-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add the capability to reload the current search
- Loading branch information
1 parent
2d93900
commit ab634d0
Showing
6 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 @@ | ||
Feature: Reload search | ||
|
||
Background: | ||
Given a results API with 24 results | ||
And a tracking API with a known response | ||
And no special config for layout view | ||
|
||
Scenario Outline: 1. Search is reloaded when event is emitted | ||
When start button is clicked | ||
Then empathize should be visible | ||
When "<query>" is searched | ||
Then results page number 1 is loaded | ||
And search request contains parameter "query" with value "<query>" | ||
When event ReloadSearchRequested is emitted | ||
Then search request contains parameter "query" with value "<query>" | ||
|
||
Examples: | ||
| query | | ||
| lego | |
6 changes: 6 additions & 0 deletions
6
packages/x-components/tests/e2e/reload-search/reload-search.spec.ts
This file contains 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,6 @@ | ||
import { When } from '@badeball/cypress-cucumber-preprocessor'; | ||
|
||
When('event ReloadSearchRequested is emitted', () => { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call | ||
cy.window().then((w: Window) => w.InterfaceX?.bus.emit('ReloadSearchRequested')); | ||
}); |