diff options
Diffstat (limited to 'vid-webpack-master/cypress/support/elements/element.select.actions.ts')
-rw-r--r-- | vid-webpack-master/cypress/support/elements/element.select.actions.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/elements/element.select.actions.ts b/vid-webpack-master/cypress/support/elements/element.select.actions.ts new file mode 100644 index 000000000..452323d3d --- /dev/null +++ b/vid-webpack-master/cypress/support/elements/element.select.actions.ts @@ -0,0 +1,16 @@ +declare namespace Cypress { + interface Chainable { + selectDropdownOptionByText : typeof selectDropdownOptionByText; + } +} + +/************************************************ + select option with some text with select tag id + ************************************************/ +function selectDropdownOptionByText(selectId : string, optionText : string) : void { + cy.getElementByDataTestsId(selectId) + .select(optionText); +} + +Cypress.Commands.add('selectDropdownOptionByText', selectDropdownOptionByText); + |