Skip to content

Commit 70b09b2

Browse files
committed
add widgets_2
1 parent 9fafeed commit 70b09b2

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

test/specs/widgets.e2e.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import {
66
swipeFullScreen,
77
completeOnboarding,
88
deleteAllDefaultWidgets,
9+
doNavigationClose,
910
} from '../helpers/actions';
11+
import { openSettings } from '../helpers/navigation';
1012
import { reinstallApp } from '../helpers/setup';
1113
import { ciIt } from '../helpers/suite';
1214

@@ -108,4 +110,66 @@ describe('@widgets - Widgets', () => {
108110
await elementByText('Yes, Delete').click();
109111
await elementById('WidgetsAdd').waitForDisplayed();
110112
});
113+
114+
ciIt('@widgets_2 - Widget settings: reset, show/hide, titles', async () => {
115+
await deleteAllDefaultWidgets();
116+
117+
// Reset widgets via Widget Settings
118+
await openSettings();
119+
await tap('WidgetsSettings');
120+
await tap('ResetWidgets');
121+
await tap('DialogConfirm');
122+
await sleep(1000);
123+
124+
// Verify widgets are restored
125+
await swipeFullScreen('up');
126+
await elementById('PriceWidget').waitForDisplayed();
127+
await elementById('SuggestionsWidget').waitForDisplayed();
128+
await elementById('BlocksWidget').waitForDisplayed();
129+
130+
// Toggle off "Show Widgets"
131+
await openSettings();
132+
await tap('WidgetsSettings');
133+
await tap('ShowWidgets');
134+
await tap('NavigationBack');
135+
await doNavigationClose();
136+
137+
// Verify widgets are hidden on home
138+
await swipeFullScreen('up');
139+
await elementById('PriceWidget').waitForDisplayed({
140+
reverse: true,
141+
timeout: 5000,
142+
});
143+
await elementById('SuggestionsWidget').waitForDisplayed({
144+
reverse: true,
145+
timeout: 5000,
146+
});
147+
await elementById('BlocksWidget').waitForDisplayed({
148+
reverse: true,
149+
timeout: 5000,
150+
});
151+
152+
// Toggle on "Show Widgets" + enable "Show Widget Titles"
153+
await openSettings();
154+
await tap('WidgetsSettings');
155+
await tap('ShowWidgets');
156+
await tap('ShowWidgetTitles');
157+
await tap('NavigationBack');
158+
await doNavigationClose();
159+
160+
// Verify widgets visible with titles
161+
await swipeFullScreen('up');
162+
await elementById('PriceWidget').waitForDisplayed();
163+
await elementById('SuggestionsWidget').waitForDisplayed();
164+
await elementById('BlocksWidget').waitForDisplayed();
165+
await elementByText('Bitcoin Price').waitForDisplayed();
166+
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();
174+
});
111175
});

0 commit comments

Comments
 (0)