mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:28:37 +08:00
43 lines
947 B
TypeScript
43 lines
947 B
TypeScript
import React = require('react');
|
|
import {render} from '@testing-library/react';
|
|
import '../../src';
|
|
import {render as amisRender} from '../../src';
|
|
import {makeEnv} from '../helper';
|
|
|
|
test('Renderer:tesks', () => {
|
|
const {container} = render(
|
|
amisRender(
|
|
{
|
|
type: 'page',
|
|
body: {
|
|
type: 'tasks',
|
|
name: 'tasks',
|
|
items: [
|
|
{
|
|
label: 'hive 任务',
|
|
key: 'hive',
|
|
status: 4,
|
|
remark:
|
|
'查看详情<a target="_blank" href="http://www.baidu.com">日志</a>。'
|
|
},
|
|
{
|
|
label: '小流量',
|
|
key: 'partial',
|
|
status: 4
|
|
},
|
|
{
|
|
label: '全量',
|
|
key: 'full',
|
|
status: 4
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{},
|
|
makeEnv({})
|
|
)
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|