mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-14 08:43:16 +01:00
move upgrade modal to ui package and add trial status and cancel trial ui
This commit is contained in:
14
e2e/utils/billing.ts
Normal file
14
e2e/utils/billing.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { PLAYWRIGHT_BASE_URL } from '../../playwright/config';
|
||||
import type { TestContext } from './api';
|
||||
|
||||
/**
|
||||
* End the trial of the test organization, only works with the Billing extension. Reload the page
|
||||
* afterwards, the page props still contain the trial otherwise.
|
||||
*/
|
||||
export async function cancelTrialViaApi(ctx: TestContext): Promise<void> {
|
||||
const response = await ctx.request.post(
|
||||
`${PLAYWRIGHT_BASE_URL}/api/v1/organizations/${ctx.orgId}/trial/cancel`
|
||||
);
|
||||
expect(response.status()).toBe(204);
|
||||
}
|
||||
Reference in New Issue
Block a user