Files
myeasycms-v2/apps/e2e/tests/user-billing/user-billing.spec.ts
giancarlo cf487b74df Update status checks in billing tests
The commit updates the expected billing status from 'Trial' to 'Active' in both user-billing and team-billing end-to-end tests. Additionally, it changes the import order in both test files but doesn't affect any functionalities.
2024-04-24 20:17:20 +07:00

33 lines
858 B
TypeScript

import { Page, expect, test } from '@playwright/test';
import { UserBillingPageObject } from './user-billing.po';
test.describe('User Billing', () => {
let page: Page;
let po: UserBillingPageObject;
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
po = new UserBillingPageObject(page);
await po.setup();
});
test('user can subscribe to a plan', async ({ page }) => {
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('Active');
await expect(po.billing.manageBillingButton()).toBeVisible();
});
});