error.cy.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import {
  2. beforeSetup,
  3. exportIntercept,
  4. generateNetworkResult,
  5. intercept,
  6. intoMenu,
  7. successIntercept,
  8. tableBtnClick,
  9. validateExport,
  10. validateMessageContent,
  11. validateTableList,
  12. validateTableSearch,
  13. } from './utils';
  14. const basicData = {
  15. dataVal: '{"SourceBillDate"}',
  16. errorInfo: '出库数量大于要货申请行可出库总数量!',
  17. scrq: '2023-04-13 15:38:02',
  18. transmissionType: 1,
  19. id: 247,
  20. type: '其它入库',
  21. url: 'http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateMakeUpOtherOutStock',
  22. };
  23. describe('gs错误日志', function() {
  24. beforeEach(function() {
  25. beforeSetup();
  26. intoMenu('系统日志', 'GS错误日志');
  27. });
  28. beforeEach(function() {
  29. intercept('/queryList/getErrorList', function({reply, search}) {
  30. generateNetworkResult({search, reply, basicData, title: 'url'});
  31. });
  32. exportIntercept('/queryList/getErrorExcel');
  33. successIntercept('/gsPlugOut/anew');
  34. });
  35. it('table', function() {
  36. validateTableList('error_log_table');
  37. validateTableSearch(
  38. 'error_log_table',
  39. [
  40. 'url',
  41. 'errorInfo',
  42. 'dataVal',
  43. {id: 'date', type: 'date', enableTime: true},
  44. 'type',
  45. ],
  46. {
  47. toolId: 'error_log_filter',
  48. url: '/queryList/getErrorList',
  49. },
  50. );
  51. });
  52. it('operation', function() {
  53. validateExport('error_log_table');
  54. // 重试
  55. tableBtnClick('error_log_table', 0);
  56. validateMessageContent('已重试');
  57. });
  58. });