summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/elements/element.select.actions.ts
diff options
context:
space:
mode:
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.ts16
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 00000000..452323d3
--- /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);
+