fix(aihr): clear stale candidate records on fetch failure
This commit is contained in:
@@ -85,6 +85,18 @@ test('候选首页只做状态总览和独立页面分流', async () => {
|
||||
assert.doesNotMatch(source, /interviewQuestions/);
|
||||
});
|
||||
|
||||
test('候选端刷新失败不保留上一轮真实记录', async () => {
|
||||
const [home, materials, progress] = await Promise.all([
|
||||
pageSource('../src/pages/candidate/index/index.vue'),
|
||||
pageSource('../src/pages/candidate/materials/index.vue'),
|
||||
pageSource('../src/pages/candidate/progress/index.vue')
|
||||
]);
|
||||
|
||||
assert.match(home, /catch \(error\) \{\n\s*clearData\(\);/);
|
||||
assert.match(materials, /catch \(error\) \{\n\s*clearData\(\);/);
|
||||
assert.match(progress, /catch \(error\) \{\n\s*clearData\(\);/);
|
||||
});
|
||||
|
||||
test('面试、资料、进度和预习页各自只承载一类真实任务', async () => {
|
||||
const [interview, materials, progress, study] = await Promise.all([
|
||||
pageSource('../src/pages/candidate/interview/index.vue'),
|
||||
|
||||
Reference in New Issue
Block a user