优化
This commit is contained in:
@@ -73,15 +73,13 @@ enableAutoUnmount(afterEach)
|
||||
afterAll(() => vi.unstubAllGlobals())
|
||||
|
||||
describe('ExpressCompaniesView query and table migration', () => {
|
||||
it('renders edit and status as colored outlined buttons with prototype icons', () => {
|
||||
expect(expressCompaniesSource).toContain('size="small"\n plain\n type="primary"')
|
||||
expect(expressCompaniesSource).toContain('size="small"\n plain\n :disabled="loading"\n :type=')
|
||||
expect(expressCompaniesSource).toContain('<Pencil :size="15" />编辑')
|
||||
expect(expressCompaniesSource).toContain('<Power :size="15" />')
|
||||
expect(expressCompaniesSource).not.toContain("access.can('platform:express:edit')\"\n link")
|
||||
expect(expressCompaniesSource).not.toContain("access.can('platform:express:status')\"\n link")
|
||||
it('renders edit and status as shared outlined text buttons', () => {
|
||||
const actions = expressCompaniesSource.slice(expressCompaniesSource.indexOf('<template #actions='), expressCompaniesSource.indexOf('</template>', expressCompaniesSource.indexOf('<template #actions=')))
|
||||
expect(actions.match(/class="density-action"/g)).toHaveLength(2)
|
||||
expect(actions).toContain('>编辑</el-button>')
|
||||
expect(actions).toContain(' :data-tone=')
|
||||
expect(actions).not.toMatch(/<(?:el-dropdown|Pencil|Power|Eye|Trash2|Download|CircleX)\b/)
|
||||
})
|
||||
|
||||
it('keeps operation first and exposes the prototype business columns separately', () => {
|
||||
const actionsIndex = expressCompaniesSource.indexOf("{ key: 'actions', label: '操作'")
|
||||
const nameIndex = expressCompaniesSource.indexOf("{ key: 'company', label: '公司名称'")
|
||||
|
||||
Reference in New Issue
Block a user