Skip to content

Commit d6cdc68

Browse files
test: fix test compare values
1 parent 2802309 commit d6cdc68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/src/form_builder_field_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void main() {
183183
await tester.pumpAndSettle();
184184
textFieldKey.currentState?.reset();
185185

186-
expect(textFieldKey.currentState?.initialValue, null);
186+
expect(textFieldKey.currentState?.value, null);
187187
});
188188
testWidgets('Should reset to initial when call reset', (tester) async {
189189
const textFieldName = 'text';
@@ -200,7 +200,7 @@ void main() {
200200
await tester.pumpAndSettle();
201201
textFieldKey.currentState?.reset();
202202

203-
expect(textFieldKey.currentState?.initialValue, equals(initialValue));
203+
expect(textFieldKey.currentState?.value, equals(initialValue));
204204
});
205205
testWidgets(
206206
'Should reset custom error when invalidate field and then reset',

test/src/form_builder_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void main() {
301301
await tester.pumpAndSettle();
302302
formKey.currentState?.reset();
303303

304-
expect(formKey.currentState?.initialValue, {});
304+
expect(formKey.currentState?.instantValue, {textFieldName: null});
305305
});
306306
testWidgets('Should reset to initial when call reset', (tester) async {
307307
const textFieldName = 'text';
@@ -318,7 +318,7 @@ void main() {
318318
await tester.pumpAndSettle();
319319
formKey.currentState?.reset();
320320

321-
expect(formKey.currentState?.initialValue, equals(initialValue));
321+
expect(formKey.currentState?.instantValue, equals(initialValue));
322322
});
323323
testWidgets(
324324
'Should reset custom error when invalidate field and then reset',

0 commit comments

Comments
 (0)