Created
July 3, 2021 03:52
-
-
Save enzoftware/2556855fcbe9410616bc21fb92aedb0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1 | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:integration_test/integration_test.dart'; | |
import 'package:flutter_transaction_tracker/main.dart'; | |
void main() { | |
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | |
// 2 | |
testWidgets('bySemanticsLabel test', (WidgetTester tester) async { | |
// 3 | |
await tester.pumpWidget(const TransactionTrackerApp()); | |
// 4 | |
await tester.pumpAndSettle(); | |
// 5 | |
expect(find.bySemanticsLabel(RegExp('Transaction')), findsNWidgets(3)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment