Normalize examples (#111223)
This commit is contained in:
@@ -3,24 +3,20 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_api_samples/material/bottom_navigation_bar/bottom_navigation_bar.2.dart'
|
||||
as example;
|
||||
import 'package:flutter_api_samples/material/bottom_navigation_bar/bottom_navigation_bar.2.dart' as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('BottomNavigationBar Updates Screen Content',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('BottomNavigationBar Updates Screen Content', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.MyApp(),
|
||||
);
|
||||
|
||||
expect(find.widgetWithText(AppBar, 'BottomNavigationBar Sample'),
|
||||
findsOneWidget);
|
||||
expect(find.widgetWithText(AppBar, 'BottomNavigationBar Sample'), findsOneWidget);
|
||||
expect(find.byType(BottomNavigationBar), findsOneWidget);
|
||||
expect(find.widgetWithText(Center, 'Item 0'), findsOneWidget);
|
||||
|
||||
await tester.scrollUntilVisible(
|
||||
find.widgetWithText(Center, 'Item 49'), 100);
|
||||
await tester.scrollUntilVisible(find.widgetWithText(Center, 'Item 49'), 100);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.widgetWithText(Center, 'Item 49'), findsOneWidget);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_api_samples/material/navigation_bar/navigation_bar.dart'
|
||||
import 'package:flutter_api_samples/material/navigation_bar/navigation_bar.0.dart'
|
||||
as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
@@ -11,7 +11,7 @@ void main() {
|
||||
testWidgets('Navigation bar updates destination on tap',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.MyApp(),
|
||||
const example.ExampleApp(),
|
||||
);
|
||||
final NavigationBar navigationBarWidget =
|
||||
tester.firstWidget(find.byType(NavigationBar));
|
||||
@@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_api_samples/material/navigation_bar/navigation_bar.0.dart' as example;
|
||||
import 'package:flutter_api_samples/material/navigation_bar/navigation_bar.1.dart' as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
Reference in New Issue
Block a user