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.
17 lines
479 B
TypeScript
17 lines
479 B
TypeScript
import { Page } from '@playwright/test';
|
|
import { AuthPageObject } from '../authentication/auth.po';
|
|
import { BillingPageObject } from '../utils/billing.po';
|
|
|
|
export class UserBillingPageObject {
|
|
private readonly auth: AuthPageObject;
|
|
public readonly billing: BillingPageObject;
|
|
|
|
constructor(page: Page) {
|
|
this.auth = new AuthPageObject(page);
|
|
this.billing = new BillingPageObject(page);
|
|
}
|
|
|
|
async setup() {
|
|
await this.auth.signUpFlow('/home/billing');
|
|
}
|
|
} |