test: rewrite executions tests with playwright (#1207)
This commit is contained in:
12
packages/e2e-tests/fixtures/executions-page.js
Normal file
12
packages/e2e-tests/fixtures/executions-page.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const path = require('node:path');
|
||||
const { BasePage } = require('./base-page');
|
||||
|
||||
export class ExecutionsPage extends BasePage {
|
||||
async screenshot(options = {}) {
|
||||
const { path: plainPath, ...restOptions } = options;
|
||||
|
||||
const computedPath = path.join('executions', plainPath);
|
||||
|
||||
return await super.screenshot({ path: computedPath, ...restOptions });
|
||||
}
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
const base = require('@playwright/test');
|
||||
const { ApplicationsPage } = require('./applications-page');
|
||||
const { ConnectionsPage } = require('./connections-page');
|
||||
const { ExecutionsPage } = require('./executions-page');
|
||||
|
||||
exports.test = base.test.extend({
|
||||
applicationsPage: async ({ page }, use) => {
|
||||
@@ -9,5 +10,8 @@ exports.test = base.test.extend({
|
||||
connectionsPage: async ({ page }, use) => {
|
||||
await use(new ConnectionsPage(page));
|
||||
},
|
||||
executionsPage: async ({ page }, use) => {
|
||||
await use(new ExecutionsPage(page));
|
||||
},
|
||||
});
|
||||
exports.expect = base.expect;
|
||||
|
Reference in New Issue
Block a user