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