1 declare namespace Cypress {
3 genericFormSubmitForm: typeof genericFormSubmitForm
4 selectMultiselectValue: typeof selectMultiselectValue
5 selectPlatformValue: typeof selectPlatformValue
6 selectLobValue: typeof selectLobValue
7 checkMultiSelectValue: typeof checkMultiSelectValue
8 checkPlatformValue: typeof checkPlatformValue
9 checkLobValue: typeof checkLobValue
15 function selectMultiselectValue(dataTestsId: string , selectOptionId: string) {
16 cy.getElementByDataTestsId(dataTestsId).find('.c-btn').eq(0).click({force: true})
17 cy.getElementByDataTestsId(selectOptionId).click();
18 cy.getElementByDataTestsId(dataTestsId).find('.c-btn').eq(0).click({force: true})
21 function selectPlatformValue(selectOptionId: string) {
22 selectMultiselectValue("multi-selectPlatform", "multi-selectPlatform-" + selectOptionId)
25 function selectLobValue(selectOptionId: string) {
26 selectMultiselectValue("multi-lineOfBusiness", "multi-lineOfBusiness-" + selectOptionId)
30 function checkPlatformValue(value: string){
31 return checkMultiSelectValue("multi-selectPlatform", value)
34 function checkLobValue(value: string){
35 return checkMultiSelectValue("multi-lineOfBusiness", value)
38 function checkMultiSelectValue(dataTestsId: string, value: string) {
39 return cy.getElementByDataTestsId(dataTestsId).should("contain", value)
42 function genericFormSubmitForm(): Chainable<any> {
43 return cy.getElementByDataTestsId('form-set').click({force: true});
47 Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
48 Cypress.Commands.add('selectMultiselectValue', selectMultiselectValue);
49 Cypress.Commands.add('selectPlatformValue', selectPlatformValue);
50 Cypress.Commands.add('selectLobValue', selectLobValue);
51 Cypress.Commands.add('checkMultiSelectValue', checkMultiSelectValue);
52 Cypress.Commands.add('checkPlatformValue', checkPlatformValue);
53 Cypress.Commands.add('checkLobValue', checkLobValue);