diff --git a/e2e-tests/common/context.ts b/e2e-tests/common/context.ts index fa6da9f9..339c02ed 100644 --- a/e2e-tests/common/context.ts +++ b/e2e-tests/common/context.ts @@ -318,8 +318,7 @@ export function getIdentifiersToTest(): string[] { export function getPageBaseUrlToTest(instanceId: string): string { let baseUrl = - process.env.TEST_PAGE_BASE_URL || - `https://{instanceId}.watch.staging.kausal.tech`; + process.env.TEST_PAGE_BASE_URL || `http://{instanceId}.localhost:3000`; baseUrl = baseUrl.replace('{instanceId}', instanceId); return baseUrl; } diff --git a/e2e-tests/tests/basic.spec.ts b/e2e-tests/tests/basic.spec.ts index 3a56b618..fae9016d 100644 --- a/e2e-tests/tests/basic.spec.ts +++ b/e2e-tests/tests/basic.spec.ts @@ -97,17 +97,18 @@ const testPlan = (planId: string) => }); test('empty page', async ({ page, ctx }) => { - const EmptyPageMenuItem = ctx.getEmptyPageMenuItem(); - test.skip(!EmptyPageMenuItem, 'No empty pages for plan'); + const emptyPageMenuItem = ctx.getEmptyPageMenuItem(); + test.skip(!emptyPageMenuItem, 'No empty pages for plan'); - const items = ctx.getEmptyPageChildrenItems(EmptyPageMenuItem?.page.id); + const items = ctx.getEmptyPageChildrenItems(emptyPageMenuItem?.page.id); test.skip( !items || items.length === 0, 'No children category or content pages for plan' ); const nav = page.locator('nav#global-navigation-bar'); - const emptyPageMenuLink = nav.getByRole('link', { - name: EmptyPageMenuItem?.page.title, + await expect(nav).toBeVisible(); + const emptyPageMenuLink = nav.getByRole('button', { + name: emptyPageMenuItem?.page.title, exact: true, }); await emptyPageMenuLink.click();