deadProduct.cy.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import {
  2. beforeSetup,
  3. exportIntercept,
  4. generateNetworkResult,
  5. intercept,
  6. intoMenu,
  7. selectAllFilters,
  8. validateExport,
  9. validateTableList,
  10. validateTableSearch,
  11. } from './utils';
  12. const basicData = {
  13. materialName: '六角螺母\\\\M16;4;彩锌;粗;GB/T41-2000\\\\',
  14. amount: '1.00',
  15. wllbCode: '3415100010390008',
  16. accountSleeve: '8400',
  17. storageLocationCode: 'B3-10-4',
  18. companyName: '青岛特来电智能充电设备有限公司',
  19. ustomerName: '西安特来电智能充电科技有限公司',
  20. wbs: '2',
  21. scrq: '2022-04-13 10:13:24',
  22. id: 8221,
  23. storageLocationName: 'B3-10-4',
  24. materialId: '00000000000000016029',
  25. };
  26. describe('呆滞品明细', function () {
  27. beforeEach(function () {
  28. beforeSetup();
  29. intoMenu('库内管理', '呆滞品明细');
  30. });
  31. beforeEach(function () {
  32. intercept('/queryList/dullGoods', function ({search, reply}) {
  33. generateNetworkResult({search, reply, basicData, title: 'wllbCode'});
  34. });
  35. exportIntercept('/queryList/dullGoodsExport');
  36. });
  37. it('table', function () {
  38. selectAllFilters('dead_product_filter', 6);
  39. validateTableList('dead_product_table');
  40. validateTableSearch(
  41. 'dead_product_table',
  42. [
  43. 'wllbCode',
  44. 'materialName',
  45. 'storageLocationName',
  46. {id: 'companyCode', type: 'select', value: '8130'},
  47. {id: 'ustomerCode', type: 'select', value: 'EC92255'},
  48. 'wbs',
  49. ],
  50. {toolId: 'dead_product_filter', url: '/queryList/dullGoods'},
  51. );
  52. validateExport('dead_product_table');
  53. });
  54. });