feat: Initialize project

This commit is contained in:
Yaël Perret
2024-10-21 22:03:17 +02:00
parent aefa3309d0
commit e722368fa6
404 changed files with 43535 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
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 -', () {
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,
));
});
});
});
}

View File

@@ -0,0 +1,11 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:bahla_front/app/app.locator.dart';
import '../helpers/test_helpers.dart';
void main() {
group('InfoAlertDialogModel Tests -', () {
setUp(() => registerServices());
tearDown(() => locator.reset());
});
}

View File

@@ -0,0 +1,11 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:bahla_front/app/app.locator.dart';
import '../helpers/test_helpers.dart';
void main() {
group('InfoAlertDialogModel Tests -', () {
setUp(() => registerServices());
tearDown(() => locator.reset());
});
}