Changes include updating the user and team billing specs to increase visibility timeout and alter navigation route post-billing. Minor adjustments have been made to the page aesthetics and redirection logic. Also, refactored import statements for code organization purposes. Changes in the build script are also reflected in the commit.
32 lines
890 B
TypeScript
32 lines
890 B
TypeScript
import { expect, Page, test } from '@playwright/test';
|
|
import { TeamBillingPageObject } from './team-billing.po';
|
|
|
|
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({
|
|
timeout: 30000,
|
|
});
|
|
|
|
await po.billing.returnToBilling();
|
|
|
|
await expect(await po.billing.getStatus()).toContainText('Trial');
|
|
await expect(po.billing.manageBillingButton()).toBeVisible();
|
|
});
|
|
}); |