0fa7f6b32e4a9dc2a67d7ed88f37a9fe02a5559e
[vid.git] / vid-webpack-master / cypress / support / steps / fill.network.step.ts
1 // add new command to the existing Cypress interface
2 declare namespace Cypress {
3   interface Chainable {
4     fillNetworkPopup: typeof fillNetworkPopup,
5   }
6 }
7
8 function fillNetworkPopup(shouldSelectAdditionalPlatform: boolean = false, shouldSelectAdditionalLob: boolean = false): Cypress.Chainable<any> {
9   cy.selectDropdownOptionByText('productFamily', 'Emanuel');
10   cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
11   cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
12   cy.selectLobValue("zzz1");
13   cy.selectPlatformValue(`xxx1`);
14   if(shouldSelectAdditionalPlatform){
15     cy.selectPlatformValue(`platform`);
16   }
17   if(shouldSelectAdditionalLob){
18     cy.selectLobValue("ONAP");
19   }
20   return cy.getElementByDataTestsId('form-set').click({force : true}).then((done)=>{
21     return done;
22   });
23 }
24
25 Cypress.Commands.add('fillNetworkPopup', fillNetworkPopup);