Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/helpers/widgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export type WidgetId =
| 'suggestions'
| 'calculator';

const DEFAULT_WIDGETS: WidgetId[] = ['price', 'blocks', 'news', 'facts', 'weather', 'suggestions', 'calculator'];

type WidgetMetadata = {
listItemId: string;
actionName: string;
Expand Down Expand Up @@ -61,8 +63,6 @@ const WIDGETS: Record<WidgetId, WidgetMetadata> = {
},
};

const DEFAULT_WIDGETS: WidgetId[] = ['price', 'blocks', 'suggestions'];

function widgetMetadata(widget: WidgetId): WidgetMetadata {
return WIDGETS[widget];
}
Expand Down Expand Up @@ -101,7 +101,7 @@ export async function scrollHomeToWidgets() {
export async function openWidgetsFeed() {
await scrollHomeToWidgets();
await tap('WidgetsAdd');
await tapIfDisplayed('WidgetsOnboarding-button');
await tapIfDisplayed('WidgetsOnboardingAddWidget');
}

export async function openWidgetPreview(widget: WidgetId) {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/backup.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('@backup - Backup', () => {
await sleep(1000); // wait for the app to settle
await deleteAllDefaultWidgets();
await tap('WidgetsAdd');
await tap('WidgetsOnboarding-button');
await tap('WidgetsOnboardingAddWidget');
await tap('WidgetListItem-price');
await elementById('WidgetSave').waitForDisplayed();
await sleep(1000); // wait for the app to settle
Expand Down
9 changes: 6 additions & 3 deletions test/specs/widgets.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ describe('@widgets - Widgets', () => {

await scrollHomeToWidgets();
await expectWidgetPresent('price');
await expectWidgetPresent('suggestions');
await expectWidgetPresent('weather');
await expectWidgetPresent('calculator');
await expectWidgetPresent('blocks');

await openSettings();
Expand All @@ -114,7 +115,8 @@ describe('@widgets - Widgets', () => {

await scrollHomeToWidgets();
await expectWidgetPresent('price', false, { timeout: 5000 });
await expectWidgetPresent('suggestions', false, { timeout: 5000 });
await expectWidgetPresent('weather', false, { timeout: 5000 });
await expectWidgetPresent('calculator', false, { timeout: 5000 });
await expectWidgetPresent('blocks', false, { timeout: 5000 });

await openSettings();
Expand All @@ -125,7 +127,8 @@ describe('@widgets - Widgets', () => {

await scrollHomeToWidgets();
await expectWidgetPresent('price');
await expectWidgetPresent('suggestions');
await expectWidgetPresent('weather');
await expectWidgetPresent('calculator');
await expectWidgetPresent('blocks');
});
});