Sfoglia il codice sorgente

test: 增加质检单列表测试

xyh 2 anni fa
parent
commit
6cc152a04b

+ 100 - 0
cypress/e2e/quality.cy.ts

@@ -0,0 +1,100 @@
+import {
+  beforeSetup,
+  generateNetworkResult,
+  intercept,
+  intoMenu,
+  selectAllFilters,
+  successIntercept,
+  validateDelete,
+  validatePut,
+  validateTableList,
+  validateTableSearch,
+} from './utils';
+
+const basicData = {
+  id: '8',
+  supplierId: 'EC00276',
+  supplierName: '西安特来电智能充电科技有限公司',
+  orderId: null,
+  orderNumber: null,
+  materialName: '六角螺母\\\\M16;4;彩锌;粗;GB/T41-2000\\\\',
+  materialId: null,
+  measurementId: null,
+  purchaseNum: '60',
+  arrivalNum: '60',
+  arrivalTime: '2023-04-12',
+  type: '0',
+  qualifiedNum: '60',
+  disqualificationNum: '0',
+  orderCode: '6202023040301356',
+  companyNumber: '8400',
+  compName: '青岛特来电智能充电设备有限公司',
+  wbs: '2',
+  orderType: null,
+  sourceType: null,
+  entryNumber: null,
+  moveType: null,
+  page: 0,
+  limit: 0,
+  startTime: null,
+  endTime: null,
+  warehousingNum: null,
+  wllbCode: '3415100010390008',
+};
+
+describe('质检单列表', function () {
+  beforeEach(function () {
+    beforeSetup(true);
+    intoMenu('入库管理', '质检单列表');
+  });
+
+  beforeEach(function () {
+    intercept('/receiveGoods/getReceiveGoods', function ({search, reply}) {
+      generateNetworkResult({search, reply, basicData, title: 'orderCode'});
+    });
+
+    successIntercept('/receiveGoods/delReceiveGoods');
+  });
+
+  it('table', function () {
+    selectAllFilters('quality_filter', 6);
+    validateTableList('receive_table');
+
+    validateTableSearch(
+      'receive_table',
+      [
+        'orderCode',
+        'materialId',
+        'materialName',
+        'wbs',
+        {id: 'companyNumber', type: 'select', value: '8130'},
+        {id: 'supplierId', type: 'select', value: 'EC92255'},
+      ],
+      {toolId: 'quality_filter', url: '/receiveGoods/getReceiveGoods'},
+    );
+  });
+
+  it('operation', function () {
+    const {validateAdd} = validatePut('quality_modal', 'receive_table', {
+      label: '质检单',
+    });
+
+    validateAdd([
+      'poId',
+      'poNo',
+      {id: 'materialId', type: 'keySelect'},
+      {id: 'measUnitId', type: 'keySelect'},
+      {id: 'purchaseCount', type: 'field', value: '10'},
+      {id: 'curOkCount', type: 'field', value: '10'},
+      {id: 'curNgCount', type: 'field', value: '10'},
+      {id: 'receiveCount', type: 'field', value: '10'},
+      {id: 'supplierNo', type: 'keySelect'},
+      {id: 'companyNo', type: 'keySelect'},
+      {id: 'poType', type: 'select'},
+      'entryNumber',
+      'WBS',
+    ]);
+
+    validateDelete('receive_table', '质检单', {eq: 0, title: 'page-1'});
+  });
+});

+ 7 - 0
cypress/e2e/utils/setup.ts

@@ -57,6 +57,12 @@ export function dictionaryIntercept() {
         return reply({fixture: 'dictonary/warehouse'});
       case '物料字典':
         return reply({fixture: 'dictonary/material'});
+      case '供应商/客户':
+        return reply({fixture: 'dictonary/customer'});
+      case '公司':
+        return reply({fixture: 'dictonary/company'});
+      case '计量单位':
+        return reply({fixture: 'dictonary/unit'});
     }
   });
 }
