feat : New listing + MainView

This commit is contained in:
Yaël Perret
2025-06-27 09:04:37 +02:00
parent 2b143bd884
commit 9a328ec9d8
55 changed files with 1036 additions and 615 deletions

View File

@@ -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,
));
});
});
});
}