From 493773ffd89e7098dd4c5087fb84c881aaa82e9d Mon Sep 17 00:00:00 2001 From: re2zero Date: Mon, 3 Aug 2026 13:42:59 +0800 Subject: [PATCH] test(at): fix AT-SPI yaml suites, 14/14 smoke pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix assert element role predicates (framework: dogtail roleName) - fix context menu navigation via AT-SPI focus events fallback - scale menu: use arrow button popup (popup: click) with real item nav - dedup theme menu suite (keep items-style v2) - tab suite: locate page tab by role without hidden parent - add accessible names for BrowserMenu and find search edit Log: fix AT-SPI yaml suites, 14/14 smoke pass PMS: 无 --- reader/browser/BrowserMenu.cpp | 3 +- reader/uiframe/TitleWidget.cpp | 3 +- reader/widgets/FindWidget.cpp | 4 +- tests/at/at-tree.yaml | 8 + tests/at/cases_mapped.yaml | 518 ++++++------------ tests/at/suite-cases.yaml | 104 +--- tests/at/yaml/elements.yaml | 66 +-- ...41\243\346\211\223\345\274\200.suite.yaml" | 4 +- ...55\276\350\217\234\345\215\225.suite.yaml" | 49 +- ...07\212\350\217\234\345\215\225.suite.yaml" | 57 +- ...37\237\350\217\234\345\215\225.suite.yaml" | 100 +++- ...37\237\350\217\234\345\215\225.suite.yaml" | 43 +- ...55\276\350\247\206\345\233\276.suite.yaml" | 16 +- ...22\256\345\210\207\346\215\242.suite.yaml" | 23 +- ...75\225\350\247\206\345\233\276.suite.yaml" | 20 +- ...33\276\350\247\206\345\233\276.suite.yaml" | 14 +- ...70\273\350\217\234\345\215\225.suite.yaml" | 35 +- ...42\230\350\217\234\345\215\225.suite.yaml" | 15 +- ...20\234\347\264\242\346\241\206.suite.yaml" | 27 +- ...76\223\345\205\245\346\241\206.suite.yaml" | 4 +- ...55\276\351\241\265\346\240\217.suite.yaml" | 21 +- 21 files changed, 528 insertions(+), 606 deletions(-) diff --git a/reader/browser/BrowserMenu.cpp b/reader/browser/BrowserMenu.cpp index 17fd66c57..cbee63479 100644 --- a/reader/browser/BrowserMenu.cpp +++ b/reader/browser/BrowserMenu.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -16,6 +16,7 @@ BrowserMenu::BrowserMenu(QWidget *parent) : DMenu(parent) { qCDebug(appLog) << "BrowserMenu created"; + setAccessibleName("Menu_Browser"); DFontSizeManager::instance()->bind(this, DFontSizeManager::T6); qCDebug(appLog) << "BrowserMenu::BrowserMenu() - Constructor completed"; } diff --git a/reader/uiframe/TitleWidget.cpp b/reader/uiframe/TitleWidget.cpp index a0d086955..35d4c0465 100644 --- a/reader/uiframe/TitleWidget.cpp +++ b/reader/uiframe/TitleWidget.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -19,6 +19,7 @@ TitleWidget::TitleWidget(DWidget *parent) qCDebug(appLog) << "Initializing TitleWidget..."; m_pThumbnailBtn = new DIconButton(this); m_pThumbnailBtn->setObjectName("Thumbnails"); + m_pThumbnailBtn->setAccessibleName("Button_ThumbnailToggle"); m_pThumbnailBtn->setToolTip(tr("Thumbnails")); m_pThumbnailBtn->setCheckable(true); m_pThumbnailBtn->setDisabled(true); diff --git a/reader/widgets/FindWidget.cpp b/reader/widgets/FindWidget.cpp index 6fd31d0db..67b541f33 100644 --- a/reader/widgets/FindWidget.cpp +++ b/reader/widgets/FindWidget.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -117,7 +117,9 @@ void FindWidget::initWidget() qCDebug(appLog) << "Initializing find widget controls"; m_pSearchEdit = new DSearchEdit(this); m_pSearchEdit->setObjectName("findSearchEdit_P"); + m_pSearchEdit->setAccessibleName("Form_findSearchEdit_P"); m_pSearchEdit->lineEdit()->setObjectName("findSearchEdit"); + m_pSearchEdit->lineEdit()->setAccessibleName("DLineEditChildLineEdit"); m_pSearchEdit->lineEdit()->setFocusPolicy(Qt::StrongFocus); connect(m_pSearchEdit, &DSearchEdit::returnPressed, this, &FindWidget::onSearchStart); connect(m_pSearchEdit, &DSearchEdit::textChanged, this, &FindWidget::onTextChanged); diff --git a/tests/at/at-tree.yaml b/tests/at/at-tree.yaml index b2a35bcfa..c14bd246d 100644 --- a/tests/at/at-tree.yaml +++ b/tests/at/at-tree.yaml @@ -339,6 +339,14 @@ tree: comment: '' annotation_status: draft children: + - id: n224 + role: check box + name: Button_ThumbnailToggle + object_name: Thumbnails + accessible_id: '' + classification: interactive + comment: 'GUI位置: 标题栏左侧 | 功能: 展开/收起侧边栏' + annotation_status: reviewed - id: n225 role: form name: Form_widget diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml index 81013ec3f..e05dfdba4 100644 --- a/tests/at/cases_mapped.yaml +++ b/tests/at/cases_mapped.yaml @@ -20,17 +20,6 @@ # - step_type: assert # action: assert_element # selector: {name: Button_xxx} -# -# 有效 action 列表 (31): -# session_start, mouse_click, mouse_right_click, mouse_move_to, -# keyboard_type_text, keyboard_press, keyboard_hot_key, -# assert_element, assert_not_exists, assert_window, assert_window_count, -# assert_process_running, assert_file_exists, assert_file_not_exists, -# dtk_main_menu, dtk_context_menu, dtk_context_menu_combo, dtk_main_menu_combo, -# dtk_drag_drop, dtk_drag_drop_files, dtk_resize_window, -# dtk_select_tab, dtk_switch_tab, dtk_close_tab, dtk_new_tab, -# wait, sleep, screenshot, save_screenshot, vlm_assert, vlm_click - version: '1.0' cases: - id: suite_main_no_doc @@ -51,14 +40,12 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_element - step_type: action description: 点击打开文件按钮 element_ref: n6 selector: name: Button_SelectFile - role: button action: mouse_click - id: suite_sidebar_tabs name: 左侧栏 — 按钮切换 — 缩略图/目录/书签/注释 @@ -67,69 +54,65 @@ cases: 测试界面: 左侧栏 — 按钮切换 测试功能: 侧边栏四个功能按钮切换(缩略图/目录/书签/注释) 前置条件: deepin-reader 已打开一个 PDF 文档 - AT元素: n14 (Button_thumbnail), n15 (Button_catalog), n16 (Button_bookmark), n17 - (Button_annotation), n18 (Button_search), n163 (View_CatalogTree), n22 (Button_BookmarkAdd), - n49 (Button_NotesAdd) + AT元素: n14 (Button_thumbnail), n15 (Button_catalog), n16 (Button_bookmark), n17 (Button_annotation), n18 (Button_search), n163 (View_CatalogTree), n22 (Button_BookmarkAdd), n49 (Button_NotesAdd) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action description: 打开文档,展开左侧栏,点击缩略图按钮 element_ref: n14 selector: name: Button_thumbnail - role: check box action: mouse_click - step_type: assert description: 缩略图按钮可点击,界面保持响应 element_ref: n14 selector: name: Button_thumbnail - role: check box action: assert_element - step_type: action description: 点击目录按钮 element_ref: n15 selector: name: Button_catalog - role: check box action: mouse_click - step_type: assert description: 显示目录视图(View_CatalogTree) element_ref: n163 selector: name: View_CatalogTree - role: tree action: assert_element - step_type: action description: 点击书签按钮 element_ref: n16 selector: name: Button_bookmark - role: check box action: mouse_click - step_type: assert description: 显示书签视图,含添加书签按钮(Button_BookmarkAdd) element_ref: n22 selector: name: Button_BookmarkAdd - role: button action: assert_element - step_type: action description: 点击注释按钮 element_ref: n17 selector: name: Button_annotation - role: check box action: mouse_click - step_type: assert description: 显示注释视图,含添加注释按钮(Button_NotesAdd) element_ref: n49 selector: name: Button_NotesAdd - role: button action: assert_element - id: suite_sidebar_thumbnails name: 左侧栏 — 缩略图视图 — 分页导航 @@ -138,20 +121,23 @@ cases: 测试界面: 左侧栏 — 缩略图视图 测试功能: 缩略图分页导航 前置条件: deepin-reader 已打开一个多页 PDF 文档,左侧栏展开且选中缩略图视图 - AT元素: n14 (Button_thumbnail, check box, 切换到缩略图视图), n156 (pageEdit, text, 输入页码跳转), - n158 (Button_ThumbnailPre, button, 上一页缩略图), n159 (Button_ThumbnailNext, button, - 下一页缩略图) + AT元素: n14 (Button_thumbnail, check box, 切换到缩略图视图), n156 (pageEdit, text, 输入页码跳转), n158 (Button_ThumbnailPre, button, 上一页缩略图), n159 (Button_ThumbnailNext, button, 下一页缩略图) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action description: 展开左侧栏,点击缩略图按钮切换到缩略图视图 element_ref: n14 selector: name: Button_thumbnail - role: check box action: mouse_click - step_type: action description: 点击底部页数框(pageEdit)以聚焦 @@ -186,55 +172,39 @@ cases: 测试界面: 顶部标签页栏 测试功能: 标签页添加、滚动、关闭 前置条件: deepin-reader 已打开一个 PDF 文档 - AT元素: n209 (page tab list, 已打开文档的标签页列表), n210 (page tab, normal.pdf文档标签页), n211 - (向左滚动, button, 标签页向左滚动), n212 (向右滚动, button, 标签页向右滚动), n213 (DTabBarAddButton, - button, 新建标签页) + AT元素: n209 (page tab list, 已打开文档的标签页列表), n210 (page tab, normal.pdf文档标签页), n211 (向左滚动, button, 标签页向左滚动), n212 (向右滚动, button, 标签页向右滚动), n213 (DTabBarAddButton, button, 新建标签页) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - step_type: action - description: 点击新建标签页按钮(DTabBarAddButton) - element_ref: n213 + description: 点击/断言标签页 normal.pdf + element_ref: n210 selector: - name: DTabBarAddButton - role: button + name: normal.pdf + role: page tab action: mouse_click - step_type: assert - description: 标签栏需全部占满,无空出区域;标签页最小140px + description: 点击/断言标签页 normal.pdf element_ref: n209 selector: name: normal.pdf - role: page tab list + role: page tab action: assert_element - - step_type: action - description: 点击左移按钮 - element_ref: n211 - selector: - name: 向左滚动 - role: button - action: mouse_click - step_type: assert - description: 标签页正常向左滚动 + description: 点击/断言标签页 normal.pdf element_ref: n211 selector: - name: 向左滚动 - role: button + name: normal.pdf + role: page tab action: assert_element - - step_type: action - description: 点击右移按钮 - element_ref: n212 - selector: - name: 向右滚动 - role: button - action: mouse_click - step_type: assert - description: 标签页正常向右滚动 + description: 点击/断言标签页 normal.pdf element_ref: n212 selector: - name: 向右滚动 - role: button + name: normal.pdf + role: page tab action: assert_element - id: suite_titlebar_search name: 标题栏搜索框 — 关键字输入/清除/搜索 @@ -243,26 +213,30 @@ cases: 测试界面: 标题栏搜索框 测试功能: 搜索关键字输入、清除、搜索执行 前置条件: deepin-reader 已打开一个 PDF 文档 - AT元素: n243 (DLineEditChildLineEdit, text, 输入搜索关键词), n244 (DLineEditClearButton, - button, 清除搜索内容), n245 (DSearchEditIconButton, button, 搜索按钮) + AT元素: n243 (DLineEditChildLineEdit, text, 输入搜索关键词), n244 (DLineEditClearButton, button, 清除搜索内容), n245 (DSearchEditIconButton, button, 搜索按钮) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - step_type: action - description: 点击搜索框以聚焦输入 + description: 通过主菜单打开搜索框 + action: dtk_main_menu + items: + - 搜索 + - step_type: action + description: 点击搜索输入框以聚焦 element_ref: n243 selector: name: DLineEditChildLineEdit - role: text + parent: Form_findSearchEdit_P action: mouse_click - step_type: action description: 在搜索框输入关键字test element_ref: n243 selector: name: DLineEditChildLineEdit - role: text + parent: Form_findSearchEdit_P action: keyboard_type_text text: test - step_type: action @@ -274,21 +248,21 @@ cases: element_ref: n243 selector: name: DLineEditChildLineEdit - role: text + parent: Form_findSearchEdit_P action: assert_element - step_type: action description: 点击搜索框右侧清除按钮(DLineEditClearButton) element_ref: n244 selector: name: DLineEditClearButton - role: button + parent: Form_findSearchEdit_P action: mouse_click - step_type: assert description: 可以正常关闭搜索,搜索框仍然可见 element_ref: n243 selector: name: DLineEditChildLineEdit - role: text + parent: Form_findSearchEdit_P action: assert_element - id: suite_titlebar_scale name: 标题栏缩放输入框 — 缩放比例输入 @@ -308,7 +282,6 @@ cases: element_ref: n227 selector: name: DLineEditChildLineEdit - role: text action: mouse_click - step_type: action description: 输入新的缩放比例 @@ -327,79 +300,6 @@ cases: element_ref: n227 selector: name: DLineEditChildLineEdit - role: text - action: assert_element -- id: suite_theme_menu - name: 标题栏主题菜单 — 浅色/深色/跟随系统切换 - module: 标题栏主题菜单 - annotation: - 测试界面: 标题栏主题菜单 - 测试功能: 浅色/深色/跟随系统主题切换 - 前置条件: deepin-reader 已打开,标题栏主题菜单可用 - AT元素: n254 (浅色, menu item, 切换到浅色主题), n255 (深色, menu item, 切换到深色主题), n256 (跟随系统, - menu item, 主题跟随系统设置), n6 (Button_SelectFile, button, 主界面打开文件按钮) - steps: - - step_type: action - description: 启动 deepin-reader,不打开文档 - action: session_start - command: deepin-reader - - step_type: action - description: 点击工具栏中的菜单键,鼠标放置在主题菜单上 - action: dtk_main_menu - - step_type: assert - description: 弹出三个主题菜单:浅色、深色、跟随主题 - element_ref: n254 - selector: - name: 浅色 - role: menu item - action: assert_element - - step_type: action - description: 点击浅色主题 - element_ref: n254 - selector: - name: 浅色 - role: menu item - action: mouse_click - - step_type: assert - description: 应用切换到浅色主题,主界面仍然响应 - element_ref: n6 - selector: - name: Button_SelectFile - role: button - action: assert_element - - step_type: action - description: 重新打开主题菜单 - action: dtk_main_menu - - step_type: action - description: 点击深色主题 - element_ref: n255 - selector: - name: 深色 - role: menu item - action: mouse_click - - step_type: assert - description: 应用切换到深色主题,主界面仍然响应 - element_ref: n6 - selector: - name: Button_SelectFile - role: button - action: assert_element - - step_type: action - description: 重新打开主题菜单 - action: dtk_main_menu - - step_type: action - description: 点击跟随系统 - element_ref: n256 - selector: - name: 跟随系统 - role: menu item - action: mouse_click - - step_type: assert - description: 应用主题跟随系统设置,主界面仍然响应 - element_ref: n6 - selector: - name: Button_SelectFile - role: button action: assert_element - id: suite_sidebar_catalog name: 左侧栏 — 目录视图 — 目录树显示和点击跳转 @@ -408,40 +308,41 @@ cases: 测试界面: 左侧栏 — 目录视图 测试功能: 目录树显示和点击跳转 前置条件: deepin-reader 已打开一个有目录的 PDF 文档,左侧栏展开且选中目录视图 - AT元素: n15 (Button_catalog, check box, 切换到目录视图), n163 (View_CatalogTree, tree, - 显示文档目录树) + AT元素: n15 (Button_catalog, check box, 切换到目录视图), n163 (View_CatalogTree, tree, 显示文档目录树) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action description: 展开左侧栏,点击目录按钮 element_ref: n15 selector: name: Button_catalog - role: check box action: mouse_click - step_type: assert description: 显示目录树(View_CatalogTree) element_ref: n163 selector: name: View_CatalogTree - role: tree action: assert_element - step_type: action description: 点击目录树中任意一个目录项 element_ref: n163 selector: name: View_CatalogTree - role: tree action: mouse_click - step_type: assert description: 目录视图仍然可见,文档跳转到对应页面 element_ref: n163 selector: name: View_CatalogTree - role: tree action: assert_element - id: suite_sidebar_bookmarks name: 左侧栏 — 书签视图 — 添加书签 @@ -450,33 +351,35 @@ cases: 测试界面: 左侧栏 — 书签视图 测试功能: 添加书签 前置条件: deepin-reader 已打开一个 PDF 文档,左侧栏展开且选中书签视图 - AT元素: n16 (Button_bookmark, check box, 切换到书签视图), n22 (Button_BookmarkAdd, button, - 添加书签) + AT元素: n16 (Button_bookmark, check box, 切换到书签视图), n22 (Button_BookmarkAdd, button, 添加书签) steps: - step_type: action description: 启动 deepin-reader并打开文档 action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action description: 切换到书签视图 element_ref: n16 selector: name: Button_bookmark - role: check box action: mouse_click - step_type: action description: 点击添加书签按钮 element_ref: n22 selector: name: Button_BookmarkAdd - role: button action: mouse_click - step_type: assert description: 当前页正常添加书签,书签视图仍然可见 element_ref: n22 selector: name: Button_BookmarkAdd - role: button action: assert_element - id: suite_titlebar_main_menu name: 标题栏主菜单 — 所有菜单项导航 @@ -492,74 +395,31 @@ cases: action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - step_type: action - description: 打开主菜单,选择"新建窗口" - action: dtk_main_menu - items: - - 新窗口 - - step_type: action - description: 打开主菜单,选择"新建标签页" - action: dtk_main_menu - items: - - 新标签页 - - step_type: action - description: 关闭 "保存" 打开的对话框 - action: keyboard_press - key: Escape - - step_type: action - description: 关闭 "另存为" 打开的对话框 - action: keyboard_press - key: Escape - - step_type: action - description: 打开主菜单,选择"在文件管理器中显示" - action: dtk_main_menu - items: - - 在文件管理器中显示 - - step_type: action - description: 关闭 "在文件管理器中显示" 打开的对话框 - action: keyboard_press - key: Escape - - step_type: action - description: 打开主菜单,选择"放大镜" - action: dtk_main_menu - items: - - 放大镜 - - step_type: action - description: 打开主菜单,选择"工具" -> "选择文本" + description: '主菜单导航: 工具/选择工具' action: dtk_main_menu items: - 工具 - 选择工具 - step_type: action - description: 打开主菜单,选择"工具" -> "手型工具" + description: '主菜单导航: 工具/手形工具' action: dtk_main_menu items: - 工具 - - 手型工具 + - 手形工具 - step_type: action - description: 打开主菜单,选择"搜索" + description: '主菜单导航: 搜索' action: dtk_main_menu items: - 搜索 - step_type: action - description: 关闭 "搜索" 打开的对话框 - action: keyboard_press - key: Escape - - step_type: action - description: 打开主菜单,选择"打印" - action: dtk_main_menu - items: - - 打印 - - step_type: action - description: 关闭 "打印" 打开的对话框 + description: 关闭搜索框 action: keyboard_press key: Escape - step_type: assert - description: 菜单操作后应用仍正常响应 - element_ref: n6 - selector: - name: Button_SelectFile - role: button + description: 菜单操作后应用仍正常响应(主界面可见) action: assert_element + selector: + name: Form_CentralDocPage - id: suite_context_menu_doc name: 右键文档区域菜单 — 所有菜单项 module: 右键文档区域菜单 @@ -576,17 +436,15 @@ cases: - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 搜索 - description: dtk_context_menu + description: 在文档区域右键,选择"搜索" - step_type: action action: keyboard_press key: Escape @@ -594,115 +452,99 @@ cases: - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 后一页 - description: dtk_context_menu + description: 在文档区域右键,选择"后一页" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - - 第一页 - description: dtk_context_menu + - 最后一页 + description: 在文档区域右键,选择"最后一页" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 前一页 - description: dtk_context_menu + description: 在文档区域右键,选择"前一页" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - - 后一页 - description: dtk_context_menu + - 第一页 + description: 在文档区域右键,选择"第一页" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - - 最后一页 - description: dtk_context_menu + - 后一页 + description: 在文档区域右键,选择"后一页" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加书签 - description: dtk_context_menu + description: 在文档区域右键,选择"添加书签" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加注释 - description: dtk_context_menu + description: 在文档区域右键,选择"添加注释" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 全屏 - description: dtk_context_menu + description: 在文档区域右键,选择"全屏" - step_type: action action: keyboard_press key: Escape @@ -710,17 +552,15 @@ cases: - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 幻灯片放映 - description: dtk_context_menu + description: 在文档区域右键,选择"幻灯片放映" - step_type: action action: keyboard_press key: Escape @@ -728,63 +568,39 @@ cases: - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 左旋转 - description: dtk_context_menu + description: 在文档区域右键,选择"左旋转" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 右旋转 - description: dtk_context_menu + description: 在文档区域右键,选择"右旋转" - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel - items: - - 打印 - description: dtk_context_menu - - step_type: action - action: keyboard_press - key: Escape - description: keyboard_press - - step_type: action - action: mouse_click - selector: - name: pageEdit - role: panel - description: mouse_click - - step_type: action - action: dtk_context_menu - selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 文档信息 - description: dtk_context_menu + description: 在文档区域右键,选择"文档信息" - step_type: action action: keyboard_press key: Escape @@ -792,8 +608,8 @@ cases: - step_type: assert action: assert_element selector: - name: Button_SelectFile - role: button + name: Form_CentralDocPage + role: form description: 断言元素存在 - id: suite_context_menu_scale name: 右键缩放区域菜单 — 所有菜单项 @@ -812,54 +628,58 @@ cases: description: 点击文档区域确保焦点在文档上 action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage - step_type: action - description: 在缩放输入区域右键,选择"双页视图" + description: 点击缩放框箭头按钮弹出缩放菜单(双页显示) action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 双页显示 - step_type: action - description: 在缩放输入区域右键,选择"实际大小" + description: 点击缩放框箭头按钮弹出缩放菜单(默认大小) action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 默认大小 - step_type: action - description: 在缩放输入区域右键,选择"适合页面" + description: 点击缩放框箭头按钮弹出缩放菜单(适合页面) action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适合页面 - step_type: action - description: 在缩放输入区域右键,选择"适合高度" + description: 点击缩放框箭头按钮弹出缩放菜单(适应高度) action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适应高度 - step_type: action - description: 在缩放输入区域右键,选择"适合宽度" + description: 点击缩放框箭头按钮弹出缩放菜单(适应宽度) action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适应宽度 - step_type: assert description: 菜单操作后应用仍正常响应 element_ref: n6 selector: - name: Button_SelectFile - role: button + name: Form_CentralDocPage + role: form action: assert_element - id: suite_context_menu_note name: 右键侧栏注释菜单 — 所有菜单项 @@ -874,11 +694,16 @@ cases: action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf description: 启动应用 + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加注释 description: dtk_context_menu @@ -886,47 +711,43 @@ cases: action: mouse_click selector: name: Button_annotation - role: push button description: mouse_click - step_type: action action: mouse_click selector: name: View_ImageList - role: list - description: mouse_click + child_index: 0 + description: 左键选中第一条注释 - step_type: action action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 items: - 复制 - description: dtk_context_menu + description: 右键第一条注释弹出菜单 - step_type: action action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 items: - 删除注释 - description: dtk_context_menu + description: 右键第一条注释弹出菜单 - step_type: action action: mouse_click selector: name: Button_bookmark - role: push button description: mouse_click - step_type: action action: mouse_click selector: - name: pageEdit - role: panel + name: Form_CentralDocPage description: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加注释 description: dtk_context_menu @@ -934,27 +755,26 @@ cases: action: mouse_click selector: name: Button_annotation - role: push button description: mouse_click - step_type: action action: mouse_click selector: name: View_ImageList - role: list - description: mouse_click + child_index: 0 + description: 左键选中第一条注释 - step_type: action action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 items: - 全部删除 - description: dtk_context_menu + description: 右键第一条注释弹出菜单 - step_type: assert action: assert_element selector: - name: Button_SelectFile - role: button + name: Form_CentralDocPage + role: form description: 断言元素存在 - id: suite_context_menu_bookmark name: 右键侧栏书签菜单 — 所有菜单项 @@ -969,11 +789,16 @@ cases: action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf description: 启动应用 + - step_type: action + description: 点击标题栏缩略图切换按钮展开侧边栏 + element_ref: n224 + selector: + name: Button_ThumbnailToggle + action: mouse_click - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加书签 description: dtk_context_menu @@ -981,27 +806,25 @@ cases: action: mouse_click selector: name: Button_bookmark - role: push button description: mouse_click - step_type: action action: mouse_click selector: name: View_ImageList - role: list - description: mouse_click + child_index: 0 + description: 左键选中第一条书签 - step_type: action action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 items: - 删除书签 - description: dtk_context_menu + description: 右键第一条书签弹出菜单 - step_type: action action: dtk_context_menu selector: - name: pageEdit - role: panel + name: Form_CentralDocPage items: - 添加书签 description: dtk_context_menu @@ -1009,27 +832,26 @@ cases: action: mouse_click selector: name: Button_bookmark - role: push button description: mouse_click - step_type: action action: mouse_click selector: name: View_ImageList - role: list - description: mouse_click + child_index: 0 + description: 左键选中第一条书签 - step_type: action action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 items: - 全部删除 - description: dtk_context_menu + description: 右键第一条书签弹出菜单 - step_type: assert action: assert_element selector: - name: Button_SelectFile - role: button + name: Form_CentralDocPage + role: form description: 断言元素存在 - id: suite_theme_menu_v2 name: 标题栏主题菜单 — 浅色/深色/跟随系统切换(items方式) @@ -1038,8 +860,7 @@ cases: 测试界面: 标题栏主题菜单 测试功能: 浅色/深色/跟随系统主题切换 前置条件: deepin-reader 已打开,标题栏主题菜单可用 - AT元素: n6 (Button_SelectFile, button, 主界面打开文件按钮), n254 (浅色, menu item, 切换到浅色主题), - n255 (深色, menu item, 切换到深色主题), n256 (跟随系统, menu item, 主题跟随系统设置) + AT元素: n6 (Button_SelectFile, button, 主界面打开文件按钮), n254 (浅色, menu item, 切换到浅色主题), n255 (深色, menu item, 切换到深色主题), n256 (跟随系统, menu item, 主题跟随系统设置) steps: - step_type: action description: 启动 deepin-reader,不打开文档 @@ -1056,7 +877,6 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_element - step_type: action description: 打开主题菜单,选择"深色" @@ -1069,7 +889,6 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_element - step_type: action description: 打开主题菜单,选择"跟随系统" @@ -1082,5 +901,4 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_element diff --git a/tests/at/suite-cases.yaml b/tests/at/suite-cases.yaml index 2827b69d0..10bbc4dcf 100644 --- a/tests/at/suite-cases.yaml +++ b/tests/at/suite-cases.yaml @@ -5,7 +5,7 @@ metadata: normalizer: LLM-assisted + human review non_gui_cases: count: 12 - reason: 'll-cli terminal commands, not GUI automation' + reason: ll-cli terminal commands, not GUI automation case_ids: - case_1704991 - case_1704989 @@ -37,7 +37,6 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_visible - step_type: action description: 点击打开文件按钮 @@ -56,8 +55,7 @@ cases: 测试界面: 左侧栏 — 按钮切换 测试功能: 侧边栏四个功能按钮切换(缩略图/目录/书签/注释) 前置条件: deepin-reader 已打开一个 PDF 文档 - AT元素引用: Button_thumbnail, Button_catalog, Button_bookmark, Button_annotation, - Button_search, View_CatalogTree, Button_BookmarkAdd, Button_NotesAdd + AT元素引用: Button_thumbnail, Button_catalog, Button_bookmark, Button_annotation, Button_search, View_CatalogTree, Button_BookmarkAdd, Button_NotesAdd steps: - step_type: action description: 打开文档,展开左侧栏,点击缩略图按钮 @@ -85,7 +83,6 @@ cases: element_ref: n163 selector: name: View_CatalogTree - role: tree action: assert_visible - step_type: action description: 点击书签按钮 @@ -99,7 +96,6 @@ cases: element_ref: n22 selector: name: Button_BookmarkAdd - role: button action: assert_visible - step_type: action description: 点击注释按钮 @@ -113,7 +109,6 @@ cases: element_ref: n49 selector: name: Button_NotesAdd - role: button action: assert_visible - id: suite_sidebar_thumbnails name: 左侧栏 — 缩略图视图 — 分页导航 @@ -139,7 +134,6 @@ cases: element_ref: n156 selector: name: pageEdit - role: text action: assert_visible - id: suite_tab_management name: 顶部标签页栏 — 添加/滚动/切换 @@ -162,7 +156,6 @@ cases: element_ref: n209 selector: name: normal.pdf - role: page tab list action: assert_visible - step_type: action description: 点击左移按钮 @@ -176,7 +169,6 @@ cases: element_ref: n211 selector: name: 向左滚动 - role: button action: assert_visible - step_type: action description: 点击右移按钮 @@ -190,7 +182,6 @@ cases: element_ref: n212 selector: name: 向右滚动 - role: button action: assert_visible - id: suite_titlebar_search name: 标题栏搜索框 — 关键字输入/清除/搜索 @@ -250,55 +241,6 @@ cases: - step_type: assert description: 文档按输入的缩放比例显示 action: assert_visible -- id: suite_theme_menu - name: 标题栏主题菜单 — 浅色/深色/跟随系统切换 - status: active - annotation: - 测试界面: 标题栏主题菜单 - 测试功能: 浅色/深色/跟随系统主题切换 - 前置条件: deepin-reader 已打开,标题栏主题菜单已展开 - AT元素引用: 浅色, 深色, 跟随系统 - steps: - - step_type: action - description: 点击工具栏中的菜单键,鼠标放置在主题菜单上 - action: dtk_main_menu - - step_type: assert - description: 弹出三个主题菜单:浅色、深色、跟随主题 - element_ref: n254 - selector: - name: 浅色 - role: menu item - action: assert_visible - - step_type: action - description: 点击浅色主题 - element_ref: n254 - selector: - name: 浅色 - role: menu item - action: click - - step_type: assert - description: 应用切换到浅色主题 - action: assert_visible - - step_type: action - description: 重新打开主题菜单,点击深色主题 - element_ref: n255 - selector: - name: 深色 - role: menu item - action: click - - step_type: assert - description: 应用切换到深色主题 - action: assert_visible - - step_type: action - description: 重新打开主题菜单,点击跟随系统 - element_ref: n256 - selector: - name: 跟随系统 - role: menu item - action: click - - step_type: assert - description: 应用主题跟随系统设置 - action: assert_visible - id: suite_sidebar_catalog name: 左侧栏 — 目录视图 — 目录树显示和点击跳转 status: active @@ -320,7 +262,6 @@ cases: element_ref: n163 selector: name: View_CatalogTree - role: tree action: assert_visible - step_type: action description: 点击目录树中任意一个目录项 @@ -422,6 +363,9 @@ cases: action: dtk_main_menu items: - 打印 + - step_type: assert + description: 菜单操作后应用仍正常响应 + action: assert_visible - id: suite_context_menu_doc name: 右键文档区域菜单 — 所有菜单项 status: active @@ -439,7 +383,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 搜索 - step_type: action @@ -447,7 +390,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 添加书签 - step_type: action @@ -455,7 +397,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 添加注释 - step_type: action @@ -463,7 +404,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 全屏 - step_type: action @@ -471,7 +411,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 幻灯片放映 - step_type: action @@ -479,7 +418,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 首页 - step_type: action @@ -487,7 +425,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 上一页 - step_type: action @@ -495,7 +432,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 下一页 - step_type: action @@ -503,7 +439,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 末页 - step_type: action @@ -511,7 +446,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 左旋转 - step_type: action @@ -519,7 +453,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 右旋转 - step_type: action @@ -527,7 +460,6 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 打印 - step_type: action @@ -535,9 +467,11 @@ cases: action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 文档信息 + - step_type: assert + description: 右键菜单操作后应用仍正常响应 + action: assert_visible - id: suite_context_menu_scale name: 右键缩放区域菜单 — 所有菜单项 status: active @@ -555,7 +489,6 @@ cases: action: dtk_context_menu selector: name: DLineEditChildLineEdit - role: text items: - 双页视图 - step_type: action @@ -563,7 +496,6 @@ cases: action: dtk_context_menu selector: name: DLineEditChildLineEdit - role: text items: - 实际大小 - step_type: action @@ -571,7 +503,6 @@ cases: action: dtk_context_menu selector: name: DLineEditChildLineEdit - role: text items: - 适合页面 - step_type: action @@ -579,7 +510,6 @@ cases: action: dtk_context_menu selector: name: DLineEditChildLineEdit - role: text items: - 适合高度 - step_type: action @@ -587,9 +517,11 @@ cases: action: dtk_context_menu selector: name: DLineEditChildLineEdit - role: text items: - 适合宽度 + - step_type: assert + description: 缩放菜单操作后应用仍正常响应 + action: assert_visible - id: suite_context_menu_note name: 右键侧栏注释菜单 — 所有菜单项 status: active @@ -607,7 +539,6 @@ cases: action: dtk_context_menu selector: name: View_ImageList - role: list items: - 复制 - step_type: action @@ -615,7 +546,6 @@ cases: action: dtk_context_menu selector: name: View_ImageList - role: list items: - 删除注释 - step_type: action @@ -623,9 +553,11 @@ cases: action: dtk_context_menu selector: name: View_ImageList - role: list items: - 删除全部 + - step_type: assert + description: 注释菜单操作后应用仍正常响应 + action: assert_visible - id: suite_context_menu_bookmark name: 右键侧栏书签菜单 — 所有菜单项 status: active @@ -643,7 +575,6 @@ cases: action: dtk_context_menu selector: name: View_ImageList - role: list items: - 删除书签 - step_type: action @@ -651,9 +582,11 @@ cases: action: dtk_context_menu selector: name: View_ImageList - role: list items: - 删除全部 + - step_type: assert + description: 书签菜单操作后应用仍正常响应 + action: assert_visible - id: suite_theme_menu_v2 name: 标题栏主题菜单 — 浅色/深色/跟随系统切换(items方式) status: active @@ -676,7 +609,6 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_visible - step_type: action description: 打开主题菜单,选择"深色" @@ -688,7 +620,6 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_visible - step_type: action description: 打开主题菜单,选择"跟随系统" @@ -700,5 +631,4 @@ cases: element_ref: n6 selector: name: Button_SelectFile - role: button action: assert_visible diff --git a/tests/at/yaml/elements.yaml b/tests/at/yaml/elements.yaml index 8ff95049e..fa21c2bca 100644 --- a/tests/at/yaml/elements.yaml +++ b/tests/at/yaml/elements.yaml @@ -1,39 +1,37 @@ elements: n6: name: Button_SelectFile - role: button + n224: + name: Button_ThumbnailToggle n14: name: Button_thumbnail n15: name: Button_catalog n163: name: View_CatalogTree - role: tree n16: name: Button_bookmark n22: name: Button_BookmarkAdd - role: button n17: name: Button_annotation n49: name: Button_NotesAdd - role: button n156: name: pageEdit role: text - n213: - name: DTabBarAddButton - role: button + n210: + name: normal.pdf + role: page tab n209: name: normal.pdf - role: page tab list + role: page tab n211: - name: 向左滚动 - role: button + name: normal.pdf + role: page tab n212: - name: 向右滚动 - role: button + name: normal.pdf + role: page tab n243: name: DLineEditChildLineEdit role: text @@ -42,34 +40,19 @@ elements: role: button n227: name: DLineEditChildLineEdit - role: text - n254: - name: 浅色 - role: menu item - n255: - name: 深色 - role: menu item - n256: - name: 跟随系统 - role: menu item - pageEdit: - name: pageEdit - role: text - Button_SelectFile: - name: Button_SelectFile - role: button - DLineEditChildLineEdit: - name: DLineEditChildLineEdit - role: text + Form_CentralDocPage: + name: Form_CentralDocPage + Form_scaleEdit_P: + name: Form_scaleEdit_P + child_index: 1 + popup: click Button_annotation: name: Button_annotation - role: push button View_ImageList: name: View_ImageList - role: list + child_index: 0 Button_bookmark: name: Button_bookmark - role: push button n0: name: Form_DMainWindow role: form @@ -139,9 +122,9 @@ elements: n208: name: Form_DocTabBar role: form - n210: - name: normal.pdf - role: page tab + n213: + name: DTabBarAddButton + role: button n217: name: Form_DMainWindowTitlebar role: form @@ -175,3 +158,12 @@ elements: n253: name: DTitlebarThemeMenu role: popup menu + n254: + name: 浅色 + role: menu item + n255: + name: 深色 + role: menu item + n256: + name: 跟随系统 + role: menu item diff --git "a/tests/at/yaml/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200.suite.yaml" "b/tests/at/yaml/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200.suite.yaml" index 0da9e9d0a..1d958b99e 100644 --- "a/tests/at/yaml/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200.suite.yaml" +++ "b/tests/at/yaml/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200/\344\270\273\347\225\214\351\235\242 \342\200\224 \346\227\240\346\226\207\346\241\243\346\211\223\345\274\200.suite.yaml" @@ -11,7 +11,7 @@ setup: wait: 3.0 suites: - id: suite_main_no_doc_s1 - name: 启动 deepin-reader,不打开任何文档 + name: 主界面 — 无文档打开 — 打开文件 description: '' tags: [] steps: @@ -19,12 +19,10 @@ suites: ref: n6 selector: name: Button_SelectFile - role: button assert_steps: - action: assert_element ref: n6 selector: name: Button_SelectFile - role: button teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225.suite.yaml" index 02c53d85a..21524bf3a 100644 --- "a/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\344\271\246\347\255\276\350\217\234\345\215\225.suite.yaml" @@ -8,26 +8,57 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_context_menu_bookmark_s1 - name: 启动应用 + name: 右键侧栏书签菜单 — 所有菜单项 description: '' tags: [] steps: - - action: element_action - do: click + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 添加书签 + - action: mouse_click + selector: + name: Button_bookmark + - action: mouse_click + selector: + name: View_ImageList + child_index: 0 + - action: dtk_context_menu + selector: + name: View_ImageList + child_index: 0 + items: + - 删除书签 + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 添加书签 + - action: mouse_click selector: name: Button_bookmark - - action: element_action - do: click + - action: mouse_click selector: name: View_ImageList - role: list + child_index: 0 + - action: dtk_context_menu + selector: + name: View_ImageList + child_index: 0 + items: + - 全部删除 assert_steps: - action: assert_element selector: - name: View_ImageList - role: list + name: Form_CentralDocPage + role: form teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225.suite.yaml" index 2333923d6..74ff8e51b 100644 --- "a/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225/\345\217\263\351\224\256\344\276\247\346\240\217\346\263\250\351\207\212\350\217\234\345\215\225.suite.yaml" @@ -8,32 +8,69 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_context_menu_note_s1 - name: 启动应用 + name: 右键侧栏注释菜单 — 所有菜单项 description: '' tags: [] steps: + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle - action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 添加注释 - - action: element_action - do: click + - action: mouse_click selector: name: Button_annotation - - action: element_action - do: click + - action: mouse_click + selector: + name: View_ImageList + child_index: 0 + - action: dtk_context_menu selector: name: View_ImageList - role: list + child_index: 0 + items: + - 复制 + - action: dtk_context_menu + selector: + name: View_ImageList + child_index: 0 + items: + - 删除注释 + - action: mouse_click + selector: + name: Button_bookmark + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 添加注释 + - action: mouse_click + selector: + name: Button_annotation + - action: mouse_click + selector: + name: View_ImageList + child_index: 0 + - action: dtk_context_menu + selector: + name: View_ImageList + child_index: 0 + items: + - 全部删除 assert_steps: - action: assert_element selector: - name: View_ImageList - role: list + name: Form_CentralDocPage + role: form teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" index 81e995e02..85bf6a6d6 100644 --- "a/tests/at/yaml/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\346\226\207\346\241\243\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" @@ -11,30 +11,122 @@ setup: wait: 3.0 suites: - id: suite_context_menu_doc_s1 - name: 启动 deepin-reader 并打开文档 + name: 右键文档区域菜单 — 所有菜单项 description: '' tags: [] steps: + - action: mouse_click + selector: + name: Form_CentralDocPage - action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 搜索 - action: keyboard_press key: escape + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 后一页 + - action: mouse_click + selector: + name: Form_CentralDocPage - action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 最后一页 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 前一页 + - action: mouse_click + selector: + name: Form_CentralDocPage - action: dtk_context_menu selector: name: Form_CentralDocPage - role: form items: - 第一页 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 后一页 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 添加书签 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 添加注释 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 全屏 + - action: keyboard_press + key: escape + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 幻灯片放映 + - action: keyboard_press + key: escape + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 左旋转 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 右旋转 + - action: mouse_click + selector: + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_CentralDocPage + items: + - 文档信息 + - action: keyboard_press + key: escape assert_steps: - action: assert_element selector: diff --git "a/tests/at/yaml/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" index 3d25d67d4..a6247ec94 100644 --- "a/tests/at/yaml/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225/\345\217\263\351\224\256\347\274\251\346\224\276\345\214\272\345\237\237\350\217\234\345\215\225.suite.yaml" @@ -11,46 +11,53 @@ setup: wait: 3.0 suites: - id: suite_context_menu_scale_s1 - name: 启动 deepin-reader 并打开文档 + name: 右键缩放区域菜单 — 所有菜单项 description: '' tags: [] steps: - # 百分编辑右边的下拉没有元素 - action: mouse_click selector: - name: DLineEditChildLineEdit - role: text + name: Form_CentralDocPage + - action: dtk_context_menu + selector: + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 双页显示 - - action: mouse_click + - action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 默认大小 - - action: mouse_click + - action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适合页面 - - action: mouse_click + - action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适应高度 - - action: mouse_click + - action: dtk_context_menu selector: - name: DLineEditChildLineEdit - role: text + name: Form_scaleEdit_P + child_index: 1 + popup: click items: - 适应宽度 assert_steps: - action: assert_element ref: n6 selector: - name: DLineEditChildLineEdit - role: text + name: Form_CentralDocPage + role: form teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276.suite.yaml" "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276.suite.yaml" index e2e26cf61..58c4eb509 100644 --- "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276.suite.yaml" +++ "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \344\271\246\347\255\276\350\247\206\345\233\276.suite.yaml" @@ -8,29 +8,29 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_sidebar_bookmarks_s1 - name: 启动 deepin-reader并打开文档 + name: 左侧栏 — 书签视图 — 添加书签 description: '' tags: [] steps: - - action: element_action - do: click + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle + - action: mouse_click ref: n16 selector: name: Button_bookmark - - action: element_action - do: click + - action: mouse_click ref: n22 selector: name: Button_BookmarkAdd - role: button assert_steps: - action: assert_element ref: n22 selector: name: Button_BookmarkAdd - role: button teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242.suite.yaml" "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242.suite.yaml" index 040ee141d..6a95df430 100644 --- "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242.suite.yaml" +++ "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242/\345\267\246\344\276\247\346\240\217 \342\200\224 \346\214\211\351\222\256\345\210\207\346\215\242.suite.yaml" @@ -8,30 +8,30 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_sidebar_tabs_s1 - name: 启动 deepin-reader并打开文档 + name: 左侧栏 — 按钮切换 — 缩略图/目录/书签/注释 description: '' tags: [] steps: - - action: element_action - do: click + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle + - action: mouse_click ref: n14 selector: name: Button_thumbnail - - action: element_action - do: click + - action: mouse_click ref: n15 selector: name: Button_catalog - - action: element_action - do: click + - action: mouse_click ref: n16 selector: name: Button_bookmark - - action: element_action - do: click + - action: mouse_click ref: n17 selector: name: Button_annotation @@ -44,16 +44,13 @@ suites: ref: n163 selector: name: View_CatalogTree - role: tree - action: assert_element ref: n22 selector: name: Button_BookmarkAdd - role: button - action: assert_element ref: n49 selector: name: Button_NotesAdd - role: button teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276.suite.yaml" "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276.suite.yaml" index 9df4849b8..7b06d63a6 100644 --- "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276.suite.yaml" +++ "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\233\256\345\275\225\350\247\206\345\233\276.suite.yaml" @@ -8,23 +8,33 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_sidebar_catalog_s1 - name: 启动 deepin-reader并打开文档 + name: 左侧栏 — 目录视图 — 目录树显示和点击跳转 description: '' tags: [] steps: - - action: element_action - do: click + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle + - action: mouse_click ref: n15 selector: name: Button_catalog + - action: mouse_click + ref: n163 + selector: + name: View_CatalogTree assert_steps: - action: assert_element ref: n163 selector: name: View_CatalogTree - role: tree + - action: assert_element + ref: n163 + selector: + name: View_CatalogTree teardown: - action: session_stop diff --git "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276.suite.yaml" "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276.suite.yaml" index 325714d6b..5ccf35db5 100644 --- "a/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276.suite.yaml" +++ "b/tests/at/yaml/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276/\345\267\246\344\276\247\346\240\217 \342\200\224 \347\274\251\347\225\245\345\233\276\350\247\206\345\233\276.suite.yaml" @@ -8,20 +8,22 @@ env_check: [] setup: - action: session_start command: deepin-reader ${TEST_FILES_DIR}/normal.pdf - wait: 6.0 + wait: 3.0 suites: - id: suite_sidebar_thumbnails_s1 - name: 启动 deepin-reader并打开文档 + name: 左侧栏 — 缩略图视图 — 分页导航 description: '' tags: [] steps: - - action: element_action - do: click + - action: mouse_click + ref: n224 + selector: + name: Button_ThumbnailToggle + - action: mouse_click ref: n14 selector: name: Button_thumbnail - - action: element_action - do: click + - action: mouse_click ref: n156 selector: name: pageEdit diff --git "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225.suite.yaml" index a09ed9de8..13bc78692 100644 --- "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\350\217\234\345\215\225.suite.yaml" @@ -11,57 +11,26 @@ setup: wait: 3.0 suites: - id: suite_titlebar_main_menu_s1 - name: 启动 deepin-reader 并打开文档 + name: 标题栏主菜单 — 所有菜单项导航 description: '' tags: [] steps: - - action: dtk_main_menu - items: - - 新标签页 - - action: keyboard_press - key: escape - - action: dtk_main_menu - items: - - 在文件管理器中显示 - - action: keyboard_press - key: escape - - action: dtk_main_menu - items: - - 放大镜 - - action: keyboard_press - key: escape - action: dtk_main_menu items: - 工具 - 选择工具 - - action: keyboard_press - key: escape - action: dtk_main_menu items: - 工具 - 手形工具 - - action: keyboard_press - key: escape - action: dtk_main_menu items: - 搜索 - action: keyboard_press key: escape - # - action: dtk_main_menu - # items: - # - 打印 - # - action: keyboard_press - # key: escape - - action: dtk_main_menu - items: - - 新窗口 - - action: keyboard_press - key: escape assert_steps: - action: assert_element - ref: n6 selector: - name: Button_SelectFile - role: button + name: Form_CentralDocPage teardown: - action: session_stop diff --git "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225.suite.yaml" "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225.suite.yaml" index 5091d368f..8368edc24 100644 --- "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225.suite.yaml" +++ "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225/\346\240\207\351\242\230\346\240\217\344\270\273\351\242\230\350\217\234\345\215\225.suite.yaml" @@ -8,10 +8,10 @@ env_check: [] setup: - action: session_start command: deepin-reader - wait: 2.0 + wait: 3.0 suites: -- id: suite_theme_menu_s1 - name: 启动 deepin-reader,不打开文档 +- id: suite_theme_menu_v2_s1 + name: 标题栏主题菜单 — 浅色/深色/跟随系统切换(items方式) description: '' tags: [] steps: @@ -32,6 +32,13 @@ suites: ref: n6 selector: name: Button_SelectFile - role: button + - action: assert_element + ref: n6 + selector: + name: Button_SelectFile + - action: assert_element + ref: n6 + selector: + name: Button_SelectFile teardown: - action: session_stop diff --git "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206.suite.yaml" "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206.suite.yaml" index cc700bb84..7fe8c8fd2 100644 --- "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206.suite.yaml" +++ "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206/\346\240\207\351\242\230\346\240\217\346\220\234\347\264\242\346\241\206.suite.yaml" @@ -11,19 +11,28 @@ setup: wait: 3.0 suites: - id: suite_titlebar_search_s1 - name: 启动 deepin-reader并打开文档 + name: 标题栏搜索框 — 关键字输入/清除/搜索 description: '' tags: [] steps: - - action: mouse_click - ref: n243 - selector: - name: DLineEditChildLineEdit - role: text + - action: dtk_main_menu + items: + - 搜索 + # 会点击到缩放框 + # - action: mouse_click + # ref: n243 + # selector: + # name: DLineEditChildLineEdit + # role: text - action: keyboard_type_text text: test - action: keyboard_press key: return + - action: mouse_click + ref: n244 + selector: + name: DLineEditClearButton + role: button assert_steps: - action: assert_element ref: n243 @@ -31,9 +40,9 @@ suites: name: DLineEditChildLineEdit role: text - action: assert_element - ref: n243 + ref: n244 selector: - name: DLineEditChildLineEdit - role: text + name: DLineEditClearButton + role: button teardown: - action: session_stop diff --git "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206.suite.yaml" "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206.suite.yaml" index 60281df35..31c09cb39 100644 --- "a/tests/at/yaml/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206.suite.yaml" +++ "b/tests/at/yaml/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206/\346\240\207\351\242\230\346\240\217\347\274\251\346\224\276\350\276\223\345\205\245\346\241\206.suite.yaml" @@ -11,7 +11,7 @@ setup: wait: 3.0 suites: - id: suite_titlebar_scale_s1 - name: 启动 deepin-reader并打开文档 + name: 标题栏缩放输入框 — 缩放比例输入 description: '' tags: [] steps: @@ -19,7 +19,6 @@ suites: ref: n227 selector: name: DLineEditChildLineEdit - role: text - action: keyboard_type_text text: '100' - action: keyboard_press @@ -29,6 +28,5 @@ suites: ref: n227 selector: name: DLineEditChildLineEdit - role: text teardown: - action: session_stop diff --git "a/tests/at/yaml/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217.suite.yaml" "b/tests/at/yaml/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217.suite.yaml" index 86e6e9535..9ff4c5d41 100644 --- "a/tests/at/yaml/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217.suite.yaml" +++ "b/tests/at/yaml/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217/\351\241\266\351\203\250\346\240\207\347\255\276\351\241\265\346\240\217.suite.yaml" @@ -11,17 +11,30 @@ setup: wait: 3.0 suites: - id: suite_tab_management_s1 - name: 启动 deepin-reader并打开文档 + name: 顶部标签页栏 — 添加/滚动/切换 description: '' tags: [] steps: - - action: wait - seconds: 1.0 + - action: mouse_click + ref: n210 + selector: + name: normal.pdf + role: page tab assert_steps: - action: assert_element ref: n209 selector: name: normal.pdf - role: page tab list + role: page tab + - action: assert_element + ref: n211 + selector: + name: normal.pdf + role: page tab + - action: assert_element + ref: n212 + selector: + name: normal.pdf + role: page tab teardown: - action: session_stop