Skip to content

Commit 6e16ed6

Browse files
authored
[material_ui] Enable chip_test (#12009)
Port over `chip_test` from flutter/flutter#184279 Work towards flutter/flutter#182636 and flutter/flutter#188395 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 523fff0 commit 6e16ed6

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

packages/material_ui/temporarily_disabled_tests/chip_test.dart renamed to packages/material_ui/test/chip_test.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,21 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
@Skip(
6-
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
7-
)
85
// This file is run as part of a reduced test set in CI on Mac and Windows
96
// machines.
107
@Tags(<String>['reduced-test-set'])
118
library;
129

1310
import 'package:flutter/foundation.dart';
1411
import 'package:flutter/gestures.dart';
15-
import 'package:material_ui/material_ui.dart';
1612
import 'package:flutter/rendering.dart';
1713
import 'package:flutter/scheduler.dart';
1814
import 'package:flutter/services.dart';
1915
import 'package:flutter_test/flutter_test.dart';
16+
import 'package:material_ui/material_ui.dart';
2017

21-
import '../widgets/feedback_tester.dart';
22-
import '../test/semantics_tester.dart';
18+
import 'feedback_tester.dart';
19+
import 'semantics_tester.dart';
2320

2421
Finder findRenderChipElement() {
2522
return find.byElementPredicate((Element e) => '${e.renderObject.runtimeType}' == '_RenderChip');
@@ -203,9 +200,9 @@ PaintPattern uniqueRipplePattern(Offset expectedCenter, double expectedRadius) {
203200
if (offsetsAreClose(center, expectedCenter) && radiiAreClose(radius, expectedRadius)) {
204201
return true;
205202
}
206-
throw '''
203+
throw Exception('''
207204
Expected: center == $expectedCenter, radius == $expectedRadius
208-
Found: center == $center radius == $radius''';
205+
Found: center == $center radius == $radius''');
209206
});
210207
}
211208

0 commit comments

Comments
 (0)