mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
test: Migrate 1-workflows to Playwright (#17360)
This commit is contained in:
27
packages/testing/playwright/pages/WorkflowSharingModal.ts
Normal file
27
packages/testing/playwright/pages/WorkflowSharingModal.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { BasePage } from './BasePage';
|
||||
|
||||
export class WorkflowSharingModal extends BasePage {
|
||||
getModal() {
|
||||
return this.page.getByTestId('workflowShare-modal');
|
||||
}
|
||||
|
||||
async waitForModal() {
|
||||
await this.getModal().waitFor({ state: 'visible', timeout: 5000 });
|
||||
}
|
||||
|
||||
async addUser(email: string) {
|
||||
await this.clickByTestId('project-sharing-select');
|
||||
await this.page
|
||||
.locator('.el-select-dropdown__item')
|
||||
.filter({ hasText: email.toLowerCase() })
|
||||
.click();
|
||||
}
|
||||
|
||||
async save() {
|
||||
await this.clickByTestId('workflow-sharing-modal-save-button');
|
||||
}
|
||||
|
||||
async close() {
|
||||
await this.getModal().locator('.el-dialog__close').first().click();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user