🐛(frontend) fix fallback translations with Trans
The fallback of the Trans component didn't work anymore after upgrade to 16.2.3 of react-i18next. Upgrading to 16.3.3 fixed the issue. We added a test to cover this case.
This commit is contained in:
@@ -27,6 +27,33 @@ test.describe('Home page', () => {
|
||||
// Check the titles
|
||||
const h2 = page.locator('h2');
|
||||
await expect(h2.getByText('Govs ❤️ Open Source.')).toBeVisible();
|
||||
await expect(page.getByText('Docs is built on top of')).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', {
|
||||
name: 'Django Rest Framework',
|
||||
}),
|
||||
).toHaveAttribute('href', 'https://www.django-rest-framework.org/');
|
||||
await expect(page.getByText('You can easily self-host Docs')).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.getByRole('link', {
|
||||
name: 'licence',
|
||||
})
|
||||
.first(),
|
||||
).toHaveAttribute(
|
||||
'href',
|
||||
'https://github.com/suitenumerique/docs/blob/main/LICENSE',
|
||||
);
|
||||
await expect(
|
||||
page.getByText('Docs is the result of a joint effort lead by the French'),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.getByRole('link', {
|
||||
name: 'Zendis',
|
||||
})
|
||||
.first(),
|
||||
).toHaveAttribute('href', 'https://zendis.de/');
|
||||
await expect(
|
||||
h2.getByText('Collaborative writing, Simplified.'),
|
||||
).toBeVisible();
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"react": "*",
|
||||
"react-aria-components": "1.13.0",
|
||||
"react-dom": "*",
|
||||
"react-i18next": "16.2.3",
|
||||
"react-i18next": "16.3.3",
|
||||
"react-intersection-observer": "10.0.0",
|
||||
"react-resizable-panels": "3.0.6",
|
||||
"react-select": "5.10.2",
|
||||
|
||||
Reference in New Issue
Block a user