Skip to content

Commit 9d4c585

Browse files
authored
[material_ui] Port flutter/flutter #186670 "Use local semantics tester in Material selection tests" (#11983)
This PR ports flutter/flutter#186670 by @MarlonJD from flutter/flutter to flutter/packages. It moves the affected Material selection tests from material_ui's `temporarily_disabled_tests` directory into the main `test` directory now that their gross `../widgets/semantics_tester.dart` import has been fixed to use material_ui's local `semantics_tester.dart`. This follows the porting instructions in flutter/flutter#188444: - merge commits from the original PR are not included - the affected `temporarily_disabled_tests` files are moved into the main test directory after fixing the gross import Validation: - `dart format --set-exit-if-changed packages/material_ui/test/checkbox_test.dart packages/material_ui/test/radio_test.dart packages/material_ui/test/range_slider_test.dart packages/material_ui/test/slider_test.dart packages/material_ui/test/toggle_buttons_test.dart` - `git diff --check` - `flutter test test/checkbox_test.dart test/radio_test.dart test/range_slider_test.dart test/slider_test.dart test/toggle_buttons_test.dart` The targeted test command passed with 304 tests.
1 parent f170200 commit 9d4c585

4 files changed

Lines changed: 8 additions & 20 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
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
import 'dart:ui';
96

107
import 'package:cupertino_ui/cupertino_ui.dart';
118
import 'package:flutter/foundation.dart';
12-
import 'package:material_ui/material_ui.dart';
139
import 'package:flutter/rendering.dart';
1410
import 'package:flutter/services.dart';
1511
import 'package:flutter/src/gestures/constants.dart';
1612
import 'package:flutter_test/flutter_test.dart';
13+
import 'package:material_ui/material_ui.dart';
1714

18-
import '../widgets/semantics_tester.dart';
15+
import 'semantics_tester.dart';
1916

2017
void main() {
2118
final theme = ThemeData();

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
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'])
@@ -14,13 +11,13 @@ import 'dart:ui';
1411

1512
import 'package:cupertino_ui/cupertino_ui.dart';
1613
import 'package:flutter/foundation.dart';
17-
import 'package:material_ui/material_ui.dart';
1814
import 'package:flutter/rendering.dart';
1915
import 'package:flutter/services.dart';
2016
import 'package:flutter/src/gestures/constants.dart';
2117
import 'package:flutter_test/flutter_test.dart';
18+
import 'package:material_ui/material_ui.dart';
2219

23-
import '../widgets/semantics_tester.dart';
20+
import 'semantics_tester.dart';
2421

2522
void main() {
2623
final theme = ThemeData();

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
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
import 'package:flutter/foundation.dart';
96
import 'package:flutter/gestures.dart';
10-
import 'package:material_ui/material_ui.dart';
117
import 'package:flutter/rendering.dart';
128
import 'package:flutter/services.dart';
139
import 'package:flutter/src/physics/utils.dart' show nearEqual;
1410
import 'package:flutter_test/flutter_test.dart';
11+
import 'package:material_ui/material_ui.dart';
1512

16-
import '../widgets/semantics_tester.dart';
13+
import 'semantics_tester.dart';
1714

1815
void main() {
1916
// Regression test for https://github.com/flutter/flutter/issues/105833

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@
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_test/flutter_test.dart';
14+
import 'package:material_ui/material_ui.dart';
1815

19-
import '../widgets/semantics_tester.dart';
16+
import 'semantics_tester.dart';
2017

2118
const double _defaultBorderWidth = 1.0;
2219

0 commit comments

Comments
 (0)