mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-30 01:41:05 +01:00
Make the offline create guard in the routine form falsifiable
This commit is contained in:
@@ -292,9 +292,12 @@ void main() {
|
||||
);
|
||||
expect(button.enabled, isFalse);
|
||||
|
||||
// And tapping it must not trigger the create request.
|
||||
// Fill the form first: an invalid form is rejected by the validator, which
|
||||
// would make the verifyNever below pass no matter what the gate does.
|
||||
await tester.enterText(find.byKey(const Key('field-name')), 'New cool routine');
|
||||
await tester.tap(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)), warnIfMissed: false);
|
||||
await tester.pump();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
verifyNever(mockRoutinesRepository.addRoutineServer(any));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user