summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/elements/element.select.actions.ts
blob: 452323d3d232b992af4902824a214c47cd0800e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);