gsInterfaceLog.cy.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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: '364',
  13. type: '其它出库',
  14. data: '{"strJson":"{\\"ReqOutStocks\\":[{\\"SourceBillDate\\":\\"20230131\\",\\"GIReqBillID\\":\\"00000000000000040443\\",\\"WMSID\\":\\"46\\",\\"SourceType\\":\\"8\\",\\"MoveType\\":\\"Z32\\",\\"Creator\\":\\"测试\\",\\"WareHouse\\":\\"a031bb4f-3eb6-49df-9\\",\\"IsRed\\":0,\\"BillItems\\":[{\\"FlexField1\\":\\"00000000000007160127\\",\\"GIReqBillID\\":\\"00000000000000040443\\",\\"FlexField1Code\\":\\"2210003715-20221020-03-001\\",\\"Quantity\\":\\"1.0\\",\\"Material\\":\\"00000000000000057927\\",\\"FlexField1Name\\":\\"宝应高铁站-欧变-2210003715-20221020-03-001\\",\\"GIReqBillItemID\\":\\"0002\\"},{\\"FlexField1\\":\\"00000000000007160127\\",\\"GIReqBillID\\":\\"00000000000000040443\\",\\"FlexField1Code\\":\\"2210003715-20221020-03-001\\",\\"Quantity\\":\\"6.0\\",\\"Material\\":\\"00000000000000057926\\",\\"FlexField1Name\\":\\"宝应高铁站-欧变-2210003715-20221020-03-001\\",\\"GIReqBillItemID\\":\\"0001\\"}],\\"WMSCode\\":\\"WMSCode001\\"}]}"}',
  15. scrq: '2023-04-13 15:38:02',
  16. accessType: '1',
  17. startTime: null,
  18. endTime: null,
  19. page: 0,
  20. limit: 0,
  21. };
  22. describe('接口日志', function () {
  23. beforeEach(function () {
  24. beforeSetup();
  25. intoMenu('系统日志', '接口日志');
  26. });
  27. beforeEach(function () {
  28. intercept('/queryList/getAccess', function ({reply, search}) {
  29. generateNetworkResult({search, reply, basicData, title: 'type'});
  30. });
  31. exportIntercept('/queryList/onOffExcels');
  32. });
  33. it('table', function () {
  34. validateTableList('gs_interface_log_table');
  35. validateTableSearch(
  36. 'gs_interface_log_table',
  37. [
  38. {id: 'type', type: 'select', value: '质检信息'},
  39. {id: 'accessType', type: 'select', value: '0'},
  40. 'data',
  41. {id: 'dates', type: 'date'},
  42. ],
  43. {
  44. toolId: 'gs_interface_log_filter',
  45. url: '/queryList/getAccess',
  46. },
  47. );
  48. validateExport('gs_interface_log_table');
  49. });
  50. });