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,4 +1,5 @@
const path = require('node:path');
const { expect } = require('@playwright/test');
const { BasePage } = require('./base-page');
export class LoginPage extends BasePage {
@@ -9,7 +10,6 @@ export class LoginPage extends BasePage {
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');
@@ -23,5 +23,7 @@ export class LoginPage extends BasePage {
await this.passwordTextField.fill(process.env.LOGIN_PASSWORD);
await this.loginButton.click();
await expect(this.loginButton).not.toBeVisible();
}
}