blob: d2977832d1c86fe5c6c32af17b23baeab2349b1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
declare namespace Cypress {
interface Chainable {
fillVFModulePopup: typeof FillVFModulePopup
}
}
function FillVFModulePopup(vnfName: string, vfModuleName: string, instanceName: string, lcpRegion: string, tenant: string, rollback: boolean, sdncPreLoad: boolean): Chainable<any> {
cy.getElementByDataTestsId('node-' + vnfName).click({force: true});
cy.getElementByDataTestsId('node-' + vfModuleName + '-add-btn').click({force: true});
cy.getElementByDataTestsId('instanceName').last().type(instanceName, {force: true});
cy.getElementByDataTestsId('lcpRegion').last().select(lcpRegion);
cy.getElementByDataTestsId('tenant').last().select(tenant);
cy.getElementByDataTestsId('lcpRegion').last().select(lcpRegion);
cy.getElementByDataTestsId('rollback').last().select(String(rollback));
if (sdncPreLoad) {
cy.getElementByDataTestsId('sdncPreLoad').last().check();
}
return cy.getElementByDataTestsId('form-set').last().click({force: true}).then((done) => {
return done;
});
}
Cypress.Commands.add('fillVFModulePopup', FillVFModulePopup);
|