Skip to content

Commit

Permalink
fix: updated lang is not shown in preferences when switching lang (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Oct 30, 2024
1 parent 0fa02ff commit 972cc3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cypress/e2e/settings/preferences.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ describe('Edit preferences', () => {

const newLang = 'de';
switchLanguage(newLang);
// Ensure the selected language is shown as the select value
cy.get(`#${PREFERENCES_LANGUAGE_SWITCH_ID}`).should(
'contain.text',
langs[newLang],
);

cy.get(`#${PREFERENCES_SAVE_BUTTON_ID}`).click();
cy.wait('@editMember').then(({ request }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/EditMemberPreferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const EditMemberPreferences = ({
>
<FormProperty title={t('PROFILE_LANGUAGE_TITLE')}>
<LanguageSwitch
lang={member.extra?.lang ?? DEFAULT_LANG}
lang={selectedLang}
id={PREFERENCES_LANGUAGE_SWITCH_ID}
onChange={setSelectedLang}
/>
Expand Down

0 comments on commit 972cc3c

Please sign in to comment.