diff --git a/pages/slideShow.js b/pages/slideShow.js index f5bf792..368f903 100644 --- a/pages/slideShow.js +++ b/pages/slideShow.js @@ -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) => { @@ -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); } } }); @@ -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); } }); } @@ -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 @@ -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') } /** @@ -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}); } } diff --git a/selectors/slideShow.js b/selectors/slideShow.js index d202089..33e2446 100644 --- a/selectors/slideShow.js +++ b/selectors/slideShow.js @@ -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")]' } \ No newline at end of file