Skip to content

Commit

Permalink
test(#58): remove teste do checkbox dos testes
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCostaDeOliveira committed Jan 30, 2025
1 parent dc5a227 commit 08fb514
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions test/ui/register_account/view/register_account_view_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void main() {
expect(find.byKey(const Key('userNameField')), findsOneWidget);
expect(find.byType(TextEmail), findsOneWidget);
expect(find.byType(TextPassWord), findsOneWidget);
expect(find.byType(Checkbox), findsOneWidget);

expect(find.text('Registrar'), findsOneWidget);
expect(find.byType(TextAndLink), findsOneWidget);
Expand Down Expand Up @@ -94,36 +93,6 @@ void main() {
req.password == password)))).called(1);
});

testWidgets('Checkbox shows correct value when initially unchecked',
(WidgetTester tester) async {
when(mockViewModel.isTermsAccepted).thenReturn(false);

await tester.pumpWidget(createLoginScreen());
await tester.pumpAndSettle();

Checkbox checkbox = tester.widget(find.byType(Checkbox));
expect(checkbox.value, false);

await tester.tap(find.byType(Checkbox));

verify(mockViewModel.setToggleTermsAccepted(true)).called(1);
});

testWidgets('Checkbox shows correct value when initially checked',
(WidgetTester tester) async {
when(mockViewModel.isTermsAccepted).thenReturn(true);

await tester.pumpWidget(createLoginScreen());
await tester.pumpAndSettle();

Checkbox checkbox = tester.widget(find.byType(Checkbox));
expect(checkbox.value, true);

await tester.tap(find.byType(Checkbox));

verify(mockViewModel.setToggleTermsAccepted(false)).called(1);
});

testWidgets('Register Account user notification snackbar',
(WidgetTester tester) async {
when(mockRegisterCommand1.isOk).thenReturn(true);
Expand Down

0 comments on commit 08fb514

Please sign in to comment.