reportButtonAvailability.test.js 1.1 KB

12345678910111213141516171819202122
  1. const assert = require('assert');
  2. const fs = require('fs');
  3. const source = fs.readFileSync('pagesHome/components/report/generateList.vue', 'utf8');
  4. assert.match(source, /isReportGenerating\(item\)/);
  5. assert.match(source, /showGeneratingReminder/);
  6. assert.match(source, /guardReportOperation\(item\)/);
  7. assert.match(source, /@click="showReportSelector\(item\)"/);
  8. assert.match(source, /v-if="reportSelectorShow"/);
  9. assert.match(source, /背景报告需配合团队版评估数据生成/);
  10. assert.match(source, /教练报告需要配合团队版评估数据生成/);
  11. assert.match(source, /v-if="reportReminderShow"/);
  12. assert.match(source, /<view class="kr-title">温馨提示<\/view>/);
  13. assert.match(source, /<view class="kr-btn" @click="reportReminderShow=false">确定<\/view>/);
  14. assert.match(source, /selectReportArtifact\('background'\)/);
  15. assert.match(source, /selectReportArtifact\('professional'\)/);
  16. assert.match(source, /selectReportArtifact\('public'\)/);
  17. assert.match(source, />查看报告<\/view>/);
  18. console.log('reportButtonAvailability.test.js: all assertions passed');