Prechádzať zdrojové kódy

chore: 移除旧的e2e测试

xyh 2 rokov pred
rodič
commit
194f5fe062

+ 0 - 149
cypress/e2e/container.cy.ts

@@ -1,149 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  selectClick,
-  optionsIntercept,
-  validatePut,
-  successIntercept,
-  exportIntercept,
-  validateSelect,
-  validateDelete,
-  validateExport,
-  tableBtnClick,
-  validateModalOperation,
-  closeModal,
-  dictionaryIntercept,
-  intoMenu,
-} from './utils';
-
-describe('容器管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('基础数据管理', '容器管理');
-  });
-
-  beforeEach(function () {
-    intercept('/container/getContainer', function ({search, reply}) {
-      if (search.has('containerName') && search.get('containerName').length)
-        return reply({fixture: 'container/nameSearch'});
-      if (search.has('type') && search.get('type').length)
-        return reply({fixture: 'container/typeSearch'});
-      if (search.has('department') && search.get('department').length)
-        return reply({fixture: 'container/depSearch'});
-
-      const page = search.get('page');
-      reply({fixture: `container/list${page}`});
-    });
-
-    intercept('/container/getScrap', function ({search, reply}) {
-      if (search.has('startTime') && search.get('startTime').length)
-        return reply({fixture: 'container/scrapSearch'});
-
-      const page = search.get('page');
-      reply({fixture: `container/scrapList${page}`});
-    });
-
-    successIntercept('container/addContainer');
-    successIntercept('container/updateContainer');
-    successIntercept('container/delCon');
-    successIntercept('container/delContainer');
-    exportIntercept('container/export');
-    exportIntercept('container/exportScrap');
-  });
-
-  const TABLE_NAME = 'container_table',
-    MODAL_NAME = 'container_modal',
-    LABEL = '容器';
-
-  it('列表', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME);
-
-    cy.get('#filter_containerName').type('searchName');
-    validate('nameSearch');
-
-    cy.get('#filter_containerName').clear();
-    cy.get('#filter_containerType').type('searchType');
-    validate('typeSearch');
-
-    cy.get('#filter_containerType').clear();
-    selectClick('filter_containerNameDepartment', 2);
-    validate('depSearch');
-
-    validateExport();
-  });
-
-  it('表格操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-
-    validateAdd(function () {
-      cy.getTestId('field_containerName').type('name');
-      cy.getTestId('field_containerType').type('type');
-      cy.getTestId('field_containerNum').clear().type('2');
-      selectClick('select_containerDepartment', 2);
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.getTestId('field_containerName').should('have.value', '仓库1');
-      cy.getTestId('field_containerType').should('have.value', '随便');
-      cy.getTestId('field_containerNum').should('have.value', '5');
-      validateSelect('select_containerDepartment', '仓储部门');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-
-    // #region 报废
-    tableBtnClick(TABLE_NAME, 2);
-
-    cy.getTestId('container_scrap_modal').find('h3').should('have.text', '容器报废');
-
-    cy.getTestId('field_scrapNum').clear().type('2');
-    cy.get('#operation_scrapNote').type('报废理由');
-
-    validateModalOperation('container_scrap_modal', '报废成功');
-    // #endregion
-  });
-
-  it('报废列表', function () {
-    tableBtnClick(TABLE_NAME, 3);
-
-    validateTableList('container_scrap_table', 2, 1);
-
-    const validate = validateTableSearch('container_scrap_table', 'timeSearch', {
-      btnTestId: 'container_scrap_search',
-    });
-
-    cy.getTestId('date_filter_containerDate').click();
-    cy.get('.ant-picker-date-panel')
-      .eq(0)
-      .find('.ant-picker-content')
-      .find('tbody')
-      .find('td')
-      .first()
-      .click();
-
-    cy.get('.ant-picker-date-panel')
-      .eq(1)
-      .find('.ant-picker-content')
-      .find('tbody')
-      .find('td')
-      .first()
-      .click();
-
-    validate();
-
-    validateExport('container_scrap_export');
-
-    closeModal();
-    cy.getTestId('container_scrap_table').should('not.exist');
-  });
-});

+ 0 - 67
cypress/e2e/goods.cy.ts

