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
@@ -15,7 +15,7 @@ void main() {
|
||||
|
||||
tearDownAll(client.close);
|
||||
|
||||
test('should surface a business error when signing in with an unknown email', () async {
|
||||
test('should_surface_business_error_when_sign_in_uses_unknown_email', () async {
|
||||
try {
|
||||
await api.login(
|
||||
email: 'no-such-user-for-dio-check@example.com',
|
||||
|
||||
@@ -19,7 +19,7 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
test('首页聚合:能解析出轮播与分区', () async {
|
||||
test('should_parse_banner_and_sections_when_home_feed_is_fetched', () async {
|
||||
if (!await serverUp()) {
|
||||
markTestSkipped('客户端接口服务未启动,已跳过联调测试');
|
||||
return;
|
||||
@@ -33,7 +33,7 @@ void main() {
|
||||
expect(card.posterUrl, startsWith('/files/'));
|
||||
});
|
||||
|
||||
test('详情:剧集按下发顺序排列,可播放集带地址', () async {
|
||||
test('should_order_episodes_by_number_and_attach_url_when_detail_is_fetched', () async {
|
||||
if (!await serverUp()) {
|
||||
markTestSkipped('客户端接口服务未启动,已跳过联调测试');
|
||||
return;
|
||||
@@ -55,7 +55,7 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
test('播放票据:可播放时返回地址', () async {
|
||||
test('should_return_play_url_when_episode_is_playable', () async {
|
||||
if (!await serverUp()) {
|
||||
markTestSkipped('客户端接口服务未启动,已跳过联调测试');
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user