Skip to content

Test/shared-update #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: pnpm-update
Choose a base branch
from
Open

Test/shared-update #627

wants to merge 28 commits into from

Conversation

LZS911
Copy link
Collaborator

@LZS911 LZS911 commented Apr 8, 2025

basefrom #620

修复内容

锁定 antd/cssinjs 依赖版本,解决了 antd 样式哈希值不稳定导致的快照测试不通过问题

应该和这个依赖没啥关系,这个 hash 值的生成应该也是根据具体的 css 内容计算出来的,如果对应的组件的 css 发生变化了,那这个值就会变,看起来是没法固定了。

测试优化(packages/shared)

快照测试优化

  1. 整合单元测试渲染工具,统一使用 superRender 进行组件渲染

  2. 设置 hashed:false 静态配置,移除 antd css dev hash
    ,用于消除快照中的动态样式标识符,减少无意义的快照差异

测试用例优化

重写了部分组件的单元测试,重写内容如下:

  1. 优化测试用例断言方式
    减少使用全页面快照匹配,更多采用 DOM 节点断言

  2. 优化部分测试用例名称和描述

LZS911 and others added 17 commits March 19, 2025 17:47
[fix]: select latest created tag when multiple tags exist [skip ci]
[chore](cli): adjust code according to api-client changes
[fix](DataSource): Unable to select after resetting the project form field
[feature](sqle/DataSOurceComparison) add height property to enable virtual scrolling
@actiontech-bot actiontech-bot requested review from Rain-1214 and removed request for Rain-1214 April 8, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants