-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfe6c77
commit fa95e54
Showing
2 changed files
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './click'; | ||
export * from './reload'; | ||
export * from './type'; | ||
export * from './visit'; | ||
export * from './wait'; |
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,31 @@ | ||
import { When } from '@badeball/cypress-cucumber-preprocessor'; | ||
|
||
import { getCypressElement } from '../utils'; | ||
|
||
/** | ||
* When I type: | ||
* | ||
* ```gherkin | ||
* When I type {string} | ||
* ``` | ||
* | ||
* @example | ||
* | ||
* ```gherkin | ||
* When I type "Hello, world!" | ||
* ``` | ||
* | ||
* @remarks | ||
* | ||
* This requires a preceding step like query {@link When_I_get_element_by_label_text | "When I get element by label text"}. E.g.: | ||
* | ||
* ```gherkin | ||
* When I get element by label text "Email" | ||
* And I type "user@example.com" | ||
* ``` | ||
*/ | ||
export function When_I_type(text: string) { | ||
getCypressElement(this).type(text); | ||
} | ||
|
||
When('I type {string}', When_I_type); |