Revert "Removes single window assumptions from flutter_test (#121549)" (#122037)

This reverts commit f2dd19d5b6.
This commit is contained in:
pdblasi-google
2023-03-06 11:49:40 -08:00
committed by GitHub
parent f5ddece56e
commit a53105d941
16 changed files with 1341 additions and 2300 deletions

View File

@@ -711,25 +711,6 @@ void main() {
});
});
testWidgets('platformDispatcher exposes the platformDispatcher from binding', (WidgetTester tester) async {
expect(tester.platformDispatcher, tester.binding.platformDispatcher);
});
testWidgets('view exposes the implicitView from platformDispatcher', (WidgetTester tester) async {
expect(tester.view, tester.platformDispatcher.implicitView);
});
testWidgets('viewOf finds a view when the view is implicit', (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp(
home: Center(
child: Text('Test'),
)
));
expect(() => tester.viewOf(find.text('Test')), isNot(throwsA(anything)));
expect(tester.viewOf(find.text('Test')), isA<TestFlutterView>());
});
group('SemanticsController', () {
group('find', () {
testWidgets('throws when there are no semantics', (WidgetTester tester) async {