-
-
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.
feat(assertions): add "Then I see element exists"
- Loading branch information
1 parent
d2bb40b
commit 2c78e9d
Showing
2 changed files
with
34 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Then } from '@badeball/cypress-cucumber-preprocessor'; | ||
|
||
import { getCypressElement } from '../utils'; | ||
|
||
/** | ||
* Then I see element exists: | ||
* | ||
* ```gherkin | ||
* Then I see element exists | ||
* ``` | ||
* | ||
* Assert element **_exists_** in the screen. | ||
* | ||
* @example | ||
* | ||
* ```gherkin | ||
* Then I see element exists | ||
* ``` | ||
* | ||
* @remarks | ||
* | ||
* A preceding step like {@link When_I_find_element_by_text | "When I find element by text"} is required. For example: | ||
* | ||
* ```gherkin | ||
* When I find element by text "Text" | ||
* Then I see element exists | ||
* ``` | ||
*/ | ||
export function Then_I_see_element_exists() { | ||
getCypressElement().should('exist'); | ||
} | ||
|
||
Then('I see element exists', Then_I_see_element_exists); |
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