@@ -1,67 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intercept,
-  successIntercept,
-  validateTableList,
-  validateTableSearch,
-  validatePut,
-  validateSelect,
-  intoMenu,
-} from './utils';
-
-describe('物料管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('基础数据管理', '物料管理');
-  });
-
-  beforeEach(function () {
-    intercept('/dictionary/getDictionaryPage', function ({search, reply}) {
-      if (search.has('name') && search.get('name').length)
-        return reply({fixture: 'dictonary/search1'});
-      if (search.has('code') && search.get('code').length)
-        return reply({fixture: 'dictonary/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `dictonary/list${page}`});
-    });
-
-    successIntercept('/materialClass/updateMaterial');
-  });
-
-  const TABLE_NAME = 'goods_table',
-    MODAL_NAME = 'goods_modal';
-
-  it('表单', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME);
-
-    cy.get('#filter_goodsName').type('name');
-    validate('search1');
-
-    cy.get('#filter_goodsName').clear();
-    cy.get('#filter_goodsCode').type('code');
-    validate('search2');
-  });
-
-  it.only('修改操作', function () {
-    const {validateEdit} = validatePut(MODAL_NAME, '物料');
-
-    validateEdit(TABLE_NAME, function () {
-      validateSelect('select_goodsType', '546');
-      cy.getTestId('field_goodsSize').should('have.value', '1');
-      validateSelect('select_goodsMixin', '是');
-      validateSelect('select_goodsRecommend', '是');
-      cy.get('#operation_goodsPartType').should('have.value', '半成品');
-    });
-  });
-});

+ 0 - 22
cypress/e2e/login.cy.ts

@@ -1,22 +0,0 @@
-import {loginIntercept, loginSetup, menuIntercept} from './utils';
-
-describe('登录页面', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-  });
-
-  it('登录', function () {
-    cy.getTestId('user_name').should('contain.text', '超级管理员');
-  });
-
-  it('退出', function () {
-    cy.get('.ant-dropdown-trigger').trigger('mouseover');
-    cy.get('.ant-dropdown').should('be.visible');
-    cy.get('.ant-dropdown-menu').children().first().click();
-    cy.get('.ant-modal-confirm-btns').children().last().click();
-
-    cy.url().should('contain', '/login');
-  });
-});

+ 0 - 75
cypress/e2e/matter.cy.ts

@@ -1,75 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intercept,
-  selectClick,
-  validateTableList,
-  validateTableSearch,
-  successIntercept,
-  validatePut,
-  validateSelect,
-  validateDelete,
-  intoMenu,
-} from './utils';
-
-describe('库位绑定管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('基础数据管理', '库位绑定管理');
-  });
-
-  beforeEach(function () {
-    intercept('/materialClass/getMaterialClass', function ({search, reply}) {
-      if (search.has('storageLocationCode') && search.get('storageLocationCode').length)
-        return reply({fixture: 'matter/search1'});
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'matter/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `matter/list${page}`});
-    });
-
-    successIntercept('/materialClass/addMaterialClass');
-    successIntercept('/materialClass/updateMaterialClass');
-    successIntercept('/materialClass/delMaterialClass');
-  });
-
-  const TABLE_NAME = 'matter_table',
-    MODAL_NAME = 'matter_modal';
-
-  it('列表', function () {
-    validateTableList(TABLE_NAME, 2, 1);
-
-    const validate = validateTableSearch(TABLE_NAME);
-
-    selectClick('filter_matterCode', 1);
-    validate('search2');
-
-    selectClick('filter_matterCode', 0);
-    selectClick('filter_StorageCode', 1);
-    validate('search1');
-  });
-
-  it('列表操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, '库位绑定');
-
-    validateAdd(function () {
-      selectClick('select_wllbCode', 0);
-      selectClick('select_storageLocationCode', 0);
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      validateSelect('select_wllbCode', '材料1');
-      validateSelect('select_storageLocationCode', '1号库位');
-    });
-
-    validateDelete(TABLE_NAME, '库位绑定');
-  });
-});

+ 0 - 130
cypress/e2e/menu.cy.ts

