test: add in-between assertions and more fixtures (#1224)

This commit is contained in:
Ali BARIN
2023-08-18 18:34:52 +02:00
committed by GitHub
parent dbe18dd100
commit cb06d3b0ae
10 changed files with 121 additions and 66 deletions

View File

@@ -1,11 +1,11 @@
const base = require('@playwright/test');
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 { LoginPage } = require('./login-page');
exports.test = base.test.extend({
exports.test = test.extend({
page: async ({ page }, use) => {
await new LoginPage(page).login();
@@ -25,4 +25,12 @@ exports.test = base.test.extend({
},
});
exports.expect = base.expect;
expect.extend({
toBeClickableLink: async (locator) => {
await expect(locator).not.toHaveAttribute('aria-disabled', 'true');
return { pass: true };
}
});
exports.expect = expect;