test: 完善 2.3.0 跨平台测试与 CI 稳定性

- 修复 Windows 与 macOS 单元测试环境差异\n- 完善组件、集成与 Electron E2E 测试\n- 修复异步等待、平台路径和环境依赖问题\n- 统一 E2E 窗口尺寸与 Visual 测试策略\n- 提升 GitHub Actions 跨平台 CI 稳定性
This commit is contained in:
Wxw-Gu
2026-09-05 10:38:41 +08:00
parent 60528ffe53
commit 1156362c3c
23 changed files with 123 additions and 119 deletions
@@ -308,6 +308,8 @@ function PersonalWechatMacSendDialog({
<>
<Dialog open onOpenChange={(open) => !open && handleClose()}>
<DialogContent
aria-label={displayName}
aria-labelledby={undefined}
className="personal-wechat-send-dialog max-h-[calc(100vh-2rem)] max-w-[720px] gap-0 overflow-y-auto p-0"
onOpenAutoFocus={() => {
restoreFocusRef.current =
@@ -170,6 +170,8 @@ export function PersonalWechatWindowsSendDialog({
return (
<Dialog open onOpenChange={(open) => !open && handleClose()}>
<DialogContent
aria-label={displayName}
aria-labelledby={undefined}
className="personal-wechat-send-dialog max-h-[calc(100vh-2rem)] max-w-[620px] gap-4 overflow-y-auto p-[22px]"
onOpenAutoFocus={() => {
restoreFocusRef.current =
@@ -65,12 +65,12 @@ export function ReportViewer({
const viewportRef = useRef<HTMLDivElement>(null)
useEffect(() => {
setSendDialogOpen(false)
const frame = window.requestAnimationFrame(() => {
setStatus('')
setImageError('')
setIsSwitchingTemplate(false)
setShareDialogOpen(false)
setSendDialogOpen(false)
setZoom(1)
setFitZoom(1)
setNaturalSize(null)
@@ -224,7 +224,7 @@ function ScheduledReportDialog({
React.useEffect(() => {
if (!open) return
setKeyword('')
setSelectedId(task?.target || task?.group || groups[0]?.md5 || '')
setSelectedId(task?.target || task?.group || '')
setName(task?.name || '')
setScheduleTime(task?.scheduleTime || '09:00')
const persistedRange = task?.reportRange
@@ -236,7 +236,13 @@ function ScheduledReportDialog({
setRangeMessages([])
setMemberCount(null)
setMemberCountAvailable(true)
}, [groups, open, task])
}, [open, task])
React.useEffect(() => {
if (open && !selectedId && groups[0]) {
setSelectedId(groups[0].md5)
}
}, [groups, open, selectedId])
React.useEffect(() => {
if (!open || !selected) return
+11 -1
View File
@@ -10,9 +10,16 @@
--border-color: #dcdcdc;
}
html {
width: 100%;
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
min-width: 0;
font-family: var(--wxex-font);
background-color: var(--wxex-bg-app);
color: var(--wxex-text-primary);
@@ -21,7 +28,10 @@ body {
}
#root {
width: 100%;
height: 100%;
min-width: 0;
flex: 1 1 auto;
display: flex;
}
@@ -368,4 +378,4 @@ body {
min-width: 0;
align-items: stretch;
overflow: hidden;
}
}