123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import {
- beforeSetup,
- generateNetworkResult,
- intercept,
- intoMenu,
- successIntercept,
- tableBtnClick,
- validateDialog,
- validateMessageContent,
- validatePut,
- validateTableList,
- validateTableSearch,
- } from './utils';
- const basicData = {
- id: '1',
- station: 'ZK-15',
- type: '1',
- modifyUser: 'yunwei',
- modifyTime: '2023-06-08 14:49:37',
- page: 0,
- limit: 0,
- editType: null,
- };
- const options = [
- {
- id: '1',
- station: 'ZK-16及内侧线体共用',
- type: null,
- modifyUser: null,
- modifyTime: null,
- page: 0,
- limit: 0,
- editType: null,
- },
- {
- id: '2',
- station: 'ZK-15',
- type: null,
- modifyUser: null,
- modifyTime: null,
- page: 0,
- limit: 0,
- editType: null,
- },
- ];
- describe('agv', function() {
- beforeEach(function() {
- beforeSetup();
- intoMenu('出库管理', 'AGV管理');
- });
- beforeEach(function() {
- successIntercept(['/agv/editAgv']);
- intercept('/agv/getAgvStation', function({reply, search}) {
- generateNetworkResult({search, reply, basicData, title: 'station'});
- });
- intercept('/agv/getAgvPoint', function({reply}) {
- reply({
- body: {
- msg: '200',
- data: options,
- },
- });
- });
- });
- it('table', function() {
- validateTableList('agv_table');
- validateTableSearch(
- 'agv_table',
- [
- {type: 'select', id: 'type', value: '0'},
- {type: 'select', id: 'station', value: 'ZK-16及内侧线体共用'},
- ],
- {toolId: 'agv_filter', url: '/agv/getAgvStation'},
- );
- });
- it('options', function() {
- const {validateAdd} = validatePut(
- 'agv_modal',
- 'agv_table',
- {
- label: '调度任务',
- },
- );
- validateAdd([{id: 'station', type: 'select'}]);
- tableBtnClick('agv_table', 0);
- validateDialog('确认收货', '你确定此任务已收货吗?', {confirm: true});
- validateMessageContent('已确认收货');
- });
- });
|