test: rewrite connections tests with playwright (#1203)

This commit is contained in:
Rıdvan Akca
2023-08-11 18:55:17 +03:00
committed by Rıdvan Akca
parent 69297c2dd8
commit 8f7785e9d2
4 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const path = require('node:path');
const { BasePage } = require('./base-page');
export class ConnectionsPage extends BasePage {
async screenshot(options = {}) {
const { path: plainPath, ...restOptions } = options;
const computedPath = path.join('connections', plainPath);
return await super.screenshot({ path: computedPath, ...restOptions });
}
async clickAddConnectionButton() {
await this.page.getByTestId('add-connection-button').click();
}
}