diff --git a/src/frontend/apps/e2e/.env b/src/frontend/apps/e2e/.env index 7979a0bd..9a6bbbf2 100644 --- a/src/frontend/apps/e2e/.env +++ b/src/frontend/apps/e2e/.env @@ -1,5 +1,6 @@ PORT=3000 BASE_URL=http://localhost:3000 +BASE_API_URL=http://localhost:8071/api/v1.0 CUSTOM_SIGN_IN=false TEST_INSTANCE_ONLY=false SIGN_IN_EL_TRIGGER=Start Writing diff --git a/src/frontend/apps/e2e/.env.example b/src/frontend/apps/e2e/.env.example index 9271b6bc..9273d91a 100644 --- a/src/frontend/apps/e2e/.env.example +++ b/src/frontend/apps/e2e/.env.example @@ -1,5 +1,6 @@ PORT=3000 BASE_URL=http://localhost:3000 +BASE_API_URL=http://localhost:8071/api/v1.0 TEST_INSTANCE_ONLY=false CUSTOM_SIGN_IN=false SIGN_IN_EL_TRIGGER=Start Writing diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-create.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-create.spec.ts index 0bc3276e..571c846f 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-create.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-create.spec.ts @@ -169,7 +169,7 @@ test.describe('Doc Create: Not logged', () => { }; const newDoc = await request.post( - `http://localhost:8071/api/v1.0/documents/create-for-owner/`, + `${process.env.BASE_API_URL}/documents/create-for-owner/`, { data, headers: { diff --git a/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts b/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts index ad4ae595..06209b6c 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts @@ -208,8 +208,11 @@ export const goToGridDoc = async ( page: Page, { nthRow = 1, title }: GoToGridDocOptions = {}, ) => { - const header = page.locator('header').first(); - await header.locator('h1').getByText('Docs').click(); + if ( + await page.getByRole('button', { name: 'Back to homepage' }).isVisible() + ) { + await page.getByRole('button', { name: 'Back to homepage' }).click(); + } const docsGrid = page.getByTestId('docs-grid'); await expect(docsGrid).toBeVisible();