feat: introduce playwright (#1194)
* feat: introduce playwright * test: migrate apps folder to playwright (#1201) * test: rewrite connections tests with playwright (#1203) * test: rewrite executions tests with playwright (#1207) * test: rewrite flow editor tests with playwright (#1212) * test(flow-editor): rewrite tests using serial mode (#1218) * test: update custom connection creation paths * test: move login logic to page fixture * test: remove cypress tests and deps --------- Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
This commit is contained in:
27
packages/e2e-tests/fixtures/login-page.js
Normal file
27
packages/e2e-tests/fixtures/login-page.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const path = require('node:path');
|
||||
const { BasePage } = require('./base-page');
|
||||
|
||||
export class LoginPage extends BasePage {
|
||||
/**
|
||||
* @param {import('@playwright/test').Page} page
|
||||
*/
|
||||
constructor(page) {
|
||||
super(page);
|
||||
|
||||
this.page = page;
|
||||
|
||||
this.emailTextField = this.page.getByTestId('email-text-field');
|
||||
this.passwordTextField = this.page.getByTestId('password-text-field');
|
||||
this.loginButton = this.page.getByTestId('login-button');
|
||||
}
|
||||
|
||||
path = '/login';
|
||||
|
||||
async login() {
|
||||
await this.page.goto(this.path);
|
||||
await this.emailTextField.fill(process.env.LOGIN_EMAIL);
|
||||
await this.passwordTextField.fill(process.env.LOGIN_PASSWORD);
|
||||
|
||||
await this.loginButton.click();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user