aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/steps/fill.network.step.ts
blob: 4ca1796f16c46e77131510e2ef74b0073e478926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// add new command to the existing Cypress interface
declare namespace Cypress {
  interface Chainable {
    fillNetworkPopup: typeof fillNetworkPopup,
  }
}

function fillNetworkPopup(shouldSelectAdditionalPlatform: boolean = false): Cypress.Chainable<any> {
  cy.selectDropdownOptionByText('productFamily', 'Emanuel');
  cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
  cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
  cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
  cy.selectPlatformValue('xxx1');
  if(shouldSelectAdditionalPlatform){
    cy.selectPlatformValue('platform');
  }
  return cy.getElementByDataTestsId('form-set').click({force : true}).then((done)=>{
    return done;
  });
}

Cypress.Commands.add('fillNetworkPopup', fillNetworkPopup);