Prechádzať zdrojové kódy

fix(home): route report shortcut to questionnaires

Developer 1 týždeň pred
rodič
commit
443ad9e11e

BIN
dist.zip


+ 1 - 1
src/views/modules/home.vue

@@ -130,7 +130,7 @@
         <div class="home_box hb">
           <div class="hb_title adfacjb">
             <div class="hbt_l">近期报告</div>
-            <div class="hbt_r" @click="toTurn('agent-report')">更多报告 ></div>
+            <div class="hbt_r" @click="toTurn('agent-questionnaire')">更多报告 ></div>
           </div>
           <div class="hb_list">
             <div class="hl_item adfacjb" v-for="(item,index) in jqbgList" :key="index">

+ 10 - 0
tests/unit/questionnaireReportMerge.spec.js

@@ -6,6 +6,16 @@ const source = fs.readFileSync(
   'utf8'
 )
 
+test('homepage report shortcut points to the questionnaire management entry', () => {
+  const homeSource = fs.readFileSync(
+    path.resolve(__dirname, '../../src/views/modules/home.vue'),
+    'utf8'
+  )
+
+  expect(homeSource).toContain("toTurn('agent-questionnaire')")
+  expect(homeSource).not.toContain("toTurn('agent-report')")
+})
+
 test('questionnaire management exposes an inline report list action', () => {
   expect(source).toContain('报告列表')
   expect(source).toContain('getTeamQuestionnaireList')