Last active
August 24, 2018 10:20
-
-
Save jimode/e23cbe1fb1ac74626ef2b4ffc4e87239 to your computer and use it in GitHub Desktop.
checking list of elements using tables
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
Then(/^I should see the following dropdown options$/, (table) => { | |
const expectedOptions = [].concat(...table.raw()); // this array is from the table in the scenario | |
const availableOptions = PaymentDetailsFormComponent.billingCountryOptions // this array will come from the collection of DOM elements | |
.map(option => option.getText()); | |
expect(availableOptions).to.deep.eq(expectedOptions); | |
}); |
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
Scenario: Display of billing country dropdown | |
# ... | |
And the billing country dropdown should be displayed | |
And I should see the following dropdown options | |
| Please select option | | |
| Germany | | |
| Austria | | |
| Switzerland | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment