test: add pop-up notification test

This commit is contained in:
Jakub P.
2024-09-06 15:32:00 +02:00
committed by Ali BARIN
parent 297543f9dd
commit 8d10f26f56
4 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
const { BasePage } = require('../../base-page');
export class AddMattermostConnectionModal extends BasePage {
/**
* @param {import('@playwright/test').Page} page
*/
constructor (page) {
super(page);
this.clientIdInput = page.getByTestId('clientId-text');
this.clientIdSecretInput = page.getByTestId('clientSecret-text');
this.instanceUrlInput = page.getByTestId("instanceUrl-text");
this.submitButton = page.getByTestId('create-connection-button');
}
async fillConnectionForm() {
await this.instanceUrlInput.fill('https://mattermost.com');
await this.clientIdInput.fill('aaa');
await this.clientIdSecretInput.fill('bbb');
}
async submitConnectionForm() {
await this.submitButton.click();
}
}

View File

@@ -18,6 +18,7 @@ export class FlowEditorPage extends AuthenticatedPage {
this.connectionAutocomplete = this.page.getByTestId(
'choose-connection-autocomplete'
);
this.addNewConnectionItem = this.page.getByText('Add new connection');
this.testOutput = this.page.getByTestId('flow-test-substep-output');
this.hasNoOutput = this.page.getByTestId('flow-test-substep-no-output');
this.unpublishFlowButton = this.page.getByTestId('unpublish-flow-button');