mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
54 lines
1.0 KiB
TypeScript
54 lines
1.0 KiB
TypeScript
|
import React = require('react');
|
||
|
import {render} from '@testing-library/react';
|
||
|
import '../../src/themes/default';
|
||
|
import {render as amisRender} from '../../src/index';
|
||
|
import {makeEnv} from '../helper';
|
||
|
|
||
|
test('Renderer:status', () => {
|
||
|
const {container} = render(
|
||
|
amisRender(
|
||
|
{
|
||
|
type: 'page',
|
||
|
body: [
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 0
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 1
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'success'
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'pending'
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'fail'
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'fail'
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'queue'
|
||
|
},
|
||
|
{
|
||
|
type: 'status',
|
||
|
value: 'schedule'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{},
|
||
|
makeEnv({})
|
||
|
)
|
||
|
);
|
||
|
|
||
|
expect(container).toMatchSnapshot();
|
||
|
});
|