@@ -1,130 +0,0 @@
-import {
-  closeModal,
-  intercept,
-  intoMenu,
-  loginIntercept,
-  loginSetup,
-  menuIntercept,
-  successIntercept,
-  tableBtnClick,
-  validateDelete,
-  validatePut,
-  validateTableList,
-  validateTableSearch,
-} from './utils';
-
-describe('菜单管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('系统设置', '菜单管理');
-  });
-
-  beforeEach(function () {
-    intercept('/menu/getPage', function ({reply, url: reqUrl}) {
-      const url = new URL(reqUrl);
-      const search = new URLSearchParams(url.search);
-
-      if (search.get('pId') !== '0') {
-        if (search.has('name') && search.get('name').length)
-          return reply({fixture: 'menu/childSearchList'});
-
-        const page = search.get('page');
-        return reply({fixture: `menu/childList${page}`});
-      }
-
-      if (search.has('name') && search.get('name').length)
-        return reply({fixture: 'menu/searchList'});
-
-      const page = search.get('page');
-      return reply({fixture: `menu/list${page}`});
-    });
-
-    successIntercept('/menu/addMenu');
-    successIntercept('/menu/updateMenu');
-    successIntercept('/menu/delMenu');
-  });
-
-  const TABLE_NAME = 'menu_table',
-    MODAL_NAME = 'menu_modal',
-    LABEL = '菜单';
-
-  const CHILD_TALBE_NAME = 'child_menu_table',
-    CHILD_MODAL_NAME = 'child_menu_modal',
-    CHILD_LABEL = '菜单';
-
-  it('表格', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME, '菜单搜索');
-
-    cy.get('#filter_menuName').type('name');
-
-    validate();
-  });
-
-  it('列表操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-    validateAdd(function () {
-      cy.getTestId('field_menuName').type('菜单名称');
-      cy.getTestId('field_menuUrl').type('/test');
-      cy.getTestId('field_menuOrderBy').clear().type('8');
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.getTestId('field_menuName').should('have.value', '用户设置');
-      cy.getTestId('field_menuUrl').should('have.value', '.');
-      cy.getTestId('field_menuOrderBy').should('have.value', '1');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-
-    // #region 子菜单
-    tableBtnClick(TABLE_NAME, 2);
-
-    cy.getTestId('child_menu').should('exist').and('be.visible');
-
-    validateTableList(CHILD_TALBE_NAME);
-
-    cy.getTestId('child_menu').should('exist').and('be.visible');
-
-    closeModal();
-
-    cy.getTestId('child_menu').should('not.exist');
-    // #endregion
-  });
-
-  it('子菜单操作', function () {
-    tableBtnClick(TABLE_NAME, 2);
-
-    // #region 搜索
-    const validate = validateTableSearch(CHILD_TALBE_NAME, 'childMenuSearch', {
-      btnTestId: 'child_menu_search_btn',
-    });
-    cy.get('#filter_childMenuName').type('子菜单名称');
-
-    validate();
-    // #endregion
-
-    const {validateAdd: childValidateAdd, validateEdit: childValidateEdit} = validatePut(
-      CHILD_MODAL_NAME,
-      CHILD_LABEL,
-      {addBtnTestId: 'child_menu_add_btn'},
-    );
-
-    childValidateAdd(function () {
-      cy.getTestId('field_menuName').type('菜单名称');
-      cy.getTestId('field_menuUrl').type('/test');
-      cy.getTestId('field_menuOrderBy').clear().type('8');
-    });
-
-    childValidateEdit(CHILD_TALBE_NAME, function () {
-      cy.getTestId('field_menuName').should('have.value', '用户管理');
-      cy.getTestId('field_menuUrl').should('have.value', '/user');
-      cy.getTestId('field_menuOrderBy').should('have.value', '0');
-    });
-
-    validateDelete(CHILD_TALBE_NAME, CHILD_LABEL);
-  });
-});

+ 0 - 78
cypress/e2e/pdaMenu.cy.ts

@@ -1,78 +0,0 @@
-import {
-  intercept,
-  intoMenu,
-  loginIntercept,
-  loginSetup,
-  menuIntercept,
-  successIntercept,
-  validateDelete,
-  validatePut,
-  validateTableList,
-  validateTableSearch,
-} from './utils';
-
-describe('PDA菜单管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('系统设置', 'PDA菜单管理');
-  });
-
-  beforeEach(function () {
-    intercept('/menu/getPage', function ({reply, url: reqUrl}) {
-      const url = new URL(reqUrl);
-      const search = new URLSearchParams(url.search);
-
-      if (search.get('pId') !== '0') {
-        if (search.has('name') && search.get('name').length)
-          return reply({fixture: 'menu/childSearchList'});
-
-        const page = search.get('page');
-        return reply({fixture: `menu/childList${page}`});
-      }
-
-      if (search.has('name') && search.get('name').length)
-        return reply({fixture: 'menu/searchList'});
-
-      const page = search.get('page');
-      return reply({fixture: `menu/list${page}`});
-    });
-
-    successIntercept('/menu/addMenu');
-    successIntercept('/menu/updateMenu');
-    successIntercept('/menu/delMenu');
-  });
-
-  const TABLE_NAME = 'menu_table',
-    MODAL_NAME = 'menu_modal',
-    LABEL = 'PDA菜单';
-
-  it('表格', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME, 'search');
-
-    cy.get('#filter_menuName').type('name');
-
-    validate();
-  });
-
-  it('表格操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-
-    validateAdd(function () {
-      cy.getTestId('field_menuName').type('菜单名称');
-      cy.getTestId('field_menuID').type('test');
-      cy.getTestId('field_menuOrderBy').clear().type('8');
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.getTestId('field_menuName').should('have.value', '用户设置');
-      cy.getTestId('field_menuID').should('have.value', '.');
-      cy.getTestId('field_menuOrderBy').should('have.value', '1');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-  });
-});

