Skip to content

Commit

Permalink
Merge pull request #38 from ProcessMaker/newMethodScreenTemplate
Browse files Browse the repository at this point in the history
new method for screen template
  • Loading branch information
PaolaPellegrini authored May 3, 2024
2 parents e5aa3f8 + 582fa59 commit 9c364a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 10 additions & 3 deletions pages/screenTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class ScreenTemplate {

clickOnSave() {
cy.xpath(selectors.saveCreateScreenTemplate).should("be.visible").click();

}

searchScreenTemplate(nameScreenTemplate) {
Expand Down Expand Up @@ -370,9 +371,8 @@ createScreenFromTemplate(name, description, type, typeScreenTemplate, nameTempla
this.selectTypeScreen(type);
this.selectTypeTemplate(typeScreenTemplate);
this.selectTemplate(nameTemplate);
this.clickOnSave();
cy.get(Selectors.savePublishVersionsBtn).should('be.visible');

this.previewTemplate(nameTemplate);

}

clickOnAddScreen() {
Expand Down Expand Up @@ -450,6 +450,13 @@ selectTemplate(nameTemplate) {
cy.get(selectors.selectScreenTemplate.replace('CustomCard',nameTemplate+'-card')).click({force:true});

}
previewTemplate(nameTemplate) {

cy.get(selectors.previewTemplate.replace('CustomCard',nameTemplate+'-card')).click({force:true});
cy.get(selectors.buttonViewCSS).should('be.visible').click();

}



clickOnSave() {
Expand Down
5 changes: 3 additions & 2 deletions selectors/screenTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default {
sharedTemplateType: '[data-cy="type-container-Shared Templates"]',
myTemplateType: '[data-cy="type-container-My Templates"]',
selectScreenTemplate:'[data-cy="CustomCard"] input',


previewTemplate: '[data-cy="CustomCard"] a',
buttonViewCSS:'[class="btn text-uppercase btn-outline-secondary"]',

}

0 comments on commit 9c364a8

Please sign in to comment.