Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions tests/at/cases_mapped.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '1.0'
cases:
- id: suite_enc_switch_001_s1
name: 编码切换
module: enc_switch
steps:
- step_type: action
action: keyboard_hot_key
key: ctrl+t
- step_type: action
action: dtk_dropdown_menu
selector:
accessible_id: PToolButton
items:
- GB18030
- step_type: action
action: keyboard_type
text: UOS给世界更好的选择
- step_type: action
action: element_action
selector:
accessible_id: PActUtf8
do: click
- step_type: action
action: keyboard_press
key: enter
- step_type: action
action: keyboard_hot_key
key: ctrl+s
- step_type: action
action: file_dialog_select
path: /tmp/enc_switch_test.txt
wait: 3.0
- step_type: assert
action: assert_element
selector:
accessible_id: PTextEdit
- step_type: assert
action: assert_file_exists
path: /tmp/enc_switch_test.txt
9 changes: 9 additions & 0 deletions tests/at/coverage-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scan_total: 3
transient_items: []
unreachable: 0
denominator: 3
covered: 3
uncovered: 0
coverage: 100.0
passed: true
uncovered_elements: []
26 changes: 26 additions & 0 deletions tests/at/element-coverage-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '1.0'
source: at-case-authoring:element-map.yaml
scan_total: 3
elements:
PToolButton:
role: push button
ui_name: UTF-8菜单
desc: 底部编码下拉菜单触发按钮(DDropdownMenu PToolButton)
locator: accessible_id
PActUtf8:
role: menu item
ui_name: UTF-8
desc: 编码菜单中 Unicode 组下的 UTF-8 选项(QAction,有 objectName)
locator: accessible_id
PTextEdit:
role: text
ui_name: 文本编辑区
desc: 文本编辑区域(TextEdit,键盘输入目标)
locator: accessible_id
transient_items: []
unresolved:
- name: GB18030
role: menu item
ui_name: GB18030
desc: 编码菜单中简体中文组下的 GB18030 选项(QAction,无 setObjectName/setAccessibleName)
reason: id_name/object_name 未填 (TBD),运行时无法按名定位
7 changes: 7 additions & 0 deletions tests/at/yaml/elements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
elements:
PToolButton:
accessible_id: PToolButton
PActUtf8:
accessible_id: PActUtf8
PTextEdit:
accessible_id: PTextEdit
49 changes: 49 additions & 0 deletions tests/at/yaml/enc_switch/enc_switch.suite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: enc_switch_suite
app: deepin-editor
module: enc_switch
setup:
- action: session_start
command: deepin-editor
wait: 3.0
suites:
- id: suite_enc_switch_001_s1
name: 编码切换
description: ''
steps:
- step_type: action
action: keyboard_hot_key
key: ctrl+t
- step_type: action
action: dtk_dropdown_menu
selector:
accessible_id: PToolButton
items:
- GB18030
- step_type: action
action: keyboard_type
text: UOS给世界更好的选择
- step_type: action
action: element_action
selector:
accessible_id: PActUtf8
do: click
- step_type: action
action: keyboard_press
key: enter
- step_type: action
action: keyboard_hot_key
key: ctrl+s
- step_type: action
action: file_dialog_select
path: /tmp/enc_switch_test.txt
wait: 3.0
assert_steps:
- step_type: assert
action: assert_element
selector:
accessible_id: PTextEdit
- step_type: assert
action: assert_file_exists
path: /tmp/enc_switch_test.txt
teardown:
- action: session_stop
Loading