Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update process function slide show #253

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")]'

}
Loading