new widget types
This commit is contained in:
@@ -23,9 +23,25 @@ void main() {
|
||||
expect(restored.showAmountIn, isFalse);
|
||||
expect(restored.showCount, isTrue);
|
||||
expect(restored.halfWidth, isFalse);
|
||||
expect(restored.type, HomeWidgetType.stats);
|
||||
|
||||
final half = widget.copyWith(halfWidth: true);
|
||||
expect(HomeFilterWidget.fromJson(half.toJson()).halfWidth, isTrue);
|
||||
final budget = widget.copyWith(
|
||||
halfWidth: true,
|
||||
type: HomeWidgetType.budget,
|
||||
iconId: 'cart',
|
||||
chartStyle: HomeWidgetChartStyle.ring,
|
||||
budgetCapMode: HomeBudgetCapMode.averageMonths,
|
||||
budgetAverageMonths: 6,
|
||||
budgetFixedAmount: 250,
|
||||
);
|
||||
final budgetRestored = HomeFilterWidget.fromJson(budget.toJson());
|
||||
expect(budgetRestored.halfWidth, isTrue);
|
||||
expect(budgetRestored.type, HomeWidgetType.budget);
|
||||
expect(budgetRestored.iconId, 'cart');
|
||||
expect(budgetRestored.chartStyle, HomeWidgetChartStyle.ring);
|
||||
expect(budgetRestored.budgetCapMode, HomeBudgetCapMode.averageMonths);
|
||||
expect(budgetRestored.budgetAverageMonths, 6);
|
||||
expect(budgetRestored.budgetFixedAmount, 250);
|
||||
});
|
||||
|
||||
test('mergeHomeFilterWidgets unions by id with local wins', () {
|
||||
|
||||
Reference in New Issue
Block a user