+ 0 - 62
cypress/e2e/productInStream.cy.ts

@@ -1,62 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  exportIntercept,
-  validateExport,
-  validateTableSearch,
-  clickDatePicker,
-} from './utils';
-
-describe('产成品入库流水', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('入库管理', '产成品入库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/warehousing/getHalf', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'product-in-stream/search1'});
-
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'product-in-stream/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `product-in-stream/list${page}`});
-    });
-
-    exportIntercept('/warehousing/getRemovalHalfExcel');
-  });
-
-  it('表格', function () {
-    const tableName = 'product_in_stream_table';
-
-    validateTableList(tableName);
-
-    const validate = validateTableSearch(tableName);
-
-    cy.get('#filter_finishProductInCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_finishProductInCode').clear();
-    clickDatePicker('date_filter_finishProductInDates');
-    validate('search2');
-
-    validateExport();
-  });
-});

+ 0 - 62
cypress/e2e/productOutStream.cy.ts

@@ -1,62 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  exportIntercept,
-  validateExport,
-  validateTableSearch,
-  clickDatePicker,
-} from './utils';
-
-describe('产成品出库流水', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('出库管理', '产成品出库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/askGoods/getRemovalHalf', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'product-out-stream/search1'});
-
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'product-out-stream/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `product-out-stream/list${page}`});
-    });
-
-    exportIntercept('/askGoods/getRemovalHalfExcel');
-  });
-
-  it('表格', function () {
-    const tableName = 'product_out_stream_table';
-
-    validateTableList(tableName);
-
-    const validate = validateTableSearch(tableName);
-
-    cy.get('#filter_finishProductOutCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_finishProductOutCode').clear();
-    clickDatePicker('date_filter_finishProductOutDates');
-    validate('search2');
-
-    validateExport();
-  });
-});

+ 0 - 61
cypress/e2e/rawInStream.cy.ts

@@ -1,61 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  clickDatePicker,
-  validateExport,
-  exportIntercept,
-} from './utils';
-
-describe('入库流水管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('入库管理', '原材料入库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/warehousing/warehousingFlowing', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'raw-in-stream/search1'});
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'raw-in-stream/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `raw-in-stream/list${page}`});
-    });
-
-    exportIntercept('/warehousing/export');
-  });
-
-  const TABLE_NAME = 'raw_in_stream_table';
-
-  it('列表', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME);
-
-    cy.get('#filter_rawMaterialCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_rawMaterialCode').clear();
-    clickDatePicker('date_filter_rawMaterialDates');
-    validate('search2');
-
-    validateExport();
-  });
-});

+ 0 - 59
cypress/e2e/rawOutStream.cy.ts

@@ -1,59 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  clickDatePicker,
-} from './utils';
-
-describe('出库流水', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('出库管理', '原材料出库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/askGoods/getRemoval', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'raw-out-stream/search1'});
-      if (search.has('type') && search.get('type').length)
-        return reply({fixture: 'raw-out-stream/search2'});
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'raw-out-stream/search3'});
-
-      const page = search.get('page');
-      reply({fixture: `raw-out-stream/list${page}`});
-    });
-  });
-
-  it('表格', function () {
-    validateTableList('raw_out_stream_table', 10, 4);
-
-    const validate = validateTableSearch('raw_out_stream_table');
-
-    cy.get('#filter_rawMaterialCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_rawMaterialCode').clear();
-    cy.get('#filter_rawMaterialType').type('type');
-    validate('search2');
-
-    cy.get('#filter_rawMaterialType').clear();
-    clickDatePicker('date_filter_rawMaterialDates');
-    validate('search3');
-  });
-});

+ 0 - 60
cypress/e2e/receive.cy.ts

