Skip to content

test(at): add eye protection mode AT suite for accessible name coverage - #471

Draft
pengfeixx wants to merge 1 commit into
masterfrom
agent/at-bot/a49eb2f1682e
Draft

pengfeixx wants to merge 1 commit into
masterfrom
agent/at-bot/a49eb2f1682e

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

变更范围

Commit fc7177a 为护眼模式按钮(RoundColorWidget)新增 setAccessibleName(eye_0..eye_3),改变 AT-SPI 属性,无 tests/at/ 用例变化。

影响分析

  • 变更文件: reader/eyeprotection/EyeProtectionAction.cpp (+3/-0)
  • 受影响功能: F-001 护眼模式按钮 AT-SPI 可定位性
  • 行为点: B-001~B-005(4 个按钮可定位 + 模式切换后应用响应)
  • 证据: reader/eyeprotection/EyeProtectionAction.cpp:65

覆盖判定

  • covered: 0
  • uncovered: 5(全部为新缺口)
  • 新增用例: suite_eye_protection → 护眼模式/护眼模式.suite.yaml

新增产物

文件 说明
tests/at/yaml/护眼模式/护眼模式.suite.yaml 护眼模式 4 按钮可定位与切换 suite
tests/at/yaml/elements.yaml 新增 eye_0~eye_3 元素
tests/at/cases_mapped.yaml 新增 suite_eye_protection 映射用例
tests/at/suite-cases.yaml 新增 suite_eye_protection normalized 用例
tests/at/impact/impact-fc7177af.yaml 影响分析
tests/at/impact/coverage-gap-fc7177af.yaml 覆盖缺口

门禁结果

  • Gate 5 (Semantic Safety): PASS
  • Gate 4 (Generation): 0 errors for new suite(pre-existing errors in other suites unchanged)

环境

  • 环境: headless(无桌面,未执行运行时验证)
  • 应用来源: built-from-commit fc7177a
  • version_match: true

关联

  • Issue: V-10079
  • Commit: fc7177a
  • PMS: TASK-399111

Summary by Sourcery

Add automated accessibility coverage for locating and switching among the four eye-protection modes.

New Features:

  • Add an active accessibility test suite that locates and selects all four eye-protection modes, then checks that the document view remains available.

Tests:

  • Register the eye-protection suite and its four push-button accessibility elements in the AT test mappings and normalized cases.
  • Add impact and coverage-gap records for the eye-protection accessibility behaviors.

Commit fc7177a added setAccessibleName(eye_0..eye_3) to RoundColorWidget
buttons in EyeProtectionAction. This new AT suite verifies the buttons
are locatable via AT-SPI accessible name and that clicking each button
switches the eye protection mode.

- New suite: tests/at/yaml/护眼模式/护眼模式.suite.yaml
- New elements: eye_0, eye_1, eye_2, eye_3 in elements.yaml
- New case in cases_mapped.yaml and suite-cases.yaml
- Impact analysis: tests/at/impact/impact-fc7177af.yaml
- Coverage gap: tests/at/impact/coverage-gap-fc7177af.yaml

Gate 5: PASS | Gate 4: 0 errors for new suite (pre-existing errors in
other suites unchanged)

Log: 补充护眼模式按钮 AT-SPI 可定位性测试用例
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pengfeixx

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 Dec 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Register the four eye-protection button accessible names and roles so the AT suites can refer to them consistently.

  • tests/at/yaml/elements.yaml L170-181

Tests

Record the affected behaviors and uncovered coverage gap that motivate the new eye-protection test.

  • tests/at/impact/coverage-gap-fc7177af.yaml L1-46
  • tests/at/impact/impact-fc7177af.yaml L1-56

Add the executable suite and its mapped and normalized case representations to check button discovery, mode switching, and application responsiveness.

  • tests/at/cases_mapped.yaml L905-974
  • tests/at/suite-cases.yaml L635-707
  • tests/at/yaml/护眼模式/护眼模式.suite.yaml L1-55

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

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