| 1234567891011121314151617181920212223242526272829303132 |
- const assert = require('assert');
- const fs = require('fs');
- const source = fs.readFileSync('pagesHome/components/report/generateList.vue', 'utf8');
- assert.match(
- source,
- /class="gbox-item-bottom-right report-button-disabled"\s+@click="showReportUnavailable\('background'\)"/
- );
- assert.match(
- source,
- /class="gbox-item-bottom-right report-button-disabled"\s+@click="showReportUnavailable\('professional'\)"/
- );
- assert.match(source, /背景报告需配合团队版评估数据生成/);
- assert.match(source, /教练报告需要配合团队版评估数据生成/);
- assert.match(source, /v-if="reportReminderShow"/);
- assert.match(source, /<view class="kr-title">温馨提示<\/view>/);
- assert.match(source, /<view class="kr-btn" @click="reportReminderShow=false">确定<\/view>/);
- assert.match(
- source,
- /class="gbox-item-bottom-right"\s+@click="reviewArtifact\(item, 'public'\)"\s+v-if="item\.state==1">团队报告/
- );
- assert.match(
- source,
- /class="gbox-item-bottom-right"\s+@click="reviewArtifact\(item, 'background'\)"\s+v-if="item\.state==1">背景报告/
- );
- assert.match(
- source,
- /class="gbox-item-bottom-right"\s+@click="reviewArtifact\(item, 'professional'\)"\s+v-if="item\.state==1">教练报告/
- );
- console.log('reportButtonAvailability.test.js: all assertions passed');
|