@@ -1,60 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  selectClick,
-  clickDatePicker,
-} from './utils';
-
-describe('采购单列表', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('入库管理', '采购单列表');
-  });
-
-  beforeEach(function () {
-    intercept('/receiveGoods/getReceiveGoods', function ({search, reply}) {
-      if (search.has('orderCode') && search.get('orderCode').length)
-        return reply({fixture: 'receive/search1'});
-      if (search.has('type') && search.get('type').length)
-        return reply({fixture: 'receive/search2'});
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'receive/search3'});
-
-      const page = search.get('page');
-      reply({fixture: `receive/list${page}`});
-    });
-  });
-
-  it('列表', function () {
-    validateTableList('receive_table');
-
-    const validate = validateTableSearch('receive_table');
-
-    cy.get('#filter_receiveCode').type('searchCode');
-    validate('search1');
-
-    cy.get('#filter_receiveCode').clear();
-    selectClick('filter_receiveState', 1);
-    validate('search2');
-
-    selectClick('filter_receiveState', 0);
-    clickDatePicker('date_filter_receiveDate');
-    validate('search3');
-  });
-});

+ 0 - 41
cypress/e2e/receiveTimeout.cy.ts

@@ -1,41 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  optionsIntercept,
-  dictionaryIntercept,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-} from './utils';
-
-describe('逾期采购单列表', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('入库管理', '逾期采购单列表');
-  });
-
-  beforeEach(function () {
-    intercept('/receiveGoods/getPastReceiveGoods', function ({search, reply}) {
-      if (search.has('orderCode') && search.get('orderCode').length)
-        return reply({fixture: 'receive/search1'});
-
-      const page = search.get('page');
-      reply({fixture: `receive/list${page}`});
-    });
-  });
-
-  it('列表', function () {
-    validateTableList('receive_timeout_table');
-
-    const validate = validateTableSearch('receive_timeout_table');
-
-    cy.get('#filter_receiveCode').type('searchCode');
-    validate('search1');
-  });
-});

+ 0 - 125
cypress/e2e/role.cy.ts

@@ -1,125 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  validateDelete,
-  validatePut,
-  validateTableList,
-  validateTableSearch,
-  successIntercept,
-  normalIntercept,
-  intercept,
-  tableBtnClick,
-  exportIntercept,
-  validateExport,
-  validateModalBtnGroup,
-  intoMenu,
-} from './utils';
-
-describe('角色管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('系统设置', '角色管理');
-  });
-
-  beforeEach(function () {
-    intercept('/role/getRole', function ({url: reqUrl, reply}) {
-      const url = new URL(reqUrl);
-      const search = new URLSearchParams(url.search);
-
-      if (search.has('roleName') && search.get('roleName').length)
-        return reply({fixture: 'role/search'});
-
-      const page = search.get('page');
-      reply({fixture: page === '1' ? 'role/list1' : 'role/list2'});
-    });
-    intercept('/menu/getPage', function ({reply}) {
-      reply({fixture: 'menu/pda'});
-    });
-
-    successIntercept('/role/addRole');
-    successIntercept('/role/updateRole');
-    successIntercept('/role/delRole');
-    normalIntercept('/menu/getMenu', 'menu/all');
-    exportIntercept('/role/export');
-  });
-
-  const TABLE_NAME = 'role_table',
-    MODAL_NAME = 'role_modal',
-    LABEL = '角色';
-
-  it('列表', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME, 'roleSearch');
-
-    cy.get('#filter_roleName').type('roleName');
-    validate();
-
-    validateExport();
-  });
-
-  it('表单操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-
-    validateAdd(function () {
-      cy.get('#operation_roleName').type('roleName');
-      cy.get('#operation_roleRemarks').type('roleRemarks');
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.get('#operation_roleName').should('have.value', '仓库管理员');
-      cy.get('#operation_roleRemarks').should('have.value', 'cangk');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-
-    // #region 菜单权限
-    tableBtnClick(TABLE_NAME, 2);
-
-    cy.getTestId('role_tree_modal').find('h3').should('include.html', '菜单权限');
-    cy.getTestId('role_tree_modal').should('exist').and('be.visible');
-
-    cy.getTestId('role_tree')
-      .find('.ant-tree-list-holder-inner')
-      .find('.ant-tree-treenode')
-      .each(function (res, idx) {
-        idx <= 3
-          ? expect(res.hasClass('ant-tree-treenode-checkbox-checked')).to.true
-          : expect(res.hasClass('ant-tree-treenode-checkbox-checked')).to.false;
-      })
-      .should('have.length', 9);
-
-    cy.getTestId('role_tree_modal').find('form').submit();
-
-    validateModalBtnGroup('role_tree_modal');
-
-    cy.get('.ant-message-notice-content').should('include.text', '设置成功');
-    cy.getTestId('role_tree_modal').should('not.exist');
-    // #endregion
-
-    // #region pda权限
-    tableBtnClick(TABLE_NAME, 3);
-
-    cy.get('.ant-transfer-list')
-      .eq(0)
-      .find('.ant-transfer-list-content')
-      .children('.ant-transfer-list-content-item')
-      .should('have.length', 4);
-    cy.get('.ant-transfer-list')
-      .eq(1)
-      .find('.ant-transfer-list-content')
-      .children('.ant-transfer-list-content-item')
-      .should('have.length', 2);
-
-    cy.getTestId('role_pda_menu_modal').find('form').submit();
-
-    validateModalBtnGroup('role_pda_menu_modal');
-
-    cy.get('.ant-message-notice-content').should('include.text', '设置成功');
-    cy.getTestId('role_tree_modal').should('not.exist');
-    // #endregion
-  });
-});

