Skip to content

Commit 12fe82c

Browse files
committed
TEST: 修复 AI 转录过长测试 fixture
1 parent e285bc0 commit 12fe82c

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

TASKS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
> 最后更新:2026-06-13
44
> 当前焦点:Android 结束录音闪退(离线 ASR / Silero VAD)——**仍未解决**
55
6+
## 已完成:修复 CI 中 AI 转录过长测试 fixture
7+
8+
**完成时间**: 2026-06-13
9+
10+
GitHub Actions run `27459518705``test` job 失败在两个“AI 转录音频过长”回归测试。实现中的转录上限为 30 分钟,但测试 fixture 使用 16 分钟音频,实际不会触发 `Audio too long` 预检查错误。
11+
12+
- [x] `test/widgets/manage_subtitles_sheet_test.dart`:过长音频 fixture 从 16 分钟改为 31 分钟
13+
- [x] `test/screens/learning_plan_screen_test.dart`:过长音频 fixture 从 16 分钟改为 31 分钟
14+
- [x] `flutter analyze test/widgets/manage_subtitles_sheet_test.dart test/screens/learning_plan_screen_test.dart`:No issues found
15+
- [x] `flutter test test/widgets/manage_subtitles_sheet_test.dart --plain-name 'AI 转录音频过长时在弹窗内显示 5 秒错误提示'`:1 passed
16+
- [x] `flutter test test/screens/learning_plan_screen_test.dart --plain-name '添加字幕入口 AI 转录音频过长时显示弹窗内错误提示'`:1 passed
17+
618
## 已完成:学习计划页展示疑似空音频标记
719

820
**完成时间**: 2026-06-13

test/screens/learning_plan_screen_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ void main() {
803803
addTearDown(tester.view.resetDevicePixelRatio);
804804

805805
final longAudio = testAudioItemNoTranscript.copyWith(
806-
totalDuration: 16 * 60,
806+
totalDuration: 31 * 60,
807807
);
808808
await prefs.setBool('guide_v1_subtitle_sheet_transcription_seen', true);
809809

test/widgets/manage_subtitles_sheet_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void main() {
281281

282282
testWidgets('AI 转录音频过长时在弹窗内显示 5 秒错误提示', (tester) async {
283283
final item = createTestAudioItem(
284-
totalDuration: 16 * 60,
284+
totalDuration: 31 * 60,
285285
).copyWith(transcriptSource: TranscriptSource.local);
286286
await tester.pumpWidget(buildSheet(item, session: signedInSession()));
287287
await tester.pumpAndSettle();

0 commit comments

Comments
 (0)