优化
This commit is contained in:
@@ -117,7 +117,7 @@ describe('PalletsView', () => {
|
||||
vi.mocked(createPlatformPallet).mockReset().mockResolvedValue('20002')
|
||||
})
|
||||
|
||||
it('starts with all warehouse candidates for querying using compact filters', async () => {
|
||||
it('starts with enabled domestic warehouse candidates for querying using compact filters', async () => {
|
||||
const wrapper = await mountView()
|
||||
const toolbar = wrapper.findComponent(QueryToolbar)
|
||||
const fields = toolbar.props('fields')
|
||||
@@ -132,8 +132,6 @@ describe('PalletsView', () => {
|
||||
expect(fields.find((field) => field.key === 'warehouseId')?.placeholder).toBe('全部仓库')
|
||||
expect(fields.find((field) => field.key === 'warehouseId')?.options).toEqual([
|
||||
{ label: '义乌收货仓(CN-YW-01)', value: '19001' },
|
||||
{ label: 'ONT8 FBA 仓(FBA-ONT8)', value: '19002' },
|
||||
{ label: '洛杉矶海外仓(US-LAX-01)', value: '19003' },
|
||||
])
|
||||
expect(listAllPlatformWarehouses).toHaveBeenCalledWith()
|
||||
expect(listPlatformPallets).toHaveBeenCalledWith({
|
||||
@@ -205,8 +203,6 @@ describe('PalletsView', () => {
|
||||
expect(listAllPlatformWarehouses).toHaveBeenCalledTimes(1)
|
||||
expect(warehouseField?.options).toEqual([
|
||||
{ label: '义乌收货仓(CN-YW-01)', value: '19001' },
|
||||
{ label: 'ONT8 FBA 仓(FBA-ONT8)', value: '19002' },
|
||||
{ label: '洛杉矶海外仓(US-LAX-01)', value: '19003' },
|
||||
])
|
||||
})
|
||||
|
||||
@@ -256,7 +252,7 @@ describe('PalletsView', () => {
|
||||
await saveButton?.trigger('click')
|
||||
await flushPromises()
|
||||
|
||||
expect(createPlatformPallet).toHaveBeenCalledWith(0, {
|
||||
expect(createPlatformPallet).toHaveBeenCalledWith({
|
||||
warehouseId: 19001, palletType: '塑料托盘', capacityCbm: 1.5, weightKg: 10, color: '黑色', remark: '标准托盘',
|
||||
})
|
||||
})
|
||||
@@ -322,7 +318,7 @@ describe('PalletsView', () => {
|
||||
await viewButton?.trigger('click')
|
||||
await flushPromises()
|
||||
|
||||
expect(getPlatformPallet).toHaveBeenCalledWith(0, 19001, '20001')
|
||||
expect(getPlatformPallet).toHaveBeenCalledWith(19001, '20001')
|
||||
expect(document.body.textContent).toContain('资源作用域')
|
||||
expect(document.body.textContent).toContain('平台公共资源')
|
||||
expect(document.body.textContent).not.toContain('所属企业')
|
||||
|
||||
Reference in New Issue
Block a user