test(user-interface-configuration): write initial tests (#1242)

* test(user-interface): add tests with playwright

* test: refactor UI configuration tests

---------

Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
This commit is contained in:
Rıdvan Akca
2023-08-25 22:31:02 +03:00
committed by GitHub
parent ddeb18f626
commit a3b3038709
20 changed files with 389 additions and 69 deletions

View File

@@ -1,7 +1,9 @@
const path = require('node:path');
const { BasePage } = require('./base-page');
const { AuthenticatedPage } = require('./authenticated-page');
export class ApplicationsPage extends AuthenticatedPage {
screenshotPath = '/applications';
export class ApplicationsPage extends BasePage {
/**
* @param {import('@playwright/test').Page} page
*/
@@ -11,12 +13,4 @@ export class ApplicationsPage extends BasePage {
this.drawerLink = this.page.getByTestId('apps-page-drawer-link');
this.addConnectionButton = this.page.getByTestId('add-connection-button');
}
async screenshot(options = {}) {
const { path: plainPath, ...restOptions } = options;
const computedPath = path.join('applications', plainPath);
return await super.screenshot({ path: computedPath, ...restOptions });
}
}