From 7e55957bdcf252a0db3b555c0b0e793384e4e875 Mon Sep 17 00:00:00 2001 From: Amanda Bullington Date: Thu, 26 Dec 2024 17:57:58 -0800 Subject: [PATCH] Fix language settings test by toggling advanced mode on --- tests/integration/LanguageSettings.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/LanguageSettings.test.js b/tests/integration/LanguageSettings.test.js index f62eab4f8..080e83f47 100644 --- a/tests/integration/LanguageSettings.test.js +++ b/tests/integration/LanguageSettings.test.js @@ -35,6 +35,12 @@ beforeAll( uniqueRealmBeforeAll ); afterAll( uniqueRealmAfterAll ); // /UNIQUE REALM SETUP +const toggleAdvancedMode = async ( ) => { + const advancedRadioButton = await screen + .findByText( /Advanced/ ); + fireEvent.press( advancedRadioButton ); +}; + describe( "LanguageSettings", ( ) => { test( "uses locale preference of the local device", ( ) => { renderAppWithComponent( ); @@ -63,12 +69,14 @@ describe( "LanguageSettings", ( ) => { test( "uses locale preference from server", async ( ) => { renderAppWithComponent( ); + await toggleAdvancedMode( ); const sciNameText = await screen.findByText( /Научное название/ ); expect( sciNameText ).toBeVisible( ); } ); test( "changes locales and updates server with new locale", async ( ) => { renderAppWithComponent( ); + await toggleAdvancedMode( ); const changeLocaleButton = await screen.findByText( /CHANGE APP LANGUAGE/ ); fireEvent.press( changeLocaleButton ); const picker = await screen.findByTestId( "ReactNativePicker" );