+ 0 - 59
cypress/e2e/semiDraw.cy.ts

@@ -1,59 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  intoMenu,
-  intercept,
-  successIntercept,
-  validateTableList,
-  validateTableSearch,
-  selectClick,
-  tableBtnClick,
-  validateModalOperation,
-} from './utils';
-
-describe('半成品出库申请', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('出库管理', '半成品领料单管理');
-  });
-
-  beforeEach(function () {
-    intercept('/askGoods/getGoodsHalf', function ({search, reply}) {
-      if (search.has('productionCode') && search.get('productionCode').length)
-        return reply({fixture: 'semi-draw/search1'});
-      if (search.has('type') && search.get('type').length)
-        return reply({fixture: 'semi-draw/search2'});
-
-      const page = search.get('page');
-
-      reply({fixture: `semi-draw/list${page}`});
-    });
-
-    successIntercept('/warehousing/updateInventoryNotice');
-  });
-
-  const tableName = 'semi_draw_table';
-
-  it('表格', function () {
-    validateTableList(tableName);
-
-    const validate = validateTableSearch(tableName);
-
-    cy.get('#filter_semiDrawCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_semiDrawCode').clear();
-    selectClick('filter_semiDrawType', 1);
-    validate('search2');
-  });
-
-  it('出库操作', function () {
-    tableBtnClick(tableName, 0);
-    cy.getTestId('field_semiDrawNum').should('have.value', '100');
-
-    validateModalOperation('semi_draw_modal', '出库成功');
-  });
-});

+ 0 - 56
cypress/e2e/semiInStream.cy.ts

@@ -1,56 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  clickDatePicker,
-  validateExport,
-  exportIntercept,
-} from './utils';
-
-describe('半成品入库流水', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('入库管理', '半成品入库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/warehousing/getProduct', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'semi-in-stream/search1'});
-
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'semi-in-stream/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `semi-in-stream/list${page}`});
-    });
-
-    exportIntercept('/warehousing/productExcel');
-  });
-
-  it('列表', function () {
-    validateTableList('semi_in_stream_table');
-
-    const validate = validateTableSearch('semi_in_stream_table');
-
-    cy.get('#filter_semiInCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_semiInCode').clear();
-    clickDatePicker('date_filter_semiInDates');
-    validate('search2');
-
-    validateExport();
-  });
-});

+ 0 - 56
cypress/e2e/semiOutStream.cy.ts

@@ -1,56 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  intoMenu,
-  intercept,
-  validateTableList,
-  validateTableSearch,
-  clickDatePicker,
-  validateExport,
-  exportIntercept,
-} from './utils';
-
-describe('半成品出库流水', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('出库管理', '半成品出库流水列表');
-  });
-
-  beforeEach(function () {
-    intercept('/askGoods/getRemovalHalfProduct', function ({search, reply}) {
-      if (search.has('wllbCode') && search.get('wllbCode').length)
-        return reply({fixture: 'semi-out-stream/search1'});
-
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'semi-out-stream/search2'});
-
-      const page = search.get('page');
-      reply({fixture: `semi-out-stream/list${page}`});
-    });
-
-    exportIntercept('/askGoods/getRemovalHalfProductExcel');
-  });
-
-  it('列表', function () {
-    validateTableList('semi_out_stream_table');
-
-    const validate = validateTableSearch('semi_out_stream_table');
-
-    cy.get('#filter_semiOutCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_semiOutCode').clear();
-    clickDatePicker('date_filter_semiOutDates');
-    validate('search2');
-
-    validateExport();
-  });
-});

