Fix duplicate MaterialApp in api example test (#154550)
This PR fixes two tests that created a nested `MaterialApp` (and it simplifies another test).
This commit is contained in:
parent
6caae154a9
commit
dce20c97dd
@ -25,11 +25,7 @@ void main() {
|
||||
'FilterChip displays the correct border when selected',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: example.MaterialStateBorderSideExampleApp(),
|
||||
),
|
||||
),
|
||||
const example.MaterialStateBorderSideExampleApp(),
|
||||
);
|
||||
|
||||
expect(findBorderColor(Colors.red), findsOne);
|
||||
@ -40,11 +36,7 @@ void main() {
|
||||
'FilterChip displays the correct border when not selected',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: example.MaterialStateBorderSideExampleApp(),
|
||||
),
|
||||
),
|
||||
const example.MaterialStateBorderSideExampleApp(),
|
||||
);
|
||||
|
||||
await tester.tap(find.byType(FilterChip));
|
||||
|
@ -9,9 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
void main() {
|
||||
testWidgets('Tapping FAB increments counter', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: example.ValueListenableBuilderExample(),
|
||||
),
|
||||
const example.ValueListenableBuilderExampleApp(),
|
||||
);
|
||||
|
||||
String getCount() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user