fix(release): close fixed-code mobile auth gaps
This commit is contained in:
@@ -229,12 +229,22 @@ test('工作助手与查全网使用一致的来源切换头部', async () => {
|
||||
});
|
||||
|
||||
test('登录后按组织身份切换主管首页', async () => {
|
||||
const source = await pageSource('../src/services/position.ts');
|
||||
const [source, loginSource] = await Promise.all([
|
||||
pageSource('../src/services/position.ts'),
|
||||
pageSource('../src/pages/auth/login/index.vue')
|
||||
]);
|
||||
|
||||
assert.match(source, /\/api\/aihr\/mobile\/me/);
|
||||
assert.match(source, /role === 'supervisor'/);
|
||||
assert.match(source, /pages\/supervisor\/index\/index/);
|
||||
assert.match(source, /removeStorageSync\(roleKey\)/);
|
||||
assert.match(source, /identity\.role !== 'user' && identity\.role !== 'supervisor'/);
|
||||
assert.match(source, /clearOrgPosition\(\);\s*throw error/);
|
||||
assert.doesNotMatch(source, /catch\s*\{[\s\S]*return 'user'/);
|
||||
assert.doesNotMatch(source, /return hasOrgPosition\(\) \? getSelectedPosition\(\) : ''/);
|
||||
assert.match(loginSource, /const resumeAfterLogin = async \(\) => \{/);
|
||||
assert.match(loginSource, /message\.value = error instanceof Error \? error\.message : '组织身份加载失败,请重试'/);
|
||||
assert.doesNotMatch(loginSource, /void goAfterLogin\(\)/);
|
||||
});
|
||||
|
||||
test('普通员工请求主管深链时回到员工首页', async () => {
|
||||
|
||||
Reference in New Issue
Block a user