test: add data-testid attr (#2167)

This commit is contained in:
被雨水过滤的空气-Rairn 2023-07-03 16:02:26 +08:00 committed by GitHub
parent 21371aaa57
commit 9d2a4834a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,9 @@ export const GeneralSchemaDesigner = (props: any) => {
return {
insertPosition: 'afterEnd',
wrap: rowCtx?.cols?.length > 1 ? undefined : gridRowColWrap,
component: <PlusOutlined style={{ cursor: 'pointer', fontSize: 14 }} />,
component: (
<PlusOutlined data-testid="GeneralSchemaDesigner-Initializer" style={{ cursor: 'pointer', fontSize: 14 }} />
),
};
}, [rowCtx?.cols?.length]);
@ -84,7 +86,7 @@ export const GeneralSchemaDesigner = (props: any) => {
<Space size={2} align={'center'}>
{draggable && (
<DragHandler>
<DragOutlined />
<DragOutlined data-testid="GeneralSchemaDesigner-DragHandler" />
</DragHandler>
)}
{!disableInitializer &&
@ -93,7 +95,15 @@ export const GeneralSchemaDesigner = (props: any) => {
) : (
ctx?.renderSchemaInitializer?.(initializerProps)
))}
<SchemaSettings title={<MenuOutlined style={{ cursor: 'pointer', fontSize: 12 }} />} {...schemaSettingsProps}>
<SchemaSettings
title={
<MenuOutlined
data-testid="GeneralSchemaDesigner-SchemaSettings"
style={{ cursor: 'pointer', fontSize: 12 }}
/>
}
{...schemaSettingsProps}
>
{props.children}
</SchemaSettings>
</Space>