diff --git a/src/page/Order/Create/__snapshots__/index.test.tsx.snap b/src/page/Order/Create/__snapshots__/index.test.tsx.snap
index e711fd89..77de5bc2 100644
--- a/src/page/Order/Create/__snapshots__/index.test.tsx.snap
+++ b/src/page/Order/Create/__snapshots__/index.test.tsx.snap
@@ -114,12 +114,17 @@ exports[`Order/Create should audit sql when user click audit button 1`] = `
@@ -2316,12 +2321,17 @@ exports[`Order/Create should render page header 1`] = `
diff --git a/src/page/Order/Create/index.test.tsx b/src/page/Order/Create/index.test.tsx
index ea1d92d4..d49e08a8 100644
--- a/src/page/Order/Create/index.test.tsx
+++ b/src/page/Order/Create/index.test.tsx
@@ -22,6 +22,8 @@ import {
taskSqls,
} from '../Detail/__testData__';
+const orderDescMaxLength = 50;
+
describe('Order/Create', () => {
beforeEach(() => {
jest.useFakeTimers();
@@ -140,7 +142,11 @@ describe('Order/Create', () => {
target: { value: 'orderName' },
});
fireEvent.input(screen.getByLabelText('order.baseInfo.describe'), {
- target: { value: 'order describe' },
+ target: {
+ value: Array.from({ length: orderDescMaxLength + 1 }, () => 'e').join(
+ ''
+ ),
+ },
});
fireEvent.mouseDown(screen.getByLabelText('order.sqlInfo.instanceName'));
@@ -197,7 +203,7 @@ describe('Order/Create', () => {
'ant-btn-loading'
);
expect(createOrderSpy).toBeCalledWith({
- desc: 'order describe',
+ desc: Array.from({ length: orderDescMaxLength }, () => 'e').join(''),
task_id: String(taskInfo.task_id),
workflow_subject: 'orderName',
});
diff --git a/src/page/Order/Create/index.tsx b/src/page/Order/Create/index.tsx
index 92da2297..ed1134b5 100644
--- a/src/page/Order/Create/index.tsx
+++ b/src/page/Order/Create/index.tsx
@@ -183,6 +183,8 @@ const CreateOrder = () => {
placeholder={t('common.form.placeholder.input', {
name: t('order.baseInfo.describe'),
})}
+ maxLength={50}
+ showCount
/>