feat(practice): streamline pilot content operations
This commit is contained in:
@@ -376,10 +376,14 @@ test('场景目录加载失败时清空旧场景并禁止开始训练', async ()
|
||||
assert.match(source, /!curriculumLoading\.value/);
|
||||
});
|
||||
|
||||
test('无已发布场景时不展示默认预习卡或训练入口', async () => {
|
||||
test('无已发布场景时隐藏常规训练,但仍展示独立实时陪练入口', async () => {
|
||||
const source = await pageSource('../src/pages/user/practice/index.vue');
|
||||
|
||||
assert.match(source, /v-if="loggedIn && practiceView === 'prep' && availableScenarios\.length" class="panel scenario-card employee-card"/);
|
||||
assert.match(source, /v-if="loggedIn && practiceView === 'prep' && availableScenarios\.length" class="panel scenario-card practice-scenario-card employee-card"/);
|
||||
assert.match(source, /v-if="loggedIn && practiceView === 'prep'" class="panel scenario-card realtime-entry-card employee-card"/);
|
||||
assert.match(source, /:disabled="!canStartRealtime \|\| busy"/);
|
||||
assert.match(source, /if \(!canStartRealtime\.value \|\| !requireLogin\(\)\) return;/);
|
||||
assert.doesNotMatch(source, /if \(!canStartPractice\.value \|\| !requireLogin\(\)\) return;\s*speechPlayback\.stop\(\);\s*cancelRecording\(\);\s*turnVoiceGeneration \+= 1;/);
|
||||
assert.match(source, /const activeScenario = nextScenarios\.find\([\s\S]*?\|\| nextScenarios\[0\];[\s\S]*?else \{\s*selectedScenarioId\.value = '';\s*activeScenarioName\.value = '暂无可用训练场景';\s*prepCard\.value = null;/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user