Update Playwright staging flows and Paddle sandbox checkout
This commit is contained in:
@@ -77,8 +77,8 @@ export type JoinTokenPayload = {
|
||||
usage_limit: number | null;
|
||||
};
|
||||
|
||||
const tenantAdminEmail = process.env.E2E_TENANT_EMAIL ?? 'hello@lumen-moments.demo';
|
||||
const tenantAdminPassword = process.env.E2E_TENANT_PASSWORD ?? 'Demo1234!';
|
||||
const tenantAdminEmail = process.env.E2E_TENANT_EMAIL ?? null;
|
||||
const tenantAdminPassword = process.env.E2E_TENANT_PASSWORD ?? null;
|
||||
|
||||
export const test = base.extend<TenantAdminFixtures & TestingApiFixtures>({
|
||||
tenantAdminCredentials: async ({}, use) => {
|
||||
@@ -197,6 +197,7 @@ async function performTenantSignIn(page: Page, credentials: TenantCredentials) {
|
||||
|
||||
await page.goto('/event-admin');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
await dismissConsentBanner(page);
|
||||
}
|
||||
|
||||
type StoredTokenPayload = {
|
||||
@@ -235,3 +236,17 @@ async function expectApiSuccess(responsePromise: Promise<APIResponse>): Promise<
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
export async function dismissConsentBanner(page: Page): Promise<void> {
|
||||
const acceptButton = page.getByRole('button', {
|
||||
name: /consent\.banner\.accept|consent\.modal\.accept_all|Alle akzeptieren|Akzeptieren|Accept all|Accept/i,
|
||||
}).first();
|
||||
|
||||
try {
|
||||
if (await acceptButton.isVisible({ timeout: 2000 })) {
|
||||
await acceptButton.click();
|
||||
}
|
||||
} catch {
|
||||
// Ignore missing banner or timing issues.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user