优化
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import ElementPlus from 'element-plus'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { createPinia, setActivePinia } from 'pinia'
|
||||
import { enableAutoUnmount, flushPromises, mount } from '@vue/test-utils'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
@@ -83,7 +85,8 @@ describe('InboundFeePanel', () => {
|
||||
expect(document.body.textContent).toContain('¥8.50 / KG')
|
||||
expect(document.body.textContent).toContain('RULE-FBA-KG · V3')
|
||||
expect(document.body.textContent).toContain('RATE-LAX · V5')
|
||||
expect(document.body.textContent).toContain('发布给客户')
|
||||
expect(document.body.textContent).toContain('时间记录')
|
||||
expect(document.body.textContent).toContain('发布')
|
||||
expect(document.body.textContent).not.toContain('重新试算')
|
||||
expect(document.body.textContent).not.toContain('发送费用')
|
||||
})
|
||||
@@ -220,6 +223,15 @@ describe('InboundFeePanel', () => {
|
||||
expect(wrapper.emitted('changed')?.[0]?.[0]).toMatchObject({ feeVersion: 3 })
|
||||
})
|
||||
|
||||
it('keeps adjustment units on one line in a three-column desktop layout', () => {
|
||||
const source = readFileSync(resolve('src/modules/inbounds/fee/InboundFeePanel.vue'), 'utf8')
|
||||
|
||||
expect(source).toContain('width="min(760px, calc(100vw - 28px))"')
|
||||
expect(source).toContain('grid-template-columns: repeat(3, minmax(0, 1fr))')
|
||||
expect(source).toContain('class="adjustment-unit"')
|
||||
expect(source).toContain('white-space: nowrap')
|
||||
})
|
||||
|
||||
it('refreshes the latest snapshot after a conflict while retaining the dialog', async () => {
|
||||
vi.mocked(adjustPublishedInboundFee).mockRejectedValue(
|
||||
new ApiResponseError('费用已被其他操作员修改,请刷新后重试', 'A0409', 409),
|
||||
|
||||
Reference in New Issue
Block a user