Skip to content

Commit

Permalink
Fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
QuncCccccc committed Jul 14, 2023
1 parent ca159e3 commit d7e17a3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/flutter/test/material/dropdown_menu_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import 'dart:ui';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -177,7 +178,11 @@ void main() {

final Finder textField = find.byType(TextField);
final Size anchorSize = tester.getSize(textField);
expect(anchorSize, const Size(195.0, 60.0));
if (kIsWeb && !isCanvasKit) {
expect(anchorSize, const Size(195.0, 61.0));
} else {
expect(anchorSize, const Size(195.0, 60.0));
}

await tester.tap(find.byType(DropdownMenu<TestMenu>));
await tester.pumpAndSettle();
Expand All @@ -195,7 +200,11 @@ void main() {

final Finder anchor = find.byType(TextField);
final Size size = tester.getSize(anchor);
expect(size, const Size(200.0, 60.0));
if (kIsWeb && !isCanvasKit) {
expect(size, const Size(200.0, 61.0));
} else {
expect(size, const Size(200.0, 60.0));
}

await tester.tap(anchor);
await tester.pumpAndSettle();
Expand Down

0 comments on commit d7e17a3

Please sign in to comment.