Skip to content

Commit

Permalink
Merge pull request #253 from ProcessMaker/slideShowFunctionsCorrect
Browse files Browse the repository at this point in the history
Update process function slide show
  • Loading branch information
ana-mauricio authored Sep 26, 2024
2 parents 08d07cd + cba4cfa commit 27a4440
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 14 additions & 6 deletions pages/slideShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SlideShow {
* @return nothing returns
*/
uploadImageToSlideShowIfNotExits(image,valid=true){
cy.get(selectors.settigns_fotoLabel).should('exist');
cy.xpath(selectors.settigns_fotoLabel).should('exist');

cy.get('body')
.then(($body) => {
Expand All @@ -38,7 +38,7 @@ export class SlideShow {
.should('be.visible');
cy.xpath('//div[@label="Image Slide Show"]//*[contains(@class,"justify-center items-center")]')
.should('not.be.visible');
this.verifyImageInSlideShow();
cy.wait(2000);
}
}
});
Expand Down Expand Up @@ -71,6 +71,8 @@ export class SlideShow {
// input was found, do something else here
cy.log('delete');
this.deleteImageInSlideShow();
}else{
cy.log('LON'+$body.find(selectors.settings_deleteImage).length);
}
});
}
Expand All @@ -84,6 +86,7 @@ export class SlideShow {
.should('exist')
.click({force:true});
cy.xpath(selectors.settings_uploadImage).should('exist');
cy.wait(2000);
}
/**
* This method is responsible to verify that image is not visible
Expand All @@ -106,17 +109,22 @@ export class SlideShow {
*/
clickOnSlideShowButton(){
cy.get(selectors.slideShowButton)
.should('be.visible')
.should('exist')
.click();
cy.wait(5000);
}
enableSlideShowSharing(){
cy.get(selectors.modal_enableSharing).eq(0).check({force:true});
cy.get(selectors.modal_enableSharing).should('exist')
.check({force:true});
cy.xpath('(//a[contains(text(),"Open Slideshow Mode")])[1]').should('be.visible');
}
disableSlideShowSharing(){
cy.get(selectors.modal_enableSharing).eq(0).uncheck({force:true});
}
saveSlideShowModal(){
cy.xpath(selectors.modal_save).should('be.enabled').click()
cy.log('entro');
cy.wait(4000);
cy.xpath(selectors.modal_save).should('be.enabled').click();
cy.get(selectors.modal_alertSucces).should('be.visible')
}
/**
Expand Down Expand Up @@ -155,6 +163,6 @@ export class SlideShow {
.should('not.have.value',email);
}
closeModalSlideShow(){
cy.get(selectors.modal_closeModal).click({force:true});
cy.xpath(selectors.modal_closeModal).click({force:true});
}
}
8 changes: 4 additions & 4 deletions selectors/slideShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ export default {
//settings slide show
settings_uploadImage: '//input[@type="file"]',
settings_image: '[role="list"]>* img',
settings_deleteImage: '[role="list"]>* [fill="none"]',
settigns_fotoLabel: 'label[for="file-upload"]',
settings_deleteImage: '[data-test="image-upload-remove-0"]',
settigns_fotoLabel: '//*[contains(text(),"Placeholder for Slideshow")]',

//slide show modal
slideShowButton: '[title="Slideshow"]',
modal_enableSharing: '[class="modal-content"]>* [type="checkbox"]',
modal_enableSharing: '[id="customSwitch1"]',
modal_save: '//*[@class="modal-content"]//*[contains(text(),"Save")]/parent::button',
modal_alertSucces: '[class="alert d-none d-lg-block alertBox alert-dismissible alert-success"]',
modal_copyLink: '//*[contains(text(),"Copy Link")]',
modal_sendEmailInput: '//label[contains(text(),"Send")]/parent::div//input',
modal_closeModal: '[class="modal-dialog"]>* svg[fill="none"]'
modal_closeModal: '//*[@class="modal-dialog"]//*[contains(@class,"close")]'

}

0 comments on commit 27a4440

Please sign in to comment.