Skip to content

test(at): fix editor find and replace AT selectors - #515

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
dengzhongyuan365-dev:master
Aug 12, 2026
Merged

test(at): fix editor find and replace AT selectors#515
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
dengzhongyuan365-dev:master

Conversation

@dengzhongyuan365-dev

@dengzhongyuan365-dev dengzhongyuan365-dev commented Aug 12, 2026

Copy link
Copy Markdown
Member

Update unstable find and replace selectors for generated AT suites.

修复文本编辑器 AT 用例中查找和替换控件 selector 不稳定问题。

Log: 修复文本编辑器 AT 查找替换用例 selector

Influence: 修复后远程干净环境 AT 用例 31 条全部通过。

Summary by Sourcery

Stabilize automated test suites for the text editor’s find-and-replace feature by updating element mappings and suite definitions for multiple v25_2500 AT modules.

Tests:

  • Adjust AT element selector mappings for text editor find-and-replace controls to avoid instability in generated suites.
  • Regenerate or update AT suite YAML definitions and case mappings so all related text editor AT cases pass consistently in clean remote environments.

Update unstable find and replace selectors for generated AT suites.

修复文本编辑器 AT 用例中查找和替换控件 selector 不稳定问题。

Log: 修复文本编辑器 AT 查找替换用例 selector

Influence: 修复后远程干净环境 AT 用例 31 条全部通过。

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @dengzhongyuan365-dev, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates unstable AT selectors for the text editor Find & Replace feature across three v25_2500 modules so that generated suites use stable locators and all 31 AT cases pass in a clean remote environment.

File-Level Changes

Change Details Files
Stabilized text editor Find & Replace selectors and aligned generated AT suites with the new element definitions.
  • Updated element locator definitions used by the text editor Find & Replace AT cases to use more stable selectors.
  • Synced suite YAML definitions so that generated AT suites reference the updated element keys and structures.
  • Regenerated or updated cases_mapped metadata to keep case-to-suite and element mappings consistent with the new selectors across the affected modules (110607, 114347, 114343).
tests/at/modules/v25_2500_…_110607/cases_mapped.yaml
tests/at/modules/v25_2500_…_110607/yaml/_V25_2500…(#110607).suite.yaml
tests/at/modules/v25_2500_…_110607/yaml/elements.yaml
tests/at/modules/v25_2500_…_114347/cases_mapped.yaml
tests/at/modules/v25_2500_…_114347/yaml/_V25_2500…(#114347).suite.yaml
tests/at/modules/v25_2500_…_114343/cases_mapped.yaml
tests/at/modules/v25_2500_…_114343/yaml/_V25_2500…(#114343).suite.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码实现了文本编辑器自动化测试用例的UI元素定位修正与用例描述优化,质量优秀
逻辑正确且无任何安全风险,完全符合满分标准

■ 【详细分析】

  • 1.语法逻辑正确✓

YAML格式缩进规范,键值对结构完整,测试步骤的先后顺序(如输入、撤销、重做、验证)符合业务逻辑,无任何语法或逻辑错误
建议:继续保持当前规范的YAML编写习惯

  • 2.代码质量良好✓

将大量重复且无意义的套件名称“打开文本编辑器”修改为具体测试点名称,极大提升了用例可读性与维护性;针对主菜单焦点问题增加了Ctrl+F与Escape的前置收敛步骤,增强了自动化测试的稳定性;补充了格式范例注释,有助于团队协作
建议:无

  • 3.代码性能无性能问题✓

本次修改全部为静态YAML配置文件,不涉及运行时算法、内存分配或系统调用,不存在性能瓶颈
建议:无

  • 4.代码安全存在0个安全漏洞✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
纯声明式UI自动化测试脚本,不包含动态代码执行、命令拼接、敏感信息存储等风险操作,整体安全性极高

  • 建议:无需进行安全修复

■ 【改进建议代码示例】

# 当前代码已足够优秀,无需额外修复,以下展示其中一个优化后的用例结构作为标准范例参考
- id: case_1592739_s1
  name: 重做
  description: ''
  tags: []
  steps:
  - action: keyboard_type
    text: redo workspace text
  - action: keyboard_hot_key
    key: ctrl+z
  - action: keyboard_hot_key
    key: ctrl+y
  - action: keyboard_hot_key
    key: ctrl+f
  assert_steps:
  - action: assert_element
    selector:
      name: 查找

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dengzhongyuan365-dev, lzwind

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dengzhongyuan365-dev

Copy link
Copy Markdown
Member Author

/merge

@deepin-bot
deepin-bot Bot merged commit 6b352e6 into linuxdeepin:master Aug 12, 2026
20 checks passed
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