Skip to content

test: add V6.6 AT-SPI test suites for find count display and markdown… - #582

Open
JWWTSL wants to merge 1 commit into
linuxdeepin:masterfrom
JWWTSL:master
Open

JWWTSL wants to merge 1 commit into
linuxdeepin:masterfrom
JWWTSL:master

Conversation

@JWWTSL

@JWWTSL JWWTSL commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

… rendering

Add 32 test cases (22 active, 10 unsupported) covering two V6.6 features:

  • Find result index/total display (7 active suites, all PASS)
  • Markdown document rendering (15 active suites, all PASS)

Also add missing accessible names for AT-SPI element discovery:

  • MatchCountLabel in linebar.cpp
  • MarkdownView in markdownview.cpp
  • ViewModeContextMenu in dtextedit.cpp
  • HighlightMenu in bottombar.cpp

Update expected_names.yaml with 7 new element entries.

Flaky cases (md-009/md-010 consecutive right-click timing) removed from suite and marked manual with reason in standard/mapped yaml.

Verification: youqu at run 22/22 specs PASS (find-count 7/7, markdown-render 15/15)

Summary by Sourcery

Expand V6.6 accessibility test coverage for find results and Markdown rendering while improving UI element discoverability.

Enhancements:

  • Add accessible names to find-count, Markdown, view-mode, and highlight-menu UI elements to support AT-SPI discovery.

Tests:

  • Add AT-SPI coverage for V6.6 find-result count displays and Markdown rendering, with passing active suites and documented unsupported or flaky cases.

Chores:

  • Update AT-SPI expected element names and mark timing-sensitive cases for manual verification.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JWWTSL

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

@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR adds V6.6 AT-SPI test specifications and executable suites for find-result counting and Markdown workflows, marks unsupported or flaky cases with explicit reasons, and adds the accessible names and element metadata required to discover the tested controls.

File-Level Changes

Change Details Files
Add AT-SPI coverage for V6.6 find-result counting and Markdown rendering workflows.
  • Add standard cases and generated mappings for find index/total updates, replacement behavior, Markdown mode switching, source editing, and unsupported visual/performance checks.
  • Add executable find-count and markdown-render suites, with 22 active scenarios reported passing and md-009/md-010 retained as unsupported due to DDropdownMenu geometry and timing instability.
  • Document manual/unsupported reasons for performance, visual rendering, scrolling, layout, and flaky menu interactions.
tests/at/v6.6/cases_standard.yaml
tests/at/v6.6/cases_mapped.yaml
tests/at/v6.6/yaml/find-count/find-count/find-count.suite.yaml
tests/at/v6.6/yaml/markdown-render/markdown-render/markdown-render.suite.yaml
Expose stable accessible names for newly exercised UI elements.
  • Name the find match-count label for AT-SPI discovery.
  • Name the Markdown preview widget.
  • Name the context-menu view-mode submenu.
  • Name the syntax highlight menu.
src/controls/linebar.cpp
src/editor/markdown/markdownview.cpp
src/editor/dtextedit.cpp
src/widgets/bottombar.cpp
Synchronize accessibility expectations and element maps with the new test targets.
  • Add expected role/name metadata for MatchCountLabel, MarkdownView, ViewModeContextMenu, HighlightMenu, and related menu controls.
  • Add shared and per-suite element maps used by the V6.6 test authoring and execution layers.
test/at/spi/expected_names.yaml
tests/at/v6.6/element-map.yaml
tests/at/v6.6/yaml/elements.yaml
tests/at/v6.6/yaml/find-count/elements.yaml
tests/at/v6.6/yaml/markdown-render/elements.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

@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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/at/v6.6/cases_mapped.yaml" line_range="342" />
<code_context>
+    reason: 性能/资源-大文件查找耗时
+
+  # ============================================================
+  # 模块二:Markdown 文档渲染(24 例,12 active + 12 unsupported)
+  # ============================================================
+
+  - id: v6.6-md-001
+    name: 新建文件_纯文本不渲染
</code_context>
<issue_to_address>
**nitpick:** The generated file comments state that the Markdown module has 24 cases with 12 active and 12 unsupported, but the file contains 24 Markdown IDs with 15 active and 9 unsupported; the overall comments also describe counts inconsistent with the actual contents. Reports or tooling that rely on these stated counts are incorrect.

**Suggested fix:** Regenerate or correct the case-count comments to match the actual case statuses.

```suggestion
  # 模块二:Markdown 文档渲染(24 例,15 active + 9 unsupported)
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread tests/at/v6.6/cases_mapped.yaml Outdated
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值。本次 PR 为 V6.6 AT-SPI 测试套件新增,包含 4 个 C++ 源文件的 setAccessibleName() 调用和 9 个 YAML 测试文件。源码改动简洁明确,与 commit 目的一致,未发现语法逻辑错误、代码质量问题、性能问题或安全漏洞。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 代码语法正确,逻辑清晰。4个C++文件均正确调用 setAccessibleName(),该方法是 QWidget 的标准接口,QLabel、DMenu、QWebEngineView、DDropdownMenu 均继承自 QWidget,方法可用。对象在调用前已完成创建,无空指针风险。YAML 测试文件语法正确,结构完整。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 代码结构清晰,注释完整。新增的 setAccessibleName() 调用位置合理,紧接对象创建语句之后。YAML 测试文件包含完整的 metadata、annotation、steps 和 assert 定义,文档化程度高。无重复代码,无残留调试信息。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 性能良好,资源使用合理。setAccessibleName() 是 Qt 的轻量级属性设置方法,仅设置内部字符串属性,无性能影响。无频繁系统调用,无资源泄漏。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 无安全风险,代码安全合规。本次变更不涉及用户输入处理、网络通信、文件操作或敏感数据处理。accessible name 均为静态字符串字面量,无注入风险。markdownview.cpp 中已有的 URL scheme 白名单安全机制(仅放行 http/https)未受本次变更影响。


💡 改进建议代码示例

// 本次变更无需修复代码示例
// 所有变更均为标准的 setAccessibleName() 调用,语法正确,实现合理
// 示例变更(src/controls/linebar.cpp 第36行):
// m_matchCountLabel->setAccessibleName("MatchCountLabel");
// 该调用为 Qt 无障碍API标准用法,无需修改

本报告由 AI 代码审查工具自动生成

@JWWTSL
JWWTSL force-pushed the master branch 2 times, most recently from 39db968 to c9d92a5 Compare September 11, 2026 03:31
Add missing setAccessibleName for AT-SPI test element location:
- MatchCountLabel in linebar.cpp (find result count label)
- MarkdownView in markdownview.cpp (markdown render view)
- ViewModeContextMenu in dtextedit.cpp (right-click view mode submenu)
- HighlightMenu in bottombar.cpp (syntax highlight dropdown)

The V6.6 AT test suites (22 cases: find count 7 + markdown render 15)
are maintained in the app-test-v25 repository (tests/at/yaml/查找计数,
tests/at/yaml/Markdown渲染) and verified 22/22 PASS via youqu at run.
@deepin-bot

deepin-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 6.6.3
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #594

@deepin-bot

deepin-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 6.6.4
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #596

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.

2 participants