-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding 2 more definitions and correcting mistakes.
- Loading branch information
1 parent
300aa77
commit a26f85c
Showing
5 changed files
with
57 additions
and
3 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
26 changes: 26 additions & 0 deletions
26
cypress/tests/common/set_email_at_label_STRING_to_STRING.js
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,26 @@ | ||
import {Given, When, Then, And} from "cypress-cucumber-preprocessor/steps"; | ||
|
||
Given(`Set email at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("input[type='email']").type(v2) | ||
}) | ||
}); | ||
|
||
When(`Set email at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("input[type='email']").type(v2) | ||
}) | ||
}); | ||
|
||
Then(`Set email at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("input[type='email']").type(v2) | ||
}) | ||
}); | ||
|
||
And(`Set email at label {string} to {string}`, (v1, v2) => { | ||
cy.get("div").contains(v1).parent().within(() => { | ||
cy.get("input[type='email']").type(v2) | ||
}) | ||
}); | ||
|
26 changes: 26 additions & 0 deletions
26
cypress/tests/common/set_textarea_at_label_STRING_to_STRING.js
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,26 @@ | ||
import {Given, When, Then, And} from "cypress-cucumber-preprocessor/steps"; | ||
|
||
Given(`Set textarea at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("textarea").type(v2) | ||
}) | ||
}); | ||
|
||
When(`Set textarea at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("textarea").type(v2) | ||
}) | ||
}); | ||
|
||
Then(`Set textarea at label {string} to {string}`, (v1, v2) => { | ||
cy.get("body").contains(v1).parent().within(() => { | ||
cy.get("textarea").type(v2) | ||
}) | ||
}); | ||
|
||
And(`Set textarea at label {string} to {string}`, (v1, v2) => { | ||
cy.get("div").contains(v1).parent().within(() => { | ||
cy.get("textarea']").type(v2) | ||
}) | ||
}); | ||
|
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
|
||
Scenario: Testing the bootstrap components | ||
Given I am on "https://getbootstrap.com/docs/5.0/forms/form-control/" page | ||
Then Set input at label "Email address" to "[email protected]" | ||
Then Set input at label "Example textaera" to "Lorem ipsum." | ||
Then Set email at label "Email address" to "[email protected]" | ||
Then Set textarea at label "Example textarea" to "Lorem ipsum." |
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