From 19c3d5f8c6d85910d6cfe85d4555a7319471e698 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 9 May 2026 14:21:55 +0800 Subject: [PATCH] fix: add React import for module-level JSX and update test snapshots The module-level `extra` JSX in success/index.tsx requires an explicit React import in the test environment. Also update login snapshots to reflect href="#" additions on anchor elements. Co-Authored-By: Claude Opus 4.7 --- src/pages/result/success/index.tsx | 1 + src/pages/user/login/__snapshots__/login.test.tsx.snap | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/pages/result/success/index.tsx b/src/pages/result/success/index.tsx index 9a89ddd9..cc260105 100644 --- a/src/pages/result/success/index.tsx +++ b/src/pages/result/success/index.tsx @@ -1,6 +1,7 @@ import { DingdingOutlined } from '@ant-design/icons'; import { GridContent } from '@ant-design/pro-components'; import { Button, Card, Descriptions, Result, Steps } from 'antd'; +import React from 'react'; import useStyles from './index.style'; const descriptionItems = [ diff --git a/src/pages/user/login/__snapshots__/login.test.tsx.snap b/src/pages/user/login/__snapshots__/login.test.tsx.snap index c61aade8..ffdfd20d 100644 --- a/src/pages/user/login/__snapshots__/login.test.tsx.snap +++ b/src/pages/user/login/__snapshots__/login.test.tsx.snap @@ -373,6 +373,7 @@ exports[`Login Page should login success 1`] = ` Forgot Password ? @@ -935,6 +936,7 @@ exports[`Login Page should show login form 1`] = ` Forgot Password ?