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:
Vicky committed 2026-10-16 09:41:14 +08:00
1 parent 1853e1845c
commit 0e5d550b50
25 files changed
+155 -155

No files matched your search

@@ -42,7 +42,7 @@ Drama _detail(String id) => Drama(
);
void main() {
test('a list card is upgraded to the full episode list', () async {
test('should_upgrade_to_full_episode_list_when_detail_loads_for_list_card', () async {
var calls = 0;
final logic = DramaDetailLogic(
drama: _card('signal'),
@@ -61,7 +61,7 @@ void main() {
logic.dispose();
});
test('a failed load keeps the card and reports the reason', () async {
test('should_keep_card_and_report_reason_when_load_fails', () async {
final logic = DramaDetailLogic(
drama: _card('signal'),
history: FakeWatchHistory(),
@@ -79,7 +79,7 @@ void main() {
logic.dispose();
});
test('an already loaded detail skips the request', () async {
test('should_skip_request_when_detail_is_already_loaded', () async {
var calls = 0;
final logic = DramaDetailLogic(
drama: _detail('signal'),