mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Update failed tests
This commit is contained in:
parent
c91c18ebc5
commit
bc9150d33e
@ -15,7 +15,7 @@ void main() {
|
||||
expect(find.byType(Divider), findsOneWidget);
|
||||
|
||||
// Divider is positioned horizontally.
|
||||
final Offset container = tester.getBottomLeft(find.byType(ColoredBox).first);
|
||||
final Offset container = tester.getBottomLeft(find.descendant(of: find.byType(Expanded).first, matching: find.byType(ColoredBox)));
|
||||
expect(container.dy, tester.getTopLeft(find.byType(Divider)).dy);
|
||||
|
||||
final Offset subheader = tester.getTopLeft(find.text('Subheader'));
|
||||
|
||||
@ -19,7 +19,7 @@ void main() {
|
||||
|
||||
final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||
await gesture.addPointer();
|
||||
await gesture.down(tester.getCenter(find.byType(ColoredBox)));
|
||||
await gesture.down(tester.getCenter(find.byType(ColoredBox).last));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('1 presses\n0 releases'), findsOneWidget);
|
||||
|
||||
@ -18,14 +18,14 @@ void main() {
|
||||
|
||||
final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||
await gesture.addPointer();
|
||||
await gesture.moveTo(tester.getCenter(find.byType(ColoredBox)));
|
||||
await gesture.moveTo(tester.getCenter(find.byType(ColoredBox).last));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('1 Entries\n0 Exits'), findsOneWidget);
|
||||
expect(find.text('The cursor is here: (400.00, 328.00)'), findsOneWidget);
|
||||
|
||||
await gesture.moveTo(
|
||||
tester.getCenter(find.byType(ColoredBox)) + const Offset(50.0, 30.0),
|
||||
tester.getCenter(find.byType(ColoredBox).last) + const Offset(50.0, 30.0),
|
||||
);
|
||||
await tester.pump();
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
void main() {
|
||||
testWidgets('Shows flutter logo in transition', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const example.AlignTransitionExampleApp());
|
||||
expect(find.byType(ColoredBox), findsOneWidget);
|
||||
expect(find.byType(ColoredBox).last, findsOneWidget);
|
||||
expect(
|
||||
find.byWidgetPredicate((Widget padding) => padding is Padding
|
||||
&& padding.padding == const EdgeInsets.all(8.0)),
|
||||
|
||||
@ -19,7 +19,7 @@ void main() {
|
||||
find.ancestor(
|
||||
of: find.byType(FlutterLogo),
|
||||
matching: find.descendant(
|
||||
of: find.byType(ColoredBox),
|
||||
of: find.byType(ColoredBox).last,
|
||||
matching: find.byType(FadeTransition)
|
||||
),
|
||||
),
|
||||
@ -35,7 +35,7 @@ void main() {
|
||||
final Finder fadeTransitionFinder = find.ancestor(
|
||||
of: find.byType(FlutterLogo),
|
||||
matching: find.descendant(
|
||||
of: find.byType(ColoredBox),
|
||||
of: find.byType(ColoredBox).last,
|
||||
matching: find.byType(FadeTransition)
|
||||
),
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user