Refactor billing process in e2e tests

Code for billing process was refactored in end-to-end tests for clean code and better structure. In the described tests, related codes and classes have been moved to a new class named BillingPageObject. All corresponding calls were updated accordingly.
This commit is contained in:
giancarlo
2024-04-14 17:54:15 +08:00
parent d078e0021c
commit 0824ac8e9f
8 changed files with 88 additions and 51 deletions

View File

@@ -1,14 +1,14 @@
import { Page } from '@playwright/test';
import { AuthPageObject } from '../authentication/auth.po';
import { StripePageObject } from '../utils/stripe.po';
import { BillingPageObject } from '../utils/billing.po';
export class UserBillingPageObject {
private readonly auth: AuthPageObject;
public readonly stripe: StripePageObject;
public readonly billing: BillingPageObject;
constructor(page: Page) {
this.auth = new AuthPageObject(page);
this.stripe = new StripePageObject(page);
this.billing = new BillingPageObject(page);
}
async setup() {