@@ -34,17 +34,19 @@ describe('@widgets - Widgets', () => {
3434 await tap ( 'WidgetEdit' ) ;
3535 await elementById ( 'WidgetEditPreview' ) . waitForDisplayed ( ) ;
3636 // Select BTC/EUR row
37- await tap ( 'WidgetEditField-BTC/EUR' ) ;
37+ await tap ( driver . isAndroid ? 'BTC/EUR_setting_row' : 'WidgetEditField-BTC/EUR' ) ;
3838 await sleep ( 1000 ) ; // Wait for the UI to settle
3939
4040 // Scroll the edit view
4141 await swipeFullScreen ( 'up' ) ;
4242 await swipeFullScreen ( 'up' ) ;
4343 await sleep ( 500 ) ;
4444
45- // Set timeframe and show source
46- await tap ( 'WidgetEditField-1W' ) ;
47- await tap ( 'WidgetEditField-showSource' ) ;
45+ // Set timeframe and, on iOS, keep testing the existing source toggle.
46+ await tap ( driver . isAndroid ? '1W_setting_row' : 'WidgetEditField-1W' ) ;
47+ if ( driver . isIOS ) {
48+ await tap ( 'WidgetEditField-showSource' ) ;
49+ }
4850 await sleep ( 1000 ) ; // Wait for the UI to settle
4951
5052 // Preview and save
@@ -66,7 +68,6 @@ describe('@widgets - Widgets', () => {
6668 // Assertions
6769 await elementById ( 'PriceWidget' ) . waitForDisplayed ( ) ;
6870 await elementById ( 'PriceWidgetRow-BTC/EUR' ) . waitForDisplayed ( ) ;
69- await elementById ( 'PriceWidgetSource' ) . waitForDisplayed ( ) ;
7071
7172 // --- Edit the Price widget back to defaults ---
7273 await tap ( 'WidgetsEdit' ) ;
@@ -91,17 +92,12 @@ describe('@widgets - Widgets', () => {
9192 // After saving, widget should remain visible…
9293 await elementById ( 'PriceWidget' ) . waitForDisplayed ( ) ;
9394
94- // …but the BTC/EUR row and Source label should be gone
95+ // …but the BTC/EUR row should be gone
9596 await elementById ( 'PriceWidgetRow-BTC/EUR' ) . waitForDisplayed ( {
9697 reverse : true ,
9798 timeout : 8000 ,
9899 interval : 250 ,
99100 } ) ;
100- await elementById ( 'PriceWidgetSource' ) . waitForDisplayed ( {
101- reverse : true ,
102- timeout : 8000 ,
103- interval : 250 ,
104- } ) ;
105101
106102 // Delete Price Widget
107103 await tap ( 'WidgetsEdit' ) ;
@@ -162,14 +158,14 @@ describe('@widgets - Widgets', () => {
162158 await elementById ( 'PriceWidget' ) . waitForDisplayed ( ) ;
163159 await elementById ( 'SuggestionsWidget' ) . waitForDisplayed ( ) ;
164160 await elementById ( 'BlocksWidget' ) . waitForDisplayed ( ) ;
165- await elementByText ( 'Bitcoin Price' ) . waitForDisplayed ( ) ;
161+ if ( driver . isAndroid ) {
162+ await elementByText ( 'Bitcoin Price' ) . waitForDisplayed ( {
163+ reverse : true ,
164+ timeout : 5000 ,
165+ } ) ;
166+ } else {
167+ await elementByText ( 'Bitcoin Price' ) . waitForDisplayed ( ) ;
168+ }
166169 await elementByText ( 'Bitcoin Blocks' ) . waitForDisplayed ( ) ;
167-
168- // Cleanup: disable widget titles to restore defaults
169- await openSettings ( ) ;
170- await tap ( 'WidgetsSettings' ) ;
171- await tap ( 'ShowWidgetTitles' ) ;
172- await tap ( 'NavigationBack' ) ;
173- await doNavigationClose ( ) ;
174170 } ) ;
175171} ) ;
0 commit comments