@processmaker/cypress-utils
Advanced tools
Comparing version
{ | ||
"name": "@processmaker/cypress-utils", | ||
"version": "1.0.385", | ||
"version": "1.0.386", | ||
"description": "ProcessMaker Cypress Testing Utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -146,10 +146,11 @@ import selectors from "#selectors/projects"; | ||
const tableProject = '[data-cy="project-listing-table"]'; | ||
const editBtnProject = | ||
'//*[@id="projectList"]/div[2]/div/table/tbody//button[@aria-haspopup="menu"]'; | ||
const editBtnProject = '//*[@data-cy="project-listing-table"]//a[contains(text(),"projectName")]/ancestor::tr//*[@data-cy="project-list-ellipsis"]'; | ||
cy.get(tableProject).should("be.visible"); | ||
cy.xpath(selectors.searchProjects).should("be.visible"); | ||
cy.xpath(selectors.searchProjects).type(`${name}{enter}`).should("have.value", name); | ||
cy.xpath(selectors.searchProjects).type(' ').type('{backspace}'); | ||
cy.xpath(editBtnProject).first().click({ force: true }); | ||
cy.xpath(selectors.searchProjects).type(name,{delay:60}).should("have.value", name); | ||
cy.xpath(selectors.searchProjects).type('{enter}'); | ||
cy.wait(4000); | ||
cy.get(tableProject).should('be.visible'); | ||
cy.xpath(editBtnProject.replace('projectName',name)).first().click({ force: true }); | ||
this.selectMenuOptionRowProjects("Open"); | ||
@@ -333,19 +334,21 @@ } | ||
verifyPresenceOfProjectAndImportProject(nameProject, projectPath) { | ||
var editBtn = | ||
'//div[@id="projectsCategorizedList"]/ul/li/a[@id="nav-sources-tab"]//ancestor::div[@id="projectsCategorizedList"]/descendant::div[@id="projectList"]//table/tbody/tr//button[@aria-haspopup="menu"]'; | ||
cy.xpath(editBtn).should("be.visible"); | ||
cy.xpath(selectors.searchProjects) | ||
.type(`${nameProject}`, {delay:60}) | ||
.should("have.value", nameProject); | ||
var editBtn ='//div[@id="projectsCategorizedList"]/ul/li/a[@id="nav-sources-tab"]//ancestor::div[@id="projectsCategorizedList"]/descendant::div[@id="projectList"]//table/tbody/tr//button[@aria-haspopup="menu"]'; | ||
let listTableSelector = '[data-cy="project-listing-table"]'; | ||
cy.wait(3000); | ||
cy.get(listTableSelector).should("be.visible"); | ||
cy.xpath(selectors.searchProjects).type(nameProject, {delay:60}).should("have.value", nameProject); | ||
cy.xpath(selectors.searchProjects).type('{enter}'); | ||
cy.wait(2000); | ||
cy.wait(4000); | ||
cy.xpath(selectors.loadingSpinnerProject).should("not.be.visible"); | ||
cy.xpath('//table[@class="vuetable table table-hover table-responsive text-break"]//tbody//tr', { timeout: 10000 }) | ||
.find("td") | ||
.then(($loadedTable) => { | ||
if ($loadedTable.length === 1) { | ||
this.importProjects(projectPath); | ||
} else return; | ||
}); | ||
.find("td") | ||
.then(($loadedTable) => { | ||
if ($loadedTable.length === 1) { | ||
this.importProjects(projectPath); | ||
} else return; | ||
}); | ||
} | ||
verifyPresenceOfProjectAndCreate(project) { | ||
@@ -352,0 +355,0 @@ var editBtn = |
@@ -51,2 +51,3 @@ import selectors from "#selectors/requests" | ||
addRequestNameToSelectList(processName) { | ||
cy.get('[class="jumbotron jumbotron-fluid"]').should('not.be.visible'); | ||
cy.get(selectors.filterTextArea).should('be.visible'); | ||
@@ -53,0 +54,0 @@ cy.get(selectors.filterTextArea).type(processName,{delay:100}).should('have.value', processName); |
@@ -207,2 +207,8 @@ import Selectors from "#selectors/scripts"; | ||
} | ||
deleteProject() { | ||
this.selectMenuOptionRow("Delete"); | ||
cy.get('[data-test="confirm-btn-ok"]').should('be.visible').click(); | ||
cy.wait(3000); | ||
cy.get('[class="alert d-none d-lg-block alertBox alert-dismissible alert-success"]').should('not.exist'); | ||
} | ||
@@ -334,2 +340,3 @@ showVersioningOnly() { | ||
.should("have.value", scriptName); | ||
cy.wait(4000); | ||
cy.xpath(Selectors.scriptTable, { timeout: 10000 }).then( | ||
@@ -364,2 +371,3 @@ ($loadedTable) => { | ||
case "delete": | ||
this.deleteProject(); | ||
break; | ||
@@ -366,0 +374,0 @@ } |
@@ -60,3 +60,3 @@ export default { | ||
modalScript: '//div[@class="modal-body"]', | ||
chooseLanguage: '//label[contains(text(),"Choose a language")]', | ||
chooseLanguage: '//label[contains(text(),"Choose")]', | ||
imgSrc: '//div[@class="card-body"]/p/div/img[@src="srch"]', | ||
@@ -63,0 +63,0 @@ imgAlt: '//div[@class="card-body"]/p/div/img[@alt="altt"]', |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1891337
0.01%34594
0.03%