feat : New listing + MainView
This commit is contained in:
@@ -1,40 +1,11 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:bahla_front/app/app.bottomsheets.dart';
|
||||
import 'package:bahla_front/app/app.locator.dart';
|
||||
import 'package:bahla_front/ui/common/app_strings.dart';
|
||||
import 'package:bahla_front/ui/views/home/home_viewmodel.dart';
|
||||
|
||||
import '../helpers/test_helpers.dart';
|
||||
|
||||
void main() {
|
||||
HomeViewModel getModel() => HomeViewModel();
|
||||
|
||||
group('HomeViewmodelTest -', () {
|
||||
group('HomeViewModel Tests -', () {
|
||||
setUp(() => registerServices());
|
||||
tearDown(() => locator.reset());
|
||||
|
||||
group('incrementCounter -', () {
|
||||
test('When called once should return Counter is: 1', () {
|
||||
final model = getModel();
|
||||
model.incrementCounter();
|
||||
expect(model.counterLabel, 'Counter is: 1');
|
||||
});
|
||||
});
|
||||
|
||||
group('showBottomSheet -', () {
|
||||
test('When called, should show custom bottom sheet using notice variant',
|
||||
() {
|
||||
final bottomSheetService = getAndRegisterBottomSheetService();
|
||||
|
||||
final model = getModel();
|
||||
model.showBottomSheet();
|
||||
verify(bottomSheetService.showCustomSheet(
|
||||
variant: BottomSheetType.notice,
|
||||
title: ksHomeBottomSheetTitle,
|
||||
description: ksHomeBottomSheetDescription,
|
||||
));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user