diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts
index 8dba8dab..02048c7f 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts
@@ -14,6 +14,29 @@ test.beforeEach(async ({ page }) => {
});
test.describe('Doc Editor', () => {
+ test('it saves the doc when we quit pages', async ({ page, browserName }) => {
+ // eslint-disable-next-line playwright/no-skipped-test
+ test.skip(browserName === 'webkit', 'This test is very flaky with webkit');
+
+ // Check the first doc
+ const doc = await goToGridDoc(page);
+
+ await verifyDocName(page, doc);
+
+ const editor = page.locator('.ProseMirror');
+ await editor.click();
+ await editor.fill('Hello World Doc persisted 2');
+ await expect(editor.getByText('Hello World Doc persisted 2')).toBeVisible();
+
+ await page.goto('/');
+
+ await goToGridDoc(page, {
+ title: doc,
+ });
+
+ await expect(editor.getByText('Hello World Doc persisted 2')).toBeVisible();
+ });
+
test('it check translations of the slash menu when changing language', async ({
page,
browserName,
@@ -241,29 +264,6 @@ test.describe('Doc Editor', () => {
await expect(editor.getByText('Hello World Doc persisted 1')).toBeVisible();
});
- test('it saves the doc when we quit pages', async ({ page, browserName }) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(browserName === 'webkit', 'This test is very flaky with webkit');
-
- // Check the first doc
- const doc = await goToGridDoc(page);
-
- await verifyDocName(page, doc);
-
- const editor = page.locator('.ProseMirror');
- await editor.click();
- await editor.fill('Hello World Doc persisted 2');
- await expect(editor.getByText('Hello World Doc persisted 2')).toBeVisible();
-
- await page.goto('/');
-
- await goToGridDoc(page, {
- title: doc,
- });
-
- await expect(editor.getByText('Hello World Doc persisted 2')).toBeVisible();
- });
-
test('it cannot edit if viewer', async ({ page }) => {
await mockedDocument(page, {
abilities: {
diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts
index 8414b0c7..5e5a9dc2 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts
@@ -67,6 +67,53 @@ test.describe('Doc Visibility', () => {
test.describe('Doc Visibility: Restricted', () => {
test.use({ storageState: { cookies: [], origins: [] } });
+ test('A doc is accessible when member.', async ({ page, browserName }) => {
+ test.slow();
+ await page.goto('/');
+ await keyCloakSignIn(page, browserName);
+
+ const [docTitle] = await createDoc(page, 'Restricted auth', browserName, 1);
+
+ await verifyDocName(page, docTitle);
+
+ await page.getByRole('button', { name: 'Share' }).click();
+
+ const inputSearch = page.getByRole('combobox', {
+ name: 'Quick search input',
+ });
+
+ const otherBrowser = browsersName.find((b) => b !== browserName);
+ const username = `user@${otherBrowser}.e2e`;
+ await inputSearch.fill(username);
+ await page.getByRole('option', { name: username }).first().click();
+
+ // Choose a role
+ const container = page.getByTestId('doc-share-add-member-list');
+ await container.getByLabel('doc-role-dropdown').click();
+ await page.getByRole('button', { name: 'Administrator' }).click();
+
+ await page.getByRole('button', { name: 'Invite' }).click();
+
+ await page.locator('.c__modal__backdrop').click({
+ position: { x: 0, y: 0 },
+ });
+
+ const urlDoc = page.url();
+
+ await page
+ .getByRole('button', {
+ name: 'Logout',
+ })
+ .click();
+
+ await keyCloakSignIn(page, otherBrowser!);
+
+ await page.goto(urlDoc);
+
+ await verifyDocName(page, docTitle);
+ await expect(page.getByLabel('Share button')).toBeVisible();
+ });
+
test('A doc is not accessible when not authentified.', async ({
page,
browserName,
@@ -127,53 +174,6 @@ test.describe('Doc Visibility: Restricted', () => {
page.getByText('You do not have permission to perform this action.'),
).toBeVisible();
});
-
- test('A doc is accessible when member.', async ({ page, browserName }) => {
- test.slow();
- await page.goto('/');
- await keyCloakSignIn(page, browserName);
-
- const [docTitle] = await createDoc(page, 'Restricted auth', browserName, 1);
-
- await verifyDocName(page, docTitle);
-
- await page.getByRole('button', { name: 'Share' }).click();
-
- const inputSearch = page.getByRole('combobox', {
- name: 'Quick search input',
- });
-
- const otherBrowser = browsersName.find((b) => b !== browserName);
- const username = `user@${otherBrowser}.e2e`;
- await inputSearch.fill(username);
- await page.getByRole('option', { name: username }).click();
-
- // Choose a role
- const container = page.getByTestId('doc-share-add-member-list');
- await container.getByLabel('doc-role-dropdown').click();
- await page.getByRole('button', { name: 'Administrator' }).click();
-
- await page.getByRole('button', { name: 'Invite' }).click();
-
- await page.locator('.c__modal__backdrop').click({
- position: { x: 0, y: 0 },
- });
-
- const urlDoc = page.url();
-
- await page
- .getByRole('button', {
- name: 'Logout',
- })
- .click();
-
- await keyCloakSignIn(page, otherBrowser!);
-
- await page.goto(urlDoc);
-
- await verifyDocName(page, docTitle);
- await expect(page.getByLabel('Share button')).toBeVisible();
- });
});
test.describe('Doc Visibility: Public', () => {
diff --git a/src/frontend/apps/impress/.env b/src/frontend/apps/impress/.env
index 3cf0e897..e69de29b 100644
--- a/src/frontend/apps/impress/.env
+++ b/src/frontend/apps/impress/.env
@@ -1,2 +0,0 @@
-NEXT_PUBLIC_API_ORIGIN=
-NEXT_PUBLIC_SW_DEACTIVATED=
diff --git a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx
index 73236534..af8a3a93 100644
--- a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx
+++ b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx
@@ -140,15 +140,14 @@ export const DocShareModal = ({ doc, onClose }: Props) => {
return {
groupName: t('Search user result'),
elements: users,
- endActions:
- isEmail && users.length === 0
- ? [
- {
- content: ,
- onSelect: () => void onSelect(newUser),
- },
- ]
- : undefined,
+ endActions: isEmail
+ ? [
+ {
+ content: ,
+ onSelect: () => void onSelect(newUser),
+ },
+ ]
+ : undefined,
};
}, [searchUsersQuery.data, t, userQuery]);