diff --git a/CHANGELOG.md b/CHANGELOG.md
index a21793b07c..751b29c9d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ and this project adheres to
- #1262
- #1244
- #1270
+ - #1281
### Fixed
diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts
index 1e14c42ee2..f8508d8ffa 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts
@@ -29,12 +29,7 @@ test.describe('Doc Export', () => {
})
.click();
- await expect(
- page
- .locator('div')
- .filter({ hasText: /^Download$/ })
- .first(),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-export-title')).toBeVisible();
await expect(
page.getByText('Download your document in a .docx or .pdf format.'),
).toBeVisible();
@@ -45,7 +40,7 @@ test.describe('Doc Export', () => {
await expect(
page.getByRole('button', { name: 'Close the modal' }),
).toBeVisible();
- await expect(page.getByRole('button', { name: 'Download' })).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
});
test('it exports the doc with pdf line break', async ({
@@ -122,7 +117,9 @@ test.describe('Doc Export', () => {
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(path.join(__dirname, 'assets/test.svg'));
- const image = page.getByRole('img', { name: 'test.svg' });
+ const image = page
+ .locator('.--docs--editor-container img.bn-visual-media')
+ .first();
await expect(image).toBeVisible();
@@ -136,23 +133,13 @@ test.describe('Doc Export', () => {
await page.getByRole('combobox', { name: 'Format' }).click();
await page.getByRole('option', { name: 'Docx' }).click();
- await expect(
- page.getByRole('button', {
- name: 'Download',
- exact: true,
- }),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
const downloadPromise = page.waitForEvent('download', (download) => {
return download.suggestedFilename().includes(`${randomDoc}.docx`);
});
- void page
- .getByRole('button', {
- name: 'Download',
- exact: true,
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDoc}.docx`);
@@ -182,7 +169,9 @@ test.describe('Doc Export', () => {
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(path.join(__dirname, 'assets/test.svg'));
- const image = page.getByRole('img', { name: 'test.svg' });
+ const image = page
+ .locator('.--docs--editor-container img.bn-visual-media')
+ .first();
await expect(image).toBeVisible();
@@ -216,11 +205,7 @@ test.describe('Doc Export', () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
- await expect(
- page.getByRole('button', {
- name: 'Download',
- }),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
const responseCorsPromise = page.waitForResponse(
(response) =>
@@ -231,11 +216,7 @@ test.describe('Doc Export', () => {
return download.suggestedFilename().includes(`${randomDoc}.pdf`);
});
- void page
- .getByRole('button', {
- name: 'Download',
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const responseCors = await responseCorsPromise;
expect(responseCors.ok()).toBe(true);
@@ -277,21 +258,13 @@ test.describe('Doc Export', () => {
})
.click();
- await expect(
- page.getByRole('button', {
- name: 'Download',
- }),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
const downloadPromise = page.waitForEvent('download', (download) => {
return download.suggestedFilename().includes(`${randomDoc}.pdf`);
});
- void page
- .getByRole('button', {
- name: 'Download',
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDoc}.pdf`);
@@ -328,23 +301,13 @@ test.describe('Doc Export', () => {
})
.click();
- await expect(
- page.getByRole('button', {
- name: 'Download',
- exact: true,
- }),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
const downloadPromise = page.waitForEvent('download', (download) => {
return download.suggestedFilename().includes(`${randomDoc}.pdf`);
});
- void page
- .getByRole('button', {
- name: 'Download',
- exact: true,
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDoc}.pdf`);
@@ -391,23 +354,13 @@ test.describe('Doc Export', () => {
})
.click();
- await expect(
- page.getByRole('button', {
- name: 'Download',
- exact: true,
- }),
- ).toBeVisible();
+ await expect(page.getByTestId('modal-download-button')).toBeVisible();
const downloadPromise = page.waitForEvent('download', (download) => {
return download.suggestedFilename().includes(`${randomDoc}.pdf`);
});
- void page
- .getByRole('button', {
- name: 'Download',
- exact: true,
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDoc}.pdf`);
@@ -470,12 +423,7 @@ test.describe('Doc Export', () => {
return download.suggestedFilename().includes(`${randomDocFrench}.pdf`);
});
- void page
- .getByRole('button', {
- name: 'Télécharger',
- exact: true,
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDocFrench}.pdf`);
@@ -538,12 +486,7 @@ test.describe('Doc Export', () => {
})
.click();
- void page
- .getByRole('button', {
- name: 'Download',
- exact: true,
- })
- .click();
+ void page.getByTestId('modal-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${docChild}.pdf`);
diff --git a/src/frontend/apps/e2e/__tests__/app-impress/home.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/home.spec.ts
index 28f479f486..9465158c3f 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/home.spec.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/home.spec.ts
@@ -72,6 +72,7 @@ test.describe('Home page', () => {
await page.waitForLoadState('domcontentloaded');
// Wait a bit more for the responsive store to be initialized
+ // eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(500);
// Check header content
diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx
index 3d9beed178..5825569d2d 100644
--- a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx
+++ b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx
@@ -131,6 +131,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
isOpen
closeOnClickOutside
onClose={() => onClose()}
+ hideCloseButton
rightActions={
<>
@@ -155,9 +157,37 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
}
size={ModalSize.MEDIUM}
title={
-
- {t('Download')}
-
+
+
+ {t('Download')}
+
+
}
>
onClose()}
rightActions={
<>
}
>
{
docId: doc.id,
})
}
+ aria-label={t('Close the access request modal')}
>
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 3d00334d59..97041ee5c2 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
@@ -1,4 +1,4 @@
-import { Modal, ModalSize } from '@openfun/cunningham-react';
+import { Button, Modal, ModalSize } from '@openfun/cunningham-react';
import { useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { createGlobalStyle, css } from 'styled-components';
@@ -137,12 +137,29 @@ export const DocShareModal = ({ doc, onClose, isRootDoc = true }: Props) => {
aria-label={t('Share modal')}
size={isDesktop ? ModalSize.LARGE : ModalSize.FULL}
onClose={onClose}
- title={{t('Share the document')}}
+ title={
+
+ {t('Share the document')}
+
+ close
+
+ }
+ />
+
+ }
+ hideCloseButton
>
}
/>
diff --git a/src/frontend/apps/impress/src/i18n/translations.json b/src/frontend/apps/impress/src/i18n/translations.json
index 794f9a961f..65b6e7a892 100644
--- a/src/frontend/apps/impress/src/i18n/translations.json
+++ b/src/frontend/apps/impress/src/i18n/translations.json
@@ -186,6 +186,9 @@
"Can't load this page, please check your internet connection.": "Diese Seite kann nicht geladen werden. Bitte überprüfen Sie Ihre Internetverbindung.",
"Cancel": "Abbrechen",
"Close the modal": "Pop-up schließen",
+ "Close the access request modal": "Zugriffsanfrage-Modal schließen",
+ "Close the delete modal": "Lösch-Modal schließen",
+ "Close the version history modal": "Versionsverlauf-Modal schließen",
"Collaborate": "Zusammenarbeiten",
"Collaborate and write in real time, without layout constraints.": "In Echtzeit und ohne Layout-Beschränkungen schreiben und zusammenarbeiten.",
"Collaborative writing, Simplified.": "Kollaboratives Schreiben, vereinfacht.",
@@ -375,6 +378,9 @@
"Search docs": "Search docs",
"More options": "More options",
"Pinned documents": "Pinned documents",
+ "Close the access request modal": "Close the access request modal",
+ "Close the delete modal": "Close the delete modal",
+ "Close the version history modal": "Close the version history modal",
"Open actions menu for document: {{title}}": "Open actions menu for document: {{title}}",
"Open the menu of actions for the document: {{title}}": "Open the menu of actions for the document: {{title}}",
"Share with {{count}} users_one": "Share with {{count}} user",
@@ -413,6 +419,9 @@
"Can't load this page, please check your internet connection.": "No se puede cargar esta página, por favor compruebe su conexión a Internet.",
"Cancel": "Cancelar",
"Close the modal": "Cerrar modal",
+ "Close the access request modal": "Cerrar modal de solicitud de acceso",
+ "Close the delete modal": "Cerrar modal de eliminación",
+ "Close the version history modal": "Cerrar modal de historial de versiones",
"Collaborate": "Colabora",
"Collaborate and write in real time, without layout constraints.": "Colaborar y escribir en tiempo real, sin restricciones de diseño.",
"Collaborative writing, Simplified.": "Escritura colaborativa, más sencilla.",
@@ -605,6 +614,10 @@
"Can't load this page, please check your internet connection.": "Impossible de charger cette page, veuillez vérifier votre connexion Internet.",
"Cancel": "Annuler",
"Close the modal": "Fermer la modale",
+ "Close the access request modal": "Fermer la modale de demande d'accès",
+ "Close the delete modal": "Fermer la modale de suppression",
+ "Close the download modal": "Fermer la modale de téléchargement",
+ "Close the version history modal": "Fermer la modale d'historique des versions",
"Collaborate": "Collaborer",
"Collaborate and write in real time, without layout constraints.": "Collaborez et rédigez en temps réel, sans contrainte de mise en page.",
"Collaborative writing, Simplified.": "L'écriture collaborative simplifiée.",
@@ -769,6 +782,10 @@
"Summarize": "Résumer",
"Summary": "Sommaire",
"Template": "Modèle",
+ "Document template": "Modèle de document",
+ "File format": "Format de fichier",
+ "Choose a template to apply to your document before download": "Choisissez un modèle à appliquer à votre document avant le téléchargement",
+ "Choose the file format for your download": "Choisissez le format de fichier pour votre téléchargement",
"The antivirus has detected an anomaly in your file.": "L'antivirus a détecté une anomalie dans votre fichier.",
"The document has been deleted.": "Le document a bien été supprimé.",
"The document visibility has been updated.": "La visibilité du document a été mise à jour.",
@@ -983,6 +1000,9 @@
"Can't load this page, please check your internet connection.": "Kan deze pagina niet laden. Controleer je internetverbinding.",
"Cancel": "Breek af",
"Close the modal": "Sluit het venster",
+ "Close the access request modal": "Sluit het toegangsverzoek venster",
+ "Close the delete modal": "Sluit het verwijder venster",
+ "Close the version history modal": "Sluit het versiehistorie venster",
"Collaborate": "Samenwerken",
"Collaborate and write in real time, without layout constraints.": "Samenwerken en schrijven in realtime, zonder lay-out beperkingen.",
"Collaborative writing, Simplified.": "Vereenvoudigd samenwerkend",
@@ -1110,7 +1130,7 @@
"Start Writing": "Begin met schrijven",
"Summarize": "Vat samen",
"Summary": "Samenvatting",
- "Template": "Template",
+ "Template": "Sjabloon",
"The document has been deleted.": "Het document is verwijderd",
"The document visibility has been updated.": "De zichtbaarheid van het document is bijgewerkt",
"The export failed": "Het exporteren is mislukt",