reportButtonAvailability.test.js 1.6 KB

12345678910111213141516171819202122232425262728293031
  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. assert.match(source, /evaluation-tabs/);
  19. assert.match(source, /总体评估结果/);
  20. assert.match(source, /团队发展建议/);
  21. assert.match(source, /evaluationTab === 'overall'/);
  22. assert.match(source, /evaluationTab === 'advice'/);
  23. assert.match(source, /保存提交/);
  24. assert.match(source, /取消/);
  25. assert.match(source, /\.evaluation-submit\{[^}]*background:\s*linear-gradient\(\s*90deg,\s*#33A7A7\s*0%,\s*#64BBBB\s*100%\)/);
  26. assert.match(source, /\.evaluation-submit\{[^}]*border-radius:\s*44rpx/);
  27. console.log('reportButtonAvailability.test.js: all assertions passed');