The commit changes the expected text for billing status in both 'user-billing.spec.ts' and 'team-billing.spec.ts' from 'active' to 'Active'. In addition, the waiting time for the page to return to home in 'billing.po.ts' has been increased from 500ms to 1000ms to improve testing reliability.
32 lines
934 B
TypeScript
32 lines
934 B
TypeScript
import { expect, Page, test } from '@playwright/test';
|
|
import { TeamBillingPageObject } from './team-billing.po';
|
|
import exp from 'node:constants';
|
|
|
|
test.describe('Team Billing', () => {
|
|
let page: Page;
|
|
let po: TeamBillingPageObject;
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
page = await browser.newPage();
|
|
po = new TeamBillingPageObject(page);
|
|
|
|
await po.setup();
|
|
await po.teamAccounts.goToBilling();
|
|
});
|
|
|
|
test('a team can subscribe to a plan', async () => {
|
|
await po.billing.selectPlan(0);
|
|
await po.billing.proceedToCheckout();
|
|
|
|
await po.billing.stripe.fillForm();
|
|
await po.billing.stripe.submitForm();
|
|
|
|
await expect(po.billing.successStatus()).toBeVisible();
|
|
await po.billing.returnToHome();
|
|
|
|
await po.teamAccounts.goToBilling();
|
|
|
|
await expect(await po.billing.getStatus()).toContainText('Active');
|
|
await expect(po.billing.manageBillingButton()).toBeVisible();
|
|
});
|
|
}); |