fix(mobile): prioritize practice actions above guidance
This commit is contained in:
@@ -378,9 +378,15 @@ test('场景目录加载失败时清空旧场景并禁止开始训练', async ()
|
||||
|
||||
test('无已发布场景时隐藏常规训练,但仍展示独立实时陪练入口', async () => {
|
||||
const source = await pageSource('../src/pages/user/practice/index.vue');
|
||||
const realtimeIndex = source.indexOf('class="panel scenario-card realtime-entry-card employee-card"');
|
||||
const sceneIndex = source.indexOf('class="panel scene-picker-card employee-card"');
|
||||
const growthIndex = source.indexOf('class="panel growth-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.ok(realtimeIndex > -1 && realtimeIndex < sceneIndex && sceneIndex < growthIndex, '核心陪练入口必须排在场景和成长说明之前');
|
||||
assert.match(source, /v-if="growthDetailsExpanded" class="growth-details"/);
|
||||
assert.match(source, /return '选一种方式,马上开始';/);
|
||||
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;/);
|
||||
|
||||
Reference in New Issue
Block a user