blob: 1151736329995e2c2f22f2d06d246ac3d3fb2647 (
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
|
declare namespace Cypress {
interface Chainable {
genericFormSubmitForm: typeof genericFormSubmitForm
selectPlatformValue: typeof selectPlatformValue
checkPlatformValue: typeof checkPlatformValue
}
}
function selectPlatformValue(selectOption: string) {
cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
cy.getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click();
cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
}
function checkPlatformValue(value: string){
return cy.getElementByDataTestsId("multi-selectPlatform").should("contain", value)
}
function genericFormSubmitForm(): Chainable<any> {
return cy.getElementByDataTestsId('form-set').click({force: true});
}
Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
Cypress.Commands.add('selectPlatformValue', selectPlatformValue);
Cypress.Commands.add('checkPlatformValue', checkPlatformValue);
|