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(); }); });