mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-13 16:23:18 +01:00
15 lines
570 B
TypeScript
15 lines
570 B
TypeScript
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);
|
|
}
|