@@ -93,6 +99,7 @@ export function beforeSetup(autoLogin = false) {
   menuIntercept();
   dictionaryIntercept();
   optionsIntercept();
+  normalIntercept('/gsAccess/', 'gsSuccess', {delay: 100});
   if (autoLogin) {
     loginSetup();
   }

+ 5 - 5
cypress/e2e/utils/utils.ts

@@ -41,7 +41,7 @@ export function validateTableList(tableName: string) {
     .first()
     .find('td')
     .eq(1)
-    .should('include.text', 'page-1');
+    .should('have.text', 'page-1');
 
   cy.getTestId(tableName)
     .siblings('.ant-pagination')
@@ -55,7 +55,7 @@ export function validateTableList(tableName: string) {
     .first()
     .find('td')
     .eq(1)
-    .should('include.text', 'page-2');
+    .should('have.text', 'page-2');
 }
 
 /** 选择时间组件 */
@@ -137,7 +137,7 @@ export function validateTableSearch(
       .first()
       .find('td')
       .eq(1)
-      .should('include.text', text);
+      .should('have.text', text);
 
     cy.getTestId(tableName)
       .siblings('.ant-pagination')
@@ -223,7 +223,7 @@ export function validateModalBtnGroup(modalName: string) {
 
 // 校验antd message内容
 export function validateMessageContent(msg: string) {
-  cy.get('.ant-message-notice-content').should('include.text', msg);
+  cy.get('.ant-message-notice-content').should('have.text', msg);
 }
 
 // 校验modal的操作结果
@@ -257,7 +257,7 @@ export function validatePut(
       .click();
 
     cy.getTestId(modalName).should('exist').and('be.visible');
-    cy.getTestId(modalName).find('h3').should('include.text', `新增${label}`);
+    cy.getTestId(modalName).find('h3').should('have.text', `新增${label}`);
 
     keys.forEach(function (key) {
       if (typeof key === 'string') {

+ 63 - 0
cypress/fixtures/dictonary/company.json

@@ -0,0 +1,63 @@
+{
+  "msg": "200",
+  "data": [
+    {
+      "id": "2",
+      "code": "8130",
+      "name": "青岛特来电智能设备有限公司",
+      "tldId": "262206d0-2fa6-413a-aa27-ad7566a85893",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "3",
+      "code": "8400",
+      "name": "青岛特来电智能充电设备有限公司",
+      "tldId": "b248dcc9-7e3e-4ea3-9c62-d5878c59db0b",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    }
+  ]
+}

File diff suppressed because it is too large
+ 1107 - 0
cypress/fixtures/dictonary/customer.json


+ 759 - 0
cypress/fixtures/dictonary/unit.json

@@ -0,0 +1,759 @@
+{
+  "msg": "200",
+  "data": [
+    {
+      "id": "1",
+      "code": "PCS",
+      "name": "件",
+      "tldId": "00000000000000000001",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "2",
+      "code": "BOX",
+      "name": "箱",
+      "tldId": "00000000000000000002",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "3",
+      "code": "g",
+      "name": "克",
+      "tldId": "00000000000000000003",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "4",
+      "code": "Tai",
+      "name": "台",
+      "tldId": "00000000000000000004",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "5",
+      "code": "PAC",
+      "name": "包",
+      "tldId": "00000000000000000005",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "6",
+      "code": "CAN",
+      "name": "盒",
+      "tldId": "00000000000000000006",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "7",
+      "code": "Torr",
+      "name": "托",
+      "tldId": "00000000000000000007",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "8",
+      "code": "KM",
+      "name": "千米",
+      "tldId": "10001000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "9",
+      "code": "M",
+      "name": "米",
+      "tldId": "10002000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "10",
+      "code": "DM",
+      "name": "分米",
+      "tldId": "10003000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "11",
+      "code": "CM",
+      "name": "厘米",
+      "tldId": "10004000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "12",
+      "code": "MM",
+      "name": "毫米",
+      "tldId": "10005000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "13",
+      "code": "KM2",
+      "name": "平方千米",
+      "tldId": "20001000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "14",
+      "code": "M2",
+      "name": "平方米",
+      "tldId": "20002000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "15",
+      "code": "DM2",
+      "name": "平方分米",
+      "tldId": "20003000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "16",
+      "code": "CM2",
+      "name": "平方厘米",
+      "tldId": "20004000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "17",
+      "code": "M3",
+      "name": "立方米",
+      "tldId": "30001000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "18",
+      "code": "L",
+      "name": "升",
+      "tldId": "30002000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "19",
+      "code": "ML",
+      "name": "毫升",
+      "tldId": "30003000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "20",
+      "code": "t",
+      "name": "吨",
+      "tldId": "40001000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "21",
+      "code": "Kg",
+      "name": "千克",
+      "tldId": "40002000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "22",
+      "code": "H",
+      "name": "小时",
+      "tldId": "50001000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "23",
+      "code": "Min",
+      "name": "分钟",
+      "tldId": "50002000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "24",
+      "code": "S",
+      "name": "秒",
+      "tldId": "50003000000000000000",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": null,
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "25",
+      "code": "test_PCS",
+      "name": "件",
+      "tldId": "00000000000000000001",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": "0",
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    },
+    {
+      "id": "26",
+      "code": "test_BOX",
+      "name": "箱",
+      "tldId": "00000000000000000002",
+      "specificationAndModel": null,
+      "unitOfMeasurement": null,
+      "materialId": null,
+      "num": null,
+      "type": "0",
+      "tableName": null,
+      "size": null,
+      "materialType": null,
+      "wllbClass": null,
+      "isNotDisable": null,
+      "isRecommend": null,
+      "partType": null,
+      "page": 0,
+      "limit": 0,
+      "amount": null,
+      "minNum": null,
+      "maxNum": null,
+      "modifyUser": null,
+      "modifyTime": null,
+      "typeVal": null,
+      "companyNumber": null,
+      "warehouseType": null,
+      "nameOrCode": null
+    }
+  ]
+}

+ 3 - 0
cypress/fixtures/gsSuccess.json

@@ -0,0 +1,3 @@
+{
+  "status": "0000"
+}

+ 1 - 0
packages/app/src/pages/quality/filter/index.tsx

@@ -40,6 +40,7 @@ const Filter: FC = function () {
         onReset={onReset}
         onFilter={onShowModal}
         onChange={onChange}
+        testId='quality_filter'
       />
 
       <FilterSelectorModal

+ 1 - 1
packages/app/src/pages/quality/filter/state.ts

@@ -26,5 +26,5 @@ export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
 export const fixedMap: MapValue<typeof contextState>[] = [
   {label: '采购单编号', type: 'field', value: 'orderCode'},
   {label: '物料编号', type: 'field', value: 'materialId'},
-  {label: '物料名称', type: 'field', value: 'materialId'},
+  {label: '物料名称', type: 'field', value: 'materialName'},
 ];

+ 1 - 0
packages/app/src/pages/quality/table/modal/index.tsx

@@ -46,6 +46,7 @@ const AddModal: FC<Props> = function ({visible, onClose, onFetch}) {
       title='新增质检单'
       onSubmit={onSubmit}
       isLoading={isLoading}
+      testId='quality_modal'
     >
       <ModalField name='poId' label='采购单ID' control={control} />
       <ModalField name='poNo' label='采购单编号' control={control} />