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