-
-
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 link"
- Loading branch information
1 parent
afb5974
commit 278a44c
Showing
3 changed files
with
33 additions
and
7 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 './element'; | ||
export * from './hash'; | ||
export * from './link'; | ||
export * from './text'; | ||
export * from './url'; |
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,28 @@ | ||
import { Then } from '@badeball/cypress-cucumber-preprocessor'; | ||
|
||
/** | ||
* Then I see link: | ||
* | ||
* ```gherkin | ||
* Then I see link {string} | ||
* ``` | ||
* | ||
* @example | ||
* | ||
* ```gherkin | ||
* Then I see link "Hello, world!" | ||
* ``` | ||
* | ||
* @remarks | ||
* | ||
* This asserts that a link with text **_exists_** and is **_visible_** in the screen. | ||
* | ||
* @see | ||
* | ||
* - {@link Then_I_see_text | Then I see text} | ||
*/ | ||
export function Then_I_see_link(text: string) { | ||
cy.contains('a', text).should('exist').and('be.visible'); | ||
} | ||
|
||
Then('I see link {string}', Then_I_see_link); |
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