error.cy.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. validateExport('error_log_table');
  37. // 重试
  38. tableBtnClick('error_log_table', 0);
  39. validateMessageContent('已重试');
  40. validateTableList('error_log_table');
  41. validateTableSearch(
  42. 'error_log_table',
  43. [
  44. 'url',
  45. 'errorInfo',
  46. 'dataVal',
  47. 'type',
  48. {id: 'date', type: 'date', enableTime: true},
  49. ],
  50. {
  51. toolId: 'error_log_filter',
  52. url: '/queryList/getErrorList',
  53. },
  54. );
  55. });
  56. });