This commit is contained in:
2026-08-10 16:24:54 +08:00
parent e119b48662
commit 820432a381
52 changed files with 1015 additions and 705 deletions
@@ -86,4 +86,25 @@ describe('CarrierRatesView price-book source contract', () => {
expect(queryToolbarSource).toContain('flex-wrap: wrap')
expect(source).toContain('@media (max-width: 720px)')
})
it('keeps upload actions in the table toolbar instead of the query toolbar', () => {
const queryToolbarEnd = source.indexOf('/>', source.indexOf('<QueryToolbar'))
const queryToolbarBlock = source.slice(source.indexOf('<QueryToolbar'), queryToolbarEnd + 2)
expect(queryToolbarBlock).not.toContain('#actions')
expect(source).toContain('<template #toolbar-actions><el-button v-if="canEdit" type="primary" @click="openUpload">')
expect(source).not.toContain('#toolbar-start')
expect(source).toContain('<template #pagination-left>共 {{ rows.length }} 个版本')
})
it('keeps list spacing and error state mutually exclusive', () => {
expect(source).toContain('<template v-if="loadError" #state>')
expect(source).toContain('<section v-if="!loadError" class="surface-panel table-panel"')
expect(source).not.toContain('<template #state>')
})
it('keeps both row actions directly visible without a premature more menu', () => {
expect(source).toContain('<Eye :size="15" />{{ detailActionLabel')
expect(source).toContain('<Download :size="15" />原文件')
expect(source).not.toContain('MoreHorizontal')
})
})