
* test(user-interface): add tests with playwright * test: refactor UI configuration tests --------- Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
const { test, expect } = require('@playwright/test');
|
|
const { ApplicationsPage } = require('./applications-page');
|
|
const { ConnectionsPage } = require('./connections-page');
|
|
const { ExecutionsPage } = require('./executions-page');
|
|
const { FlowEditorPage } = require('./flow-editor-page');
|
|
const { UserInterfacePage } = require('./user-interface-page');
|
|
const { LoginPage } = require('./login-page');
|
|
|
|
exports.test = test.extend({
|
|
page: async ({ page }, use) => {
|
|
await new LoginPage(page).login();
|
|
|
|
await use(page);
|
|
},
|
|
applicationsPage: async ({ page }, use) => {
|
|
await use(new ApplicationsPage(page));
|
|
},
|
|
connectionsPage: async ({ page }, use) => {
|
|
await use(new ConnectionsPage(page));
|
|
},
|
|
executionsPage: async ({ page }, use) => {
|
|
await use(new ExecutionsPage(page));
|
|
},
|
|
flowEditorPage: async ({ page }, use) => {
|
|
await use(new FlowEditorPage(page));
|
|
},
|
|
userInterfacePage: async ({ page }, use) => {
|
|
await use(new UserInterfacePage(page));
|
|
},
|
|
});
|
|
|
|
expect.extend({
|
|
toBeClickableLink: async (locator) => {
|
|
await expect(locator).not.toHaveAttribute('aria-disabled', 'true');
|
|
|
|
return { pass: true };
|
|
},
|
|
});
|
|
|
|
exports.expect = expect;
|