reportRecordGenerationState.spec.js 716 B

12345678910111213141516171819
  1. const fs = require('fs')
  2. const path = require('path')
  3. const component = fs.readFileSync(
  4. path.join(__dirname, '../../src/views/modules/wechatUser/reportRecord.vue'),
  5. 'utf8'
  6. )
  7. const controller = fs.readFileSync(
  8. path.join(__dirname, '../../../chuangheng/chuangheng-admin/src/main/java/com/ringzle/modules/core/ReportTeamMemberController.java'),
  9. 'utf8'
  10. )
  11. test('PC report records include generating reports and disable unavailable actions', () => {
  12. expect(controller).not.toContain('params.put("state", "1")')
  13. expect(component).toContain('报告状态')
  14. expect(component).toContain('生成中')
  15. expect(component).toContain("scope.row.state === '0'")
  16. expect(component).toContain('report-pending')
  17. })