deleteLog.cy.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import {
  2. beforeSetup,
  3. exportIntercept,
  4. generateNetworkResult,
  5. intercept,
  6. intoMenu,
  7. validateExport,
  8. validateTableList,
  9. validateTableSearch,
  10. } from './utils';
  11. const basicData = {
  12. id: '21',
  13. userId: '3',
  14. userName: 'admin',
  15. scrq: '2023-04-12 16:39:59',
  16. data: '{production_code=DD01, entry_number=1, warehousing_num=0, num=20, wbs=1, material_id=00000000000000012034, id=25, measurement_id=00000000000000000001, type=0, notice_id=TGD01202303230001}',
  17. type: '0',
  18. documentType: '报工单',
  19. startTime: null,
  20. endTime: null,
  21. page: 0,
  22. limit: 0,
  23. };
  24. describe('单据删除日志', function () {
  25. beforeEach(function () {
  26. beforeSetup();
  27. intoMenu('系统日志', '单据删除日志');
  28. });
  29. beforeEach(function () {
  30. intercept('/queryList/getLogData', function ({reply, search}) {
  31. generateNetworkResult({search, reply, basicData, title: 'userName'});
  32. });
  33. exportIntercept('/queryList/getLogDataExcel');
  34. });
  35. it('table', function () {
  36. validateTableList('order_log_table');
  37. validateTableSearch(
  38. 'order_log_table',
  39. [
  40. 'orderLogData',
  41. {id: 'orderLogType', value: '质检单', type: 'select'},
  42. 'userName',
  43. {id: 'orderLogDate', type: 'date'},
  44. ],
  45. {
  46. toolId: 'order_log_filter',
  47. url: '/queryList/getLogData',
  48. },
  49. );
  50. validateExport('order_log_table');
  51. });
  52. });