@@ -366,32 +318,8 @@ exports[`Test Modal Component Should support banner Should match snapshot for re
-
test
diff --git a/src/modal/__tests__/modal.test.tsx b/src/modal/__tests__/modal.test.tsx
index 135d9ee0a..6b44c52eb 100644
--- a/src/modal/__tests__/modal.test.tsx
+++ b/src/modal/__tests__/modal.test.tsx
@@ -162,6 +162,26 @@ describe('Test Modal Component', () => {
expect(asFragment()).toMatchSnapshot();
});
+ it('Should render Spin correct', () => {
+ const { container } = render(
+
+ test
+
+ );
+ const spin = modal.query(container)!.querySelector
('.ant-spin-blur')!;
+ expect(spin).toBeTruthy();
+ });
+
+ it('Should render no Spin correct', () => {
+ const { container } = render(
+
+ test
+
+ );
+ const spin = modal.query(container)!.querySelector('.ant-spin-blur')!;
+ expect(spin).toBeFalsy();
+ });
+
it('Should call onRectChange for resizable modal', () => {
const onRectChange = jest.fn();
const { container } = render(
diff --git a/src/modal/modal.tsx b/src/modal/modal.tsx
index b93e5c884..2fe8c3b86 100644
--- a/src/modal/modal.tsx
+++ b/src/modal/modal.tsx
@@ -42,7 +42,7 @@ export default function InternalModal({
position,
resizable = false,
rect,
- loading,
+ loading = false,
onRectChange,
onPositionChange,
modalRender,