n8n/cypress/pages/modals/message-box.ts
Milorad FIlipović 34fbff0828
fix(editor): First round of e2e tests fixes with Vue 3 (#6579)
* fix(editor): Fix broken smoke and workflow list e2e tests
* ✔️ Fix failing canvas action tests. Updating some selectors used in credentials and workflow tests
2023-07-03 09:20:32 +02:00

20 lines
604 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').first(),
cancel: () => this.getters.modal().find('.btn--cancel').first(),
};
actions = {
confirm: () => {
this.getters.confirm().click({ force: true});
},
cancel: () => {
this.getters.cancel().click({ force: true});
},
};
}