test(client): 用例名统一为 should_<期望>_when_<条件>(155/155)
为什么:红线第 8 条门禁立即生效,要求 Flutter 测试命名合规;此前 155 条用例名是英文自然语言 或中文描述,合规数 0/155,属存量欠账,按"先补齐再上新功能"在本批处理。 - 25 个测试文件、155 条用例改名,按「文件 + 旧名」精确定位,每条断言命中恰好 1 次才替换 - 只改名字字面量:改动行 155 删 + 155 增,无一行不含字符串字面量(断言与用例体零改动) - 门禁:dart analyze lib test = No issues found;flutter test = 155 全过
This commit is contained in:
1 parent
1853e1845c
commit
0e5d550b50
25 files changed
+155
-155
No files matched your search
+14
-14
@@ -28,7 +28,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'home swipe promotes next without recreating it or showing loading',
|
||||
'should_promote_next_without_recreating_it_or_showing_loading_when_home_is_swiped',
|
||||
(tester) async {
|
||||
final created = <String>[];
|
||||
await tester.pumpWidget(
|
||||
@@ -57,7 +57,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('immersive home opens the series detail', (tester) async {
|
||||
testWidgets('should_open_series_detail_when_immersive_home_is_tapped', (tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
@@ -82,7 +82,7 @@ void main() {
|
||||
expect(find.byTooltip('Explore series'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('clear screen hides tabs and restores them on tap', (
|
||||
testWidgets('should_hide_tabs_and_restore_them_when_clear_screen_is_tapped', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
@@ -107,7 +107,7 @@ void main() {
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('home quick drawer opens current series and switches root tabs', (
|
||||
testWidgets('should_open_current_series_and_switch_root_tabs_when_quick_drawer_is_used', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(360, 720);
|
||||
@@ -162,7 +162,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('interface language changes without a caption control', (
|
||||
testWidgets('should_change_interface_language_when_locale_is_picked', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
@@ -193,7 +193,7 @@ void main() {
|
||||
expect(find.text('热门'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('home controls fit a compact Android viewport', (tester) async {
|
||||
testWidgets('should_fit_compact_android_viewport_when_home_controls_are_shown', (tester) async {
|
||||
tester.view.physicalSize = const Size(360, 720);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
@@ -217,7 +217,7 @@ void main() {
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('My page fits a compact Android viewport and returns home', (
|
||||
testWidgets('should_fit_compact_android_viewport_and_return_home_when_my_page_is_shown', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(360, 720);
|
||||
@@ -241,7 +241,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'Discover shows three mock playable dramas and one pending poster',
|
||||
'should_show_three_playable_dramas_and_one_pending_poster_when_discover_is_opened',
|
||||
(tester) async {
|
||||
tester.view.physicalSize = const Size(360, 720);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
@@ -276,7 +276,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('bottom tabs stay on one route', (tester) async {
|
||||
testWidgets('should_stay_on_one_route_when_bottom_tabs_are_used', (tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
@@ -327,7 +327,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'home swipe changes drama, entered player swipe changes episode',
|
||||
'should_change_drama_on_home_swipe_and_episode_on_player_swipe_when_swiping',
|
||||
(tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
@@ -359,7 +359,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('shorts page has no category navigation', (tester) async {
|
||||
testWidgets('should_hide_category_navigation_when_shorts_page_is_shown', (tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
@@ -381,7 +381,7 @@ void main() {
|
||||
expect(find.text('City Lights & Velvet Nights'), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
testWidgets('right rail saves, comments, likes and invokes share in order', (
|
||||
testWidgets('should_save_comment_like_and_share_in_order_when_right_rail_is_used', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
@@ -439,7 +439,7 @@ void main() {
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('system back opens the drawer and stays on home', (tester) async {
|
||||
testWidgets('should_open_drawer_and_stay_on_home_when_system_back_is_pressed', (tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
@@ -466,7 +466,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('My watchlist lists saved dramas across the home feed', (
|
||||
testWidgets('should_list_saved_dramas_across_home_feed_when_watchlist_is_opened', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
|
||||
Reference in new issue
Block a user