blob: 41784daffff1c205ff4b84477478aa021be127cc (
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
25
26
27
28
29
|
declare namespace Cypress {
interface Chainable {
genericFormSubmitForm: typeof genericFormSubmitForm
selelctPlatformValue: typeof selelctPlatformValue
}
}
function selelctPlatformValue(isDropdown: boolean, selectOption: string){
if (isDropdown) {
cy.selectDropdownOptionByText('platform', selectOption);
} else {
cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true})
.getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click()
.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
}
}
function genericFormSubmitForm(): Chainable<any> {
return cy.getElementByDataTestsId('form-set').click({force: true});
}
Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
Cypress.Commands.add('selelctPlatformValue', selelctPlatformValue);
|