This commit includes three main changes. First, it updates the Zod library from version 3.23.4 to 3.23.5 across all relevant packages. Second, code readability has been enhanced by formatting modifications in several TypeScript files. Lastly, the user feedback on certain operations such as creating a team or charging for a payment is strengthened, by displaying an awaiting indicator until the operation is complete.
35 lines
888 B
TypeScript
35 lines
888 B
TypeScript
import { Page, expect, 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();
|
|
});
|
|
|
|
test('a team can subscribe to a plan', async () => {
|
|
await po.teamAccounts.goToBilling();
|
|
|
|
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(po.billing.getStatus()).toContainText('Active');
|
|
await expect(po.billing.manageBillingButton()).toBeVisible();
|
|
});
|
|
});
|