diff --git a/pages/admin.js b/pages/admin.js index fbdceba..ebb3d90 100644 --- a/pages/admin.js +++ b/pages/admin.js @@ -938,21 +938,20 @@ export class Admin { } selectFileInFileManager(filePath) { cy.get(selectors.selectFileBtn).attachFile(filePath); - cy.xpath('//div[@class="uploader-list"]/ul/li/div[@status="uploading"]').should('be.visible') - cy.xpath('//div[@class="uploader-list"]/ul/li/div[@status="uploading"]').should('not.be.exist',{ timeout: 10000 }) + cy.wait(2000); + cy.xpath('//li[contains(text(),"/public-files")]').should('exist'); + cy.wait(2000); } doneUploadPublicFile(){ cy.get(selectors.doneBtn).click(); - cy.xpath('//div[@class="container text-center"]/div[@class="icon-container"]').should('be.visible'); - cy.xpath('//div[@class="container text-center"]/div[@class="icon-container"]').should('not.exist',{ timeout: 10000 }) + cy.get('[id="file-manager"]>* .table').should('be.visible'); } createFolder(folderName){ cy.xpath('//div[@class="modal-content"]//header//h5[text()="Create Folder"]').should('be.visible'); cy.get('input[placeholder="Untitled folder"]').type(folderName, {delay:100}); cy.xpath('//div[@class="modal-content"]//footer//button[text()="Create"]').click(); - cy.xpath('//div[@class="container text-center"]/div[@class="icon-container"]').should('be.visible'); - cy.xpath('//div[@class="container text-center"]/div[@class="icon-container"]').should('not.exist') + cy.wait(4000); } /** diff --git a/pages/execution.js b/pages/execution.js index 4fb3cbf..84af7f6 100644 --- a/pages/execution.js +++ b/pages/execution.js @@ -796,163 +796,38 @@ export class Execution { cy.xpath('(//div[@class="flex-grow-1"])[6]').should('contain.text',"Admin User has completed the task PDF Generator"); } - async actionsAndAssertionsOfTCP42296(requestId){ - var processName = "TCP4-2296 Verify Multiple File Upload"; - var filePath = "processes/TCP4-2296 Verify Multiple File Upload.json"; - - //Step 1: Checking and Creating the vocabulary - navHelper.navigateToProcessPage(); - cy.get(selectors.vocabulariesOption).click(); - cy.get('div[class="input-group w-100"] > input[aria-label="Search"]').type("TCP4-2296 Verify Multiple File Upload"); - cy.get('button[aria-label="Search"] > i[class="fas fa-search"]').click(); - cy.wait(5000); - cy.xpath(selectors.vocabulariesList, {timeout: 10000}) - .find('td') - .then(($loadedTable) => { - if($loadedTable.length === 1){ - cy.get('button[aria-label="Create Vocabulary"]').click(); - cy.get('input[name="title"]').type("TCP4-2296 Verify Multiple File Upload"); - cy.get('textarea[name="description"]').type("TCP4-2296 Verify Multiple File Upload"); - cy.get('button[type="button"]').eq(8).should('contain.text',"Save").click(); - cy.get('input[class="form-control input-sm"]').should('be.visible'); - cy.get('div[class="col-sm my-auto"] > i[class="fas fa-plus ml-3"]').click(); - cy.get('div[class="input-group"] > input[aria-label="Name"]').eq(1).clear().type("fileUpload"); - cy.get('select[aria-label="Type"]').eq(1).select('Array').should('have.value', 'array'); - cy.get('input[type="number"]').type(30); - cy.get('button[type="button"]').eq(7).should('contain.text',"Save").click(); - } - else return; - }); - navHelper.navigateToProcessPage(); - //Step 2: Import Process - cy.wait(5000); - var editBtn = "[title='Edit'] > .fas"; - cy.get(editBtn).should('be.visible'); - cy.get(selectors.searchInputBox) - .eq(0) - .type(processName) - .should("have.value", processName); - cy.get( - selectors.loadingSpinnerProcess - ).should("be.visible"); - cy.get( - selectors.loadingSpinnerProcess - ).should("not.be.visible"); - cy.xpath(selectors.processTable, { timeout: 10000 }) - .find('td') - .then(($loadedTable) => { - if($loadedTable.length === 1){ - process.importProcess(filePath); - cy.get('div[class="multiselect__select"]').eq(0).click(); - cy.get('input[id="search-user-text"]').type("Admin Us"); - cy.get( - 'li[aria-label="Admin User. "] > span[class="multiselect__option multiselect__option--highlight"] > span' - ) - .eq(0) - .should('contain.text',"Admin User") - .click({force:true}); - cy.get('button[type="button"]').eq(5).should('contain.text',"Save").click(); - cy.wait(10000); - - navHelper.navigateToProcessPage(); - cy.get(editBtn).should('be.visible'); - cy.get('input[aria-label="Search"]') - .eq(0) - .type(processName) - .should("have.value", processName); - cy.get('tbody[class="vuetable-body"] > tr[item-index="0"] > td').should("contain.text", "TCP4-2296 Verify Multiple File Upload"); - } - else return; - }); - // Step 3: Checking and adding the vocabulary - navHelper.navigateToProcessPage(); - cy.wait(5000); - var editBtn = "[title='Edit'] > .fas"; - cy.get(editBtn).should('be.visible'); - cy.get(selectors.searchInputBox) - .eq(0) - .type(processName) - .should("have.value", processName); - cy.get( - selectors.loadingSpinnerProcess - ).should("be.visible"); - cy.get( - selectors.loadingSpinnerProcess - ).should("not.be.visible"); - cy.xpath(selectors.processTable, { timeout: 10000 }) - - .then(($loadedTable) => { - if($loadedTable.length === 1){ - cy.get('button[title="Edit"] > i[class="fas fa-pen-square fa-lg fa-fw"]', { timeout: 10000 }).eq(0).click(); - }else{ - cy.get('div[aria-label="pagination"]').eq(1).get('div[class="pagination-nav-item item"]').eq(1).click(); - } - }); - cy.get('rect[joint-selector="body"]').eq(2).click({force:true}); - cy.get('span[class="ml-1 mr-auto"]').eq(7).should('have.text',"Vocabularies").click(); - cy.get('div[name="vocabularies"] > div > div[class="form-group px-0"]').then(($vocabulary) => { - if($vocabulary.children().hasClass('text-center font-italic text-muted')){ - cy.get('button[aria-label="Add"] > i[class="fa fa-plus"]').click(); - cy.get('div[class="multiselect__select"]').eq(1).click(); - cy.get('li[aria-label="TCP4-2296 Verify Multiple File Upload. "] > span').should('have.text',"TCP4-2296 Verify Multiple File Upload").click(); - cy.get('button[aria-label="Add"] > i[class="fa fa-plus"]').click(); - cy.get('div[class="card-footer p-2 text-right"] > button[type="button"]').eq(0).contains("Save").click(); - cy.get( - 'button[title="Save"] > svg[data-icon="save"]').click(); - cy.get('button[class="btn btn-secondary"]').eq(0) - .contains("Save").click(); - } - else return; - }); - navHelper.navigateToRequestsPage(); - request.openNewRequest( - "TCP4-2296 Verify Multiple File Upload" - ); - cy.get( - 'ul[id="requestTab"] > li[class="nav-item"] > a[id="pending-tab"]' - ).click(); - cy.wait(5000); - cy.get('tbody[class="vuetable-body"] > tr[item-index="0"] > td').eq(1).get('a[target="_self"]').eq(6).should('contain.text',"AA").click(); - cy.wait(5000); + actionsAndAssertionsOfTCP42296(requestId){ const file1 = 'drone.jpg'; - cy.get('input[data-cy="file-upload-button"]').attachFile(file1); const file2 = 'sample.pdf'; - cy.get('input[data-cy="file-upload-button"]').attachFile(file2); const file3 = 'sample_document.doc'; + + //Step 1: Complete the form 1 + cy.get('input[data-cy="file-upload-button"]').attachFile(file1); + cy.xpath('(//*[@data-cy="screen-field-fileUpload"]//span[contains(text(),"success")])[1]').should('exist'); + cy.get('input[data-cy="file-upload-button"]').attachFile(file2); + cy.xpath('(//*[@data-cy="screen-field-fileUpload"]//span[contains(text(),"success")])[2]').should('exist'); cy.get('input[data-cy="file-upload-button"]').attachFile(file3); - cy.wait(5000); - cy.get('div[class="card"] > ul > li > a') - .invoke("text") - .then((text) => { - var requestIDtext = text.trim(); - requestIDtext = requestIDtext.substring( - 0, - requestIDtext.length - ); - cy.wait(5000); + cy.xpath('(//*[@data-cy="screen-field-fileUpload"]//span[contains(text(),"success")])[3]').should('exist'); + + //Step 2: Submit the form + cy.wait(2000); cy.get('button[aria-label="New Submit"]').click(); - navHelper.navigateToTasksPage(); - cy.get('tbody[class="vuetable-body"]') - .get("tr") - .get('td[class="vuetable-slot"] > a[target="_self"]') - .contains(requestIDtext) - .click(); - cy.wait(5000); - cy.get('tbody[class="vuetable-body"] > tr[item-index="0"] > td') - .eq(1) - .get('a[target="_self"]') - .eq(6) - .should("contain.text", "BB") - .click(); - cy.wait(5000); + request.verifyTaskIsCompletedB(); + + //Step 1: Complete the form 2 + cy.visit("/requests/" + requestId); + request.waitUntilElementIsVisible('selector', '#pending >* td:nth-child(1) >a[href^="/tasks"]'); + request.clickOnTaskName(1, 1); + cy.get('div[title="drone.jpg"]').should('be.visible'); cy.get('div[title="sample.pdf"]').should('be.visible'); cy.get('div[title="sample_document.doc"]').should('be.visible'); cy.get('button[aria-label="New Submit"]').eq(1).click({force: true}); - cy.wait(5000); - cy.get('div[class="flex-grow-1"]').eq(2).should('contain.text',"Admin User has completed the task AA"); - cy.get('div[class="flex-grow-1"]').eq(3).should('contain.text',"Admin User has completed the task BB"); - }); + request.verifyTaskIsCompletedB(); + + cy.visit("/requests/" + requestId); + cy.get('div[class="flex-grow-1"]').eq(2).should('contain.text',"completed the task AA"); + cy.get('div[class="flex-grow-1"]').eq(3).should('contain.text',"completed the task BB"); } async actionsAndAssertionsOfTCP42337(requestId){ @@ -4796,9 +4671,9 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp var timeStamp = new Date().getTime(); var folderName = "1-TCP4-2347:" + timeStamp; fileManager.createFolder(folderName); - this.putLatestFileAtTopList(); - fileManager.openFolder(folderName); - + + cy.visit('/file-manager/public/'+folderName); + cy.wait(3000); fileManager.pressPublicFileBtn(); fileManager.uploadFile('file1.jpg','image/jpeg'); fileManager.pressDoneBtn(); @@ -4819,7 +4694,8 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp fileManager.uploadFile('file5.pptx','application/vnd.openxmlformats-officedocument.presentationml.presentation'); fileManager.pressDoneBtn(); - cy.reload(); + cy.visit('/file-manager/public'); + cy.visit('/file-manager/public/'+folderName); //Verify files cy.xpath('//tbody//tr').should('length', 5); @@ -5766,10 +5642,11 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp } //TCP4-2269 actionsAndAssertionsOfTCP42269SelectFile(filePath,num){ - cy.get('[class="invalid-feedback d-block"]').eq(0).should('contain','Field is required'); - cy.get('[data-cy="file-upload-button"]').eq(num).attachFile(filePath); - cy.get('[class="invalid-feedback d-block"]').eq(0).should('not.be.visible'); - cy.xpath('//div[@status="success"]').eq(num).should('be.visible') + let numb =parseInt(num)+1; + cy.get('input[data-cy="file-upload-button"]') + .eq(num) + .attachFile(filePath); + cy.xpath('(//*[@data-cy="screen-field-file_upload_1"]//span[contains(text(),"success")])['+numb+']').should('exist'); } actionsAndAssertionsOfTCP42269VerifyViewFile(){ cy.xpath("//table//tbody").find("tr").its("length").should("be.gte", 4); @@ -7065,61 +6942,87 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp cy.xpath("//p[text()='File Upload']").should("be.visible"); //FILE 1 const file11 = 'cloud1.jpeg'; - cy.xpath('//input[@data-cy="file-upload-button"]').first().attachFile(file11); - cy.xpath('(//div[@data-cy="screen-field-file1"])[2]').should("be.visible"); + cy.xpath('//*[@data-cy="screen-field-file1"]//input[@data-cy="file-upload-button"]').attachFile(file11); + cy.xpath('//*[@data-cy="screen-field-file1"]//*[contains(text(),"succes")]').should('exist'); + cy.wait(2000); //FILE 2 const file12 = 'Databases.odp'; - cy.xpath('(//input[@data-cy="file-upload-button"])[2]').attachFile(file12); - cy.xpath("//button[contains(text(),'Download')]").should("be.visible"); + cy.xpath('//*[@data-cy="screen-field-file2"]//input[@data-cy="file-upload-button"]').attachFile(file12); + cy.xpath('//*[@data-cy="screen-field-file2"]//*[contains(text(),"succes")]').should('exist'); + cy.wait(2000); //File Upload with Loops New Array Objects const file13 = 'sample_document.doc'; - cy.xpath('(//input[@data-cy="file-upload-button"])[3]').attachFile(file13); - cy.get('[data-cy="sample-document-doc"] > .uploader-file > .uploader-file-info > .uploader-file-name').should("be.visible"); + cy.xpath('//*[@data-cy="screen-field-fileLoop1"]//input[@data-cy="file-upload-button"]').eq(0).attachFile(file13); + cy.xpath('//*[@data-cy="screen-field-fileLoop1"][1]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); const file14 = 'uno.png'; - cy.xpath('(//input[@data-cy="file-upload-button"])[4]').attachFile(file14); - cy.get('[data-cy="uno-png"] > .uploader-file > .uploader-file-info > .uploader-file-name').should("be.visible"); + cy.xpath('//*[@data-cy="screen-field-fileLoop1"]//input[@data-cy="file-upload-button"]').eq(1).attachFile(file14); + cy.xpath('(//*[@data-cy="screen-field-fileLoop1"])[2]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); //Add loop - cy.get('[data-cy="loop-loop_1-add"]').should("be.visible").click(); + cy.get('[data-cy="loop-loop_1-add"]').click(); const file15 = "lettre_parents_d'eleves_1-1.docx"; - cy.xpath('(//input[@data-cy="file-upload-button"])[5]').attachFile(file15); + cy.xpath('//*[@data-cy="screen-field-fileLoop1"]//input[@data-cy="file-upload-button"]').eq(2).should('exist'); + cy.xpath('//*[@data-cy="screen-field-fileLoop1"]//input[@data-cy="file-upload-button"]').eq(2).attachFile(file15); + cy.xpath('(//*[@data-cy="screen-field-fileLoop1"])[3]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); cy.contains('New Submit').scrollIntoView(); //File Upload with Loops Existing Array - cy.get('[data-cy="loop-loop_2-add"]').should("be.visible").click(); + cy.get('[data-cy="loop-loop_2-add"]').click(); const file23 = "file5.pptx"; - cy.xpath('//div[@name="loop_2"]//input[@data-cy="file-upload-button"]').attachFile(file23); - cy.get('[data-cy="loop-loop_2-add"]').should("be.visible").click(); + cy.xpath('//*[@data-cy="screen-field-fileLoop2"]//input[@data-cy="file-upload-button"]').attachFile(file23); + cy.xpath('//*[@data-cy="screen-field-fileLoop2"]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); + cy.get('[data-cy="loop-loop_2-add"]').click(); const file24 = "win.png"; - cy.xpath('(//div[@name="loop_2"]//input[@data-cy="file-upload-button"])[2]').attachFile(file24); + cy.xpath('//*[@data-cy="screen-field-fileLoop2"]//input[@data-cy="file-upload-button"]').eq(1).attachFile(file24); + cy.xpath('(//*[@data-cy="screen-field-fileLoop2"])[2]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); //Add record list cy.contains('New Record List').scrollIntoView(); - cy.get('[data-cy="add-row"]').should("be.visible").click(); + cy.get('[data-cy="add-row"]').click(); cy.xpath('//div[@class="modal-content"]').should('be.visible'); + cy.wait(2000); //FILE 3 - const file16 = "MEZCLAPORNOTAS.pdf"; - cy.xpath('(//input[@data-cy="file-upload-button"])[7]').attachFile(file16); + const file16 = "sample.pdf"; + cy.xpath('//*[@name="RL_file"]//*[@data-cy="screen-field-file3"]//input[@data-cy="file-upload-button"]').eq(0).attachFile(file16); + cy.xpath('//*[@name="RL_file"]//*[@data-cy="screen-field-file3"]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); const file17 = "PM 4.1.0 - Scenarios.xlsx"; - cy.xpath('(//input[@data-cy="file-upload-button"])[9]').attachFile(file17); + cy.xpath('//*[@name="RL_file"]//*[@data-cy="screen-field-file4"]//input[@data-cy="file-upload-button"]').eq(0).attachFile(file17); + cy.xpath('//*[@name="RL_file"]//*[@data-cy="screen-field-file4"]//*[contains(text(),"succes")]').should("exist"); + cy.wait(4000); const file18 = "shibboleth.crt"; - cy.xpath('(//input[@data-cy="file-upload-button"])[10]').attachFile(file18); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"]//input[@data-cy="file-upload-button"])[1]').eq(0).attachFile(file18); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"])[1]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); const file19 = "Universidad.pdf"; - cy.xpath('(//input[@data-cy="file-upload-button"])[11]').attachFile(file19); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"]//input[@data-cy="file-upload-button"])[2]').attachFile(file19); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"])[2]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); //Add loop inside a record list - cy.get('[data-cy="loop-loop_3-add"]').first().should("be.visible").click(); + cy.get('[data-cy="loop-loop_3-add"]').first().click(); const file20 = "uno.png"; - cy.xpath('(//input[@data-cy="file-upload-button"])[12]').attachFile(file20); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"]//input[@data-cy="file-upload-button"])[3]').attachFile(file20); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"])[3]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); //FILE 4 const file21 = "win.png"; - cy.xpath('(//input[@data-cy="file-upload-button"])[8]').attachFile(file21); + //cy.xpath('(//input[@data-cy="file-upload-button"])[8]').attachFile(file21); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"]//input[@data-cy="file-upload-button"])[4]').attachFile(file21); + cy.xpath('(//*[@name="RL_file"]//*[@data-cy="screen-field-loopFile4"])[4]//*[contains(text(),"succes")]').should("exist"); + cy.wait(2000); //Add loop cy.get('[data-cy="loop-loop_4-add"]').first().should("be.visible").click(); const file22 = "cloud1.jpeg"; - cy.xpath('(//input[@data-cy="file-upload-button"])[13]').attachFile(file22); + cy.xpath('//*[@data-cy="screen-field-loopFile5"]//input[@data-cy="file-upload-button"]').attachFile(file22); + cy.xpath('//*[@data-cy="screen-field-loopFile5"]//*[contains(text(),"succes")]').should("exist"); cy.wait(4000); //Ok and submit cy.contains('Ok').scrollIntoView(); - cy.xpath("//button[contains(text(),'Ok')]").should("be.visible").click(); + cy.xpath("//button[contains(text(),'Ok')]").click(); cy.contains('New Submit').scrollIntoView(); - cy.xpath("//button[contains(text(),'New Submit')]").should("be.visible").click(); + cy.xpath("//button[contains(text(),'New Submit')]").click(); request.verifyTaskIsCompletedB(); //Complete task form var taskName = 'Form Task'; @@ -7130,23 +7033,22 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp //Review data in second task cy.xpath("//p[text()='File Upload']").should("be.visible"); //FILE 1 - cy.xpath('(//div[@data-cy="screen-field-file1"])[2]').should("be.visible"); + cy.xpath('(//div[@data-cy="screen-field-file1"])[2]').should("exist"); //FILE 2 - cy.xpath("//button[contains(text(),'Download')]").should("be.visible"); + cy.xpath("//button[contains(text(),'Download')]").should("exist"); //File Upload with Loops New Array Objects - cy.xpath('//div[@title="sample_document.doc"]').should("be.visible"); - cy.xpath('//div[@title="uno.png"]').should("be.visible"); + cy.xpath('//div[@title="sample_document.doc"]').should("exist"); + cy.xpath('//div[@title="uno.png"]').should("exist"); cy.contains('New Submit').scrollIntoView(); //Edit record list - cy.get('[data-cy="edit-row"]').should("be.visible").click(); + cy.get('[data-cy="edit-row"]').click(); cy.xpath('//div[@class="modal-content"]').should('be.visible'); //FILE 3 - cy.xpath('//div[@title="PM-4.1.0---Scenarios.xlsx"]').should("be.visible"); - cy.xpath('//div[@title="shibboleth.crt"]').should("be.visible"); - cy.xpath('//div[@title="Universidad.pdf"]').should("be.visible"); + cy.xpath('//div[@title="shibboleth.crt"]').should("exist"); + cy.xpath('//div[@title="Universidad.pdf"]').should("exist"); //On loop inside a record list //FILE 4 - cy.xpath('//div[@title="shibboleth.crt"]').should("be.visible"); + cy.xpath('//div[@title="shibboleth.crt"]').should("exist"); //Save and submit cy.contains('Save').scrollIntoView(); cy.xpath('//button[text() = "Save"]').click((err, runnable) => { @@ -7154,7 +7056,10 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp }); //On a new record list cy.contains('New Submit').scrollIntoView(); - cy.xpath("//button[contains(text(),'New Submit')]").should("be.visible").click(); + cy.xpath("//button[contains(text(),'New Submit')]").click(); + request.verifyTaskIsCompletedB(); + + cy.visit('/requests/'+requestId); //Review Summary cy.xpath("//a[contains(text(),'Summary')]").should("be.visible"); //Review File Manager @@ -7164,7 +7069,6 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp cy.xpath("//span[contains(text(),'Databases')]").should("be.visible"); cy.xpath("//span[contains(text(),'file5')]").should("be.visible"); cy.xpath("//span[contains(text(),'docx')]").should("be.visible"); - cy.xpath("//span[contains(text(),'PM 4.1.0 - Scenarios')]").should("be.visible"); cy.xpath("//span[contains(text(),'sample_document')]").scrollIntoView().should("be.visible"); cy.xpath("//span[contains(text(),'shibboleth')]").should("be.visible"); cy.xpath("//span[contains(text(),'Universidad')]").should("be.visible"); @@ -7755,7 +7659,7 @@ async actionsAndAssertionsOfTCP42332_4(taskName, process_id, subprocess_id, subp }); } //TPC4-2186 - uploadFile(fileName){ + uploadFile2186(fileName){ admin.addPublicFileInFileManager(); admin.selectFileInFileManager(fileName); admin.doneUploadPublicFile(); diff --git a/pages/process.js b/pages/process.js index ec7512b..6468357 100644 --- a/pages/process.js +++ b/pages/process.js @@ -1300,6 +1300,7 @@ export class Process { createProcessWithBPMNFile(nameProcess, descriptionProcess, category, path) { cy.get(selectors.addProcessBtn).click(); cy.xpath(selectors.blankProcessBtbXpath).should("be.visible").click(); + cy.xpath('//*[@class="modal-body"]//*[contains(text(),"Uncategorized")]').should('be.visible'); cy.get(selectors.nameTxtBx).click().type(nameProcess, {delay:200}).should("have.value", nameProcess); cy.get(selectors.descriptionTxtBx).click().type(descriptionProcess).should("have.value", descriptionProcess); cy.xpath(selectors.labelCategory).should("be.visible"); @@ -1312,6 +1313,8 @@ export class Process { .and("equal", category + ". "); cy.get(selectors.categoryInput).first().type("{enter}"); cy.get(selectors.uploadBPMNBrowseButton).attachFile(path); + cy.wait(3000); + cy.get(selectors.saveBtnBPMN).should('be.enabled'); cy.get(selectors.saveBtnBPMN).click(); } verifyNameProcess(nameProcess) {