@@ -349,33 +349,53 @@ safeDescribe("8 - Device Settings", () => {
349349
350350 await appManipulationService . hideExpoOverlay ( appWebsocket ) ;
351351
352- radonViewsService . openRadonDeviceSettingsMenu ( ) ;
353- await elementHelperService . findAndClickElementByTag (
354- "device-settings-location"
355- ) ;
356- const locationInput =
357- await elementHelperService . findAndWaitForElementByTag (
358- "coordinates-input"
352+ const locationsToTest = [
353+ { lattitude : 1 , longitude : 1 } ,
354+ { lattitude : 0 , longitude : 0 } ,
355+ { lattitude : - 1 , longitude : - 1 } ,
356+ ] ;
357+ for ( const actualLocation of locationsToTest ) {
358+ radonViewsService . openRadonDeviceSettingsMenu ( ) ;
359+ await elementHelperService . findAndClickElementByTag (
360+ "device-settings-location"
361+ ) ;
362+ const locationInput =
363+ await elementHelperService . findAndWaitForElementByTag (
364+ "coordinates-input"
365+ ) ;
366+ await locationInput . clear ( ) ;
367+ await driver . sleep ( 1000 ) ;
368+ await locationInput . sendKeys (
369+ `${ actualLocation . lattitude } ${ actualLocation . longitude } ` ,
370+ Key . ENTER
359371 ) ;
360- await locationInput . clear ( ) ;
361- await driver . sleep ( 1000 ) ;
362- await locationInput . sendKeys ( "1 1" , Key . ENTER ) ;
363372
364- await elementHelperService . findAndClickElementByTag ( "modal-close-button" ) ;
365- await driver . wait ( async ( ) => {
366- try {
367- const location =
368- await appManipulationService . sendMessageAndWaitForResponse (
369- appWebsocket ,
370- "getLocation"
373+ await elementHelperService . findAndClickElementByTag (
374+ "modal-close-button"
375+ ) ;
376+ await driver . wait ( async ( ) => {
377+ try {
378+ const location =
379+ await appManipulationService . sendMessageAndWaitForResponse (
380+ appWebsocket ,
381+ "getLocation"
382+ ) ;
383+ assert . approximately (
384+ location . value . latitude ,
385+ actualLocation . lattitude ,
386+ 0.1
371387 ) ;
372- assert . approximately ( location . value . latitude , 1 , 0.1 ) ;
373- assert . approximately ( location . value . longitude , 1 , 0.1 ) ;
374- return true ;
375- } catch {
376- return false ;
377- }
378- } , 100000 ) ;
388+ assert . approximately (
389+ location . value . longitude ,
390+ actualLocation . longitude ,
391+ 0.1
392+ ) ;
393+ return true ;
394+ } catch {
395+ return false ;
396+ }
397+ } , 10000 ) ;
398+ }
379399 }
380400 ) ;
381401
@@ -415,6 +435,8 @@ safeDescribe("8 - Device Settings", () => {
415435 "getLocalization"
416436 ) ;
417437 assert . equal ( localization . value . countryCode . toLowerCase ( ) , "es" ) ;
438+ assert . equal ( localization . value . languageTag . toLowerCase ( ) , "es-es" ) ;
439+ assert . equal ( localization . value . languageCode . toLowerCase ( ) , "es" ) ;
418440 return true ;
419441 } catch {
420442 return false ;
0 commit comments