1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-11-11 01:28:58 +03:00
n8n/cypress/pages/modals/workflow-sharing-modal.ts
Alex Grozav 246189f6da
feat: Add workflow and credential sharing access e2e tests (#5463)
feat: add workflow and credential sharing access e2e tests
2023-02-14 16:13:00 +02:00

27 lines
749 B
TypeScript

import { BasePage } from '../base';
export class WorkflowSharingModal extends BasePage {
getters = {
modal: () => cy.getByTestId('workflowShare-modal', { timeout: 5000 }),
usersSelect: () => cy.getByTestId('workflow-sharing-modal-users-select'),
saveButton: () => cy.getByTestId('workflow-sharing-modal-save-button'),
closeButton: () => this.getters.modal().find('.el-dialog__close').first(),
};
actions = {
addUser: (email: string) => {
this.getters.usersSelect().click();
this.getters
.usersSelect()
.get('.el-select-dropdown__item')
.contains(email.toLowerCase())
.click();
},
save: () => {
this.getters.saveButton().click();
},
closeModal: () => {
this.getters.closeButton().click();
},
};
}