-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Unable to widgetTester.enterText 2 times or more in the same text fields in flutter integration test #134604
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Related issues
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- I entered invalid email text into the text field with the text 'Email'
- I clicked 'Sign in'
- I checked the error text.
- I re-entered a valid email to this field.
Expected results
The email text field value should be the new valid email.
Actual results
The email text field value still kept the old invalid email.
Code sample
Code sample
await tester.enterText(
find.widgetWithText(TextField, 'Email'),
'invalid@gmail..com',
);
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(
ElevatedButton, 'Sign in'));
await tester.pumpAndSettle();
expect(find.text('Invalid email'), findsOneWidget);
await tester.enterText(
find.widgetWithText(TextField, 'Email'),
'valid@gmail.com',
);
await tester.pumpAndSettle();Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.5.1 22G90 darwin-arm64, locale
en-VN)
• Flutter version 3.13.2 on channel stable at /Users/phat/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ff5b5b5fa6 (3 weeks ago), 2023-08-24 08:12:28 -0500
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/phat/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
11.0.15+0-b2043.56-8887301)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • F8FD829A-C7E2-480D-BB26-BE7B40808AE0 • ios
• com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
• macOS (desktop) • macos •
darwin-arm64 • macOS 13.5.1 22G90 darwin-arm64
• Chrome (web) • chrome •
web-javascript • Google Chrome 116.0.5845.187
[✓] Network resources
• All expected network resources are available.
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team