n8n/cypress/pages/modals/message-box.ts
Iván Ovejero 7ce5d8fd90
refactor: Upgrade to Prettier 3 (no-changelog) (#6947)
Supersedes https://github.com/n8n-io/n8n/pull/6937

Excluding fixtures and test workflow JSONs to avoid having to update
tests.
2023-08-16 17:13:57 +02:00

20 lines
606 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 });
},
};
}