From 7b47ac5f278b171e86ec95057482973372c4df97 Mon Sep 17 00:00:00 2001 From: Mathieu Pillard Date: Fri, 10 Jan 2025 17:30:19 +0100 Subject: [PATCH] Adjust test to no longer depend on `es` --- tests/unit/amo/components/TestPage.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/unit/amo/components/TestPage.js b/tests/unit/amo/components/TestPage.js index 328b4459f6e..f48c831762a 100644 --- a/tests/unit/amo/components/TestPage.js +++ b/tests/unit/amo/components/TestPage.js @@ -989,31 +989,31 @@ describe(__filename, () => { }); it('changes the language in the URL on change', async () => { - _dispatchClientMetadata({ lang: 'fr' }); - render({ location: '/fr/firefox/' }); - expect(window.location.pathname).toEqual('/fr/firefox/'); + _dispatchClientMetadata({ lang: 'de' }); + render({ location: '/de/firefox/' }); + expect(window.location.pathname).toEqual('/de/firefox/'); await userEvent.selectOptions( screen.getByRole('combobox', { name: 'Change language' }), - screen.getByRole('option', { name: 'Español' }), + screen.getByRole('option', { name: 'Français' }), ); - expect(window.location).toEqual('/es/firefox/'); + expect(window.location).toEqual('/fr/firefox/'); }); it('changes the language in the URL on change with a query', async () => { - _dispatchClientMetadata({ lang: 'fr' }); + _dispatchClientMetadata({ lang: 'de' }); render({ - location: '/fr/firefox/?page=1&q=something', + location: '/de/firefox/?page=1&q=something', }); - expect(window.location.pathname).toEqual('/fr/firefox/'); + expect(window.location.pathname).toEqual('/de/firefox/'); await userEvent.selectOptions( screen.getByRole('combobox', { name: 'Change language' }), - screen.getByRole('option', { name: 'Español' }), + screen.getByRole('option', { name: 'Français' }), ); - expect(window.location).toEqual('/es/firefox/?page=1&q=something'); + expect(window.location).toEqual('/fr/firefox/?page=1&q=something'); }); it('only changes the locale section of the URL', async () => {