n8n/cypress/pages/modals/message-box.ts
Iván Ovejero 3028ad3c61
refactor: Format root-level dirs (no-changelog) (#4938)
🎨 Format root-level dirs
2022-12-15 16:39:59 +01:00

20 lines
560 B
TypeScript

import { BasePage } from '../base';
export class MessageBox extends BasePage {
getters = {
modal: () => cy.get('.el-message-box', { withinSubject: null }),
header: () => this.getters.modal().find('.el-message-box__title'),
content: () => this.getters.modal().find('.el-message-box__content'),
confirm: () => this.getters.modal().find('.btn--confirm'),
cancel: () => this.getters.modal().find('.btn--cancel'),
};
actions = {
confirm: () => {
this.getters.confirm().click();
},
cancel: () => {
this.getters.cancel().click();
},
};
}