+ 0 - 71
cypress/e2e/semiReport.cy.ts

@@ -1,71 +0,0 @@
-import {
-  loginIntercept,
-  menuIntercept,
-  loginSetup,
-  intoMenu,
-  intercept,
-  successIntercept,
-  validateTableList,
-  validateTableSearch,
-  selectClick,
-  clickDatePicker,
-  tableBtnClick,
-  validateModalOperation,
-} from './utils';
-
-describe('半成品入库申请', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    intoMenu('入库管理', '半成品报工单管理');
-  });
-
-  beforeEach(function () {
-    intercept('/warehousing/getNotice', function ({search, reply}) {
-      if (search.has('materialCode') && search.get('materialCode').length)
-        return reply({fixture: 'semi-report/search1'});
-      if (search.has('type') && search.get('type').length)
-        return reply({fixture: 'semi-report/search2'});
-      if (
-        search.has('startTime') &&
-        search.get('startTime').length &&
-        search.has('endTime') &&
-        search.get('endTime').length
-      )
-        return reply({fixture: 'semi-report/search3'});
-
-      const page = search.get('page');
-
-      reply({fixture: `semi-report/list${page}`});
-    });
-
-    successIntercept('/warehousing/addInventoryNotice');
-  });
-
-  const tableName = 'semi_report_table';
-
-  it('表格', function () {
-    validateTableList(tableName);
-
-    const validate = validateTableSearch(tableName);
-
-    cy.get('#filter_semiReportCode').type('code');
-    validate('search1');
-
-    cy.get('#filter_semiReportCode').clear();
-    selectClick('filter_semiReportType', 1);
-    validate('search2');
-
-    selectClick('filter_semiReportType', 0);
-    clickDatePicker('date_filter_rawMaterialDates');
-    validate('search3');
-  });
-
-  it('入库操作', function () {
-    tableBtnClick(tableName, 0);
-    cy.getTestId('field_putInStoragenum').should('have.value', '80');
-
-    validateModalOperation('semi_report_modal', '入库成功');
-  });
-});

+ 0 - 105
cypress/e2e/storage.cy.ts

@@ -1,105 +0,0 @@
-import {
-  loginIntercept,
-  loginSetup,
-  menuIntercept,
-  selectClick,
-  validateSelect,
-  validateDelete,
-  validatePut,
-  validateTableList,
-  validateTableSearch,
-  successIntercept,
-  intercept,
-  validateExport,
-  exportIntercept,
-  intoMenu,
-  dictionaryIntercept,
-} from './utils';
-
-describe('库位管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    dictionaryIntercept();
-    intoMenu('基础数据管理', '库位管理');
-  });
-
-  beforeEach(function () {
-    intercept('/storage/getStorage', function ({url: reqUrl, reply}) {
-      const url = new URL(reqUrl);
-      const search = new URLSearchParams(url.search);
-
-      if (search.has('storageLocationName') && search.get('storageLocationName').length)
-        return reply({fixture: 'storage/nameSearch'});
-      if (search.has('storageLocationCode') && search.get('storageLocationCode').length)
-        return reply({fixture: 'storage/codeSearch'});
-      if (search.has('storageLocationType') && search.get('storageLocationType').length)
-        return reply({fixture: 'storage/typeSearch'});
-      if (search.has('isNotDisable') && search.get('isNotDisable').length)
-        return reply({fixture: 'storage/disabledSearch'});
-
-      if (search.has('id') && search.get('id').length) return reply({fixture: 'storage/info'});
-
-      const page = search.get('page');
-      reply({fixture: page === '1' ? 'storage/list1' : 'storage/list2'});
-    });
-
-    successIntercept('/storage/addStorage');
-    successIntercept('/storage/updateStorage');
-    successIntercept('/storage/delStorage');
-    exportIntercept('/storage/export');
-  });
-
-  const TABLE_NAME = 'storage_table',
-    MODAL_NAME = 'storage_modal',
-    LABEL = '库位';
-
-  it('表格', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME);
-
-    cy.get('#filter_storageName').type('库位');
-    validate('searchName');
-
-    cy.get('#filter_storageName').clear();
-    cy.get('#filter_storageCode').type('code');
-    validate('searchCode');
-
-    cy.get('#filter_storageCode').clear();
-    selectClick('filter_storageType', 1);
-    validate('searchType');
-
-    selectClick('filter_storageType', 0);
-    selectClick('filter_storageState', 1);
-    validate('searchDisabled');
-
-    validateExport();
-  });
-
-  it.only('操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-
-    validateAdd(function () {
-      cy.getTestId('field_storageLocationCode').type('0001');
-      cy.getTestId('field_storageLocationName').type('名称');
-      selectClick('select_storageLocationType', 0);
-      selectClick('select_storageIsNotDisable', 1);
-      selectClick('select_storageIsProduct', 0);
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.getTestId(MODAL_NAME).should('exist').and('be.visible');
-      cy.getTestId(MODAL_NAME).find('h3').should('include.text', '修改库位');
-
-      cy.getTestId('field_storageLocationCode').should('have.value', '0001');
-      cy.getTestId('field_storageLocationName').should('have.value', '1号库位');
-      validateSelect('select_storageLocationType', '原材料库位');
-      validateSelect('select_storageIsNotDisable', '是');
-      validateSelect('select_storageIsProduct', '是');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-  });
-});

