vendor: amis 6.13.0 base (fork root)

This commit is contained in:
2026-06-16 22:14:57 +08:00
commit 8c8e4247a9
3840 changed files with 2467374 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import React from 'react';
import {render, screen} from '@testing-library/react';
import {render as amisRender} from '../../../src';
describe('Table tableFillHeight', () => {
const renderTable = (autoFillHeight = false, rows = [] as any) => {
return render(
amisRender({
type: 'page',
data: {
rows
},
body: {
type: 'table',
autoFillHeight,
source: '${rows}'
}
})
);
};
it('autoFillHeight未开启,table元素高度根据内容撑开', () => {
const {container} = renderTable();
expect(
container.querySelector('.cxd-Table-table--tableFillHeight')
).toBeNull();
});
it('autoFillHeight开启,表格有数据,table元素高度根据内容撑开', () => {
const {container} = renderTable(true, [{id: 1}]);
expect(
container.querySelector('.cxd-Table-table--tableFillHeight')
).toBeNull();
});
it('autoFillHeight开启,表格无数据,table元素高度根据父元素撑开', () => {
const {container} = renderTable(true, []);
expect(
container.querySelector('.cxd-Table-table--tableFillHeight')
).toBeInTheDocument();
});
});