fix: tests?.

This commit is contained in:
Darshan
2025-03-17 12:24:12 +05:30
parent 8980fcfeaa
commit 07e754e29c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ export function getOrganizationIdFromUrl(pathname: string) {
export function getProjectIdFromUrl(pathname: string) {
// TODO: use base path from svelte here
const regex = /\/console\/project-([^/]+)(\/.*)?/;
const regex = /\/console\/project-(?:[a-z]{2,3}-)?([^/]+)(\/.*)?/;
const match = pathname.match(regex);
if (match) {
+1 -1
View File
@@ -14,6 +14,6 @@ test('upgrade - free tier', async ({ page }) => {
await enterCreditCard(page);
// skip members
await page.getByRole('button', { name: 'change plan' }).click();
await page.waitForURL('**/console/project-*/overview/platforms');
await page.waitForURL(/\/console\/project-(?:[a-z0-9]+-)?([^/]+)\/overview\/platforms/);
});
});
+1 -1
View File
@@ -24,7 +24,7 @@ export async function createFreeProject(page: Page): Promise<Metadata> {
await page.getByRole('button', { name: 'next' }).click();
await page.locator('label').filter({ hasText: 'Frankfurt' }).click();
await page.getByRole('button', { name: 'create' }).click();
await page.waitForURL('./project-**/overview/platforms');
await page.waitForURL(/\/project-(?:[a-z0-9]+-)?([^/]+)\/overview\/platforms/);
expect(page.url()).toContain('/console/project-');
return getProjectIdFromUrl(page.url());
+1 -1
View File
@@ -49,7 +49,7 @@ export async function createProProject(page: Page): Promise<Metadata> {
await page.getByRole('button', { name: 'next' }).click();
await page.locator('label').filter({ hasText: 'frankfurt' }).click();
await page.getByRole('button', { name: 'create' }).click();
await page.waitForURL('./project-**/overview/platforms');
await page.waitForURL(/\/project-(?:[a-z0-9]+-)?([^/]+)\/overview\/platforms/);
expect(page.url()).toContain('/project-');
return getProjectIdFromUrl(page.url());