+ 0 - 99
cypress/e2e/user.cy.ts

@@ -1,99 +0,0 @@
-import {
-  loginIntercept,
-  loginSetup,
-  menuIntercept,
-  optionsIntercept,
-  selectClick,
-  validateSelect,
-  validateDelete,
-  validatePut,
-  validateTableList,
-  validateTableSearch,
-  successIntercept,
-  intercept,
-  validateExport,
-  exportIntercept,
-  dictionaryIntercept,
-  intoMenu,
-} from './utils';
-
-describe('用户管理', function () {
-  beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
-    loginSetup();
-    optionsIntercept();
-    dictionaryIntercept();
-    intoMenu('系统设置', '用户管理');
-  });
-
-  beforeEach(function () {
-    intercept('/user/getAllUser', function ({reply, url: reqUrl}) {
-      const url = new URL(reqUrl);
-      const search = new URLSearchParams(url.search);
-
-      if (search.has('userName') && search.get('userName').length)
-        return reply({fixture: 'user/nameSearch'});
-      if (search.has('code') && search.get('code').length)
-        return reply({fixture: 'user/codeSearch'});
-
-      if (search.has('id') && search.get('id').length) return reply({fixture: 'user/userInfo'});
-
-      const page = search.get('page');
-      reply({fixture: page === '1' ? 'user/userList1' : 'user/userList2'});
-    });
-    successIntercept('/user/delUser');
-    successIntercept('/user/addUser');
-    successIntercept('/user/updateUser');
-    exportIntercept('/user/userExport');
-  });
-
-  const TABLE_NAME = 'user_table',
-    MODAL_NAME = 'user_add_modal',
-    LABEL = '用户';
-
-  it('用户列表', function () {
-    validateTableList(TABLE_NAME);
-
-    const validate = validateTableSearch(TABLE_NAME);
-    cy.get('.ant-pagination').find('li[title="2"]').click();
-
-    cy.get('input[name="useName"]').type('admin');
-    cy.get('input[name="useCode"]').clear();
-    validate('searchName');
-
-    cy.get('input[name="useName"]').clear();
-    cy.get('input[name="useCode"]').type('1234');
-    validate('searchCode');
-
-    validateExport();
-  });
-
-  it('操作', function () {
-    const {validateAdd, validateEdit} = validatePut(MODAL_NAME, LABEL);
-
-    validateAdd(function () {
-      cy.get('input[name="userName"]').type('name');
-      cy.get('input[name="userPassword"]').type('password');
-      cy.get('input[name="userRealName"]').type('realname');
-      cy.get('input[name="userEmail"]').type('email');
-      cy.get('input[name="userLandline"]').type('userLandline');
-      cy.get('input[name="userPhone"]').type('userPhone');
-      selectClick('select_userDepartment', 0);
-      selectClick('select_userRole', 0);
-    });
-
-    validateEdit(TABLE_NAME, function () {
-      cy.get('input[name="userName"]').should('have.value', '123412');
-      cy.get('input[name="userPassword"]').should('have.value', '44349BD19046F3D527D67A5D0D414B09');
-      cy.get('input[name="userRealName"]').should('have.value', '测试');
-      cy.get('input[name="userEmail"]').should('have.value', '123@adfa.com');
-      cy.get('input[name="userLandline"]').should('have.value', '1231123');
-      cy.get('input[name="userPhone"]').should('have.value', '1532');
-      validateSelect('select_userDepartment', '物流部门');
-      validateSelect('select_userRole', '物流管理员');
-    });
-
-    validateDelete(TABLE_NAME, LABEL);
-  });
-});