@processmaker/cypress-utils
Advanced tools
Comparing version
{ | ||
"name": "@processmaker/cypress-utils", | ||
"version": "1.0.394", | ||
"version": "1.0.395", | ||
"description": "ProcessMaker Cypress Testing Utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -92,2 +92,23 @@ import { NavigationHelper } from "#helpers/navigationHelper"; | ||
addSelectFolder(rpaFolderName){ | ||
let optionConfigXpath = '//div[contains(text(),"optionName")]/ancestor::tr//button[@aria-label="Edit"]'; | ||
let optionColumnXpath = '//div[contains(text(),"optionColumn")]/ancestor::tr/td[2]'; | ||
cy.xpath(optionConfigXpath.replace('optionName','Select Available Folders')).click(); | ||
cy.xpath(selectors.SelectFolderDropdown).should('be.visible'); | ||
cy.xpath(selectors.SelectFolderDropdown).click(); | ||
cy.get(selectors.SelectFolderTxtBx).type(rpaFolderName, {delay: 100}).type('{enter}'); | ||
//cy.get(selectors.SelectFolderTxtBx).should('be.visible').click().clear().type(rpaFolderName, { delay: 100 }).wait(500).should('have.value', rpaFolderName); | ||
//cy.get(selectors.SelectFolderTxtBx).should('have.value', rpaFolderName); | ||
//.should('have.value', rpaFolderName); | ||
//cy.xpath(selectors.RPADropdownOption.replace('rpaFolderName', rpaFolderName)).click({force: true}); | ||
cy.get('.btn-secondary').click(); | ||
} | ||
clickSaveSelectAvailableFolders(){ | ||
cy.get('.btn-secondary').click(); | ||
} | ||
copyRedirectURL(){ | ||
@@ -110,4 +131,51 @@ | ||
} | ||
} | ||
addRPAfolder(RPAfolderName) { | ||
//cy.wait(2000); | ||
cy.xpath(selectors.RPAfolderDropdown).should('be.visible'); | ||
cy.xpath(selectors.RPAfolderDropdown).click(); | ||
cy.get(selectors.RPAfolderTxtBx).type(RPAfolderName).should('have.value', RPAfolderName); | ||
cy.xpath(selectors.RPADropdownOption.replace('RPAfolderName', RPAfolderName)).click({ force: true }); | ||
} | ||
addRPAprocess(RPAprocessName) { | ||
//cy.wait(2000); | ||
cy.xpath(selectors.RPAprocessDropdown).should('be.visible'); | ||
cy.xpath(selectors.RPAprocessDropdown).click(); | ||
cy.get(selectors.RPAprocessTxtBx).type(RPAprocessName).should('have.value', RPAprocessName); | ||
cy.xpath(selectors.RPADropdownOptionProcess.replace('RPAprocessName', RPAprocessName)).click({ force: true }); | ||
} | ||
addRPAmachine(RPAmachineName) { | ||
//cy.wait(2000); | ||
cy.xpath(selectors.RPAmachineDropdown).should('be.visible'); | ||
cy.xpath(selectors.RPAmachineDropdown).click(); | ||
cy.get(selectors.RPAmachineTxtBx).type(RPAmachineName).should('have.value', RPAmachineName); | ||
cy.xpath(selectors.RPAmachineDropdownOption.replace('RPAmachineName', RPAmachineName)).click({ force: true }); | ||
} | ||
addRPAbot(RPAbot) { | ||
//cy.wait(2000); | ||
cy.xpath(selectors.RPAbotDropdown).should('be.visible'); | ||
cy.xpath(selectors.RPAbotDropdown).click(); | ||
cy.get(selectors.RPAbotTxtBx).type(RPAbot).should('have.value', RPAbot); | ||
cy.xpath(selectors.RPAbotDropdownOption.replace('RPAbot', RPAbot)).click({ force: true }); | ||
} | ||
configureRPAInModeler(){ | ||
cy.get('[data-cy="inspector-button"]').click(); | ||
cy.get('[for="rpa-folder-select"]').should('be.visible'); | ||
cy.get('[aria-owns="listbox-0"] > .multiselect__select').click({force: true}); | ||
//cy.xpath('//*[@id="processmaker-communication-rpa"]').click(); | ||
} | ||
} |
@@ -10,6 +10,17 @@ export default { | ||
authorizeAccountButton: '[data-cy="rpa.authorization"]', | ||
RPAfolderDropdown: '//label[text()="RPA Folder"]//following-sibling::div/div[@class="multiselect__select"]', | ||
RPAfolderTxtBx: '[placeholder="Select a Folder"]', | ||
RPADropdownOption: '//li[@role="option"]//span[text()="RPAfolderName"]', | ||
RPAprocessDropdown: '//label[text()="RPA Process"]//following-sibling::div/div[@class="multiselect__select"]', | ||
RPAprocessTxtBx: '[placeholder="Select a Process"]', | ||
RPADropdownOptionProcess: '//li[@role="option"]//span[text()="RPAprocessName"]', | ||
RPAmachineDropdown: '//label[text()="RPA Machine"]//following-sibling::div/div[@class="multiselect__select"]', | ||
RPAmachineTxtBx: '[placeholder="Select a Machine"]', | ||
RPAmachineDropdownOption: '//li[@role="option"]//span[text()="RPAmachineName"]', | ||
RPAbotDropdown: '//label[text()="RPA Bot"]//following-sibling::div/div[@class="multiselect__select"]', | ||
RPAbotTxtBx: '[placeholder="Select a Bot"]', | ||
RPAbotDropdownOption: '//li[@role="option"]//span[text()="RPAbot"]', | ||
SelectFolderDropdown: '//div[@class="multiselect__select"]', | ||
SelectFolderTxtBx: '[placeholder="Type to search"]', | ||
SaveSelectAvailableFolders: '//button[@class="btn btn-secondary"]', | ||
} |
1895435
0.22%34663
0.19%