Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
2f7360fe
G
Graphic Ui
项目概览
OpenHarmony
/
Graphic Ui
11 个月 前同步成功
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphic Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2f7360fe
编写于
12月 03, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 03, 2022
浏览文件
操作
浏览文件
下载
差异文件
!843 组件自动化测试#2
Merge pull request !843 from Zhouyj/autoTest_2
上级
2666b8d3
364958f9
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
835 addition
and
51 deletion
+835
-51
test/uitest/test_button/ui_test_button.cpp
test/uitest/test_button/ui_test_button.cpp
+60
-31
test/uitest/test_button/ui_test_button.h
test/uitest/test_button/ui_test_button.h
+36
-0
test/uitest/test_clip/ui_test_clip.cpp
test/uitest/test_clip/ui_test_clip.cpp
+4
-4
test/uitest/test_clip/ui_test_clip.h
test/uitest/test_clip/ui_test_clip.h
+4
-0
test/uitest/test_edit_text/custom_input_method.cpp
test/uitest/test_edit_text/custom_input_method.cpp
+2
-0
test/uitest/test_edit_text/custom_input_method.h
test/uitest/test_edit_text/custom_input_method.h
+1
-0
test/uitest/test_edit_text/ui_test_edit_text.h
test/uitest/test_edit_text/ui_test_edit_text.h
+5
-0
test/uitest/test_view_zindex/ui_test_view_zindex.cpp
test/uitest/test_view_zindex/ui_test_view_zindex.cpp
+9
-8
test/uitest/test_view_zindex/ui_test_view_zindex.h
test/uitest/test_view_zindex/ui_test_view_zindex.h
+1
-1
tools/server/test_case/button_auto_test.json
tools/server/test_case/button_auto_test.json
+195
-4
tools/server/test_case/clip_auto_test.json
tools/server/test_case/clip_auto_test.json
+51
-3
tools/server/test_case/editText_auto_test.json
tools/server/test_case/editText_auto_test.json
+309
-0
tools/server/test_case/vectorFont_auto_test.json
tools/server/test_case/vectorFont_auto_test.json
+22
-0
tools/server/test_case/zIndex_auto_test.json
tools/server/test_case/zIndex_auto_test.json
+136
-0
未找到文件。
test/uitest/test_button/ui_test_button.cpp
浏览文件 @
2f7360fe
...
@@ -179,6 +179,7 @@ UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX,
...
@@ -179,6 +179,7 @@ UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX,
int16_t
width
,
int16_t
width
,
int16_t
height
,
int16_t
height
,
UICheckBox
::
OnChangeListener
**
listener
,
UICheckBox
::
OnChangeListener
**
listener
,
const
char
*
id
,
UIViewType
type
,
UIViewType
type
,
const
char
*
name
)
const
char
*
name
)
{
{
...
@@ -204,6 +205,7 @@ UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX,
...
@@ -204,6 +205,7 @@ UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX,
checkBox
->
SetImages
(
""
,
""
);
checkBox
->
SetImages
(
""
,
""
);
}
}
group
->
Add
(
checkBox
);
group
->
Add
(
checkBox
);
checkBox
->
SetViewId
(
id
);
checkBox
->
SetOnChangeListener
(
*
listener
);
checkBox
->
SetOnChangeListener
(
*
listener
);
checkBox
->
SetPosition
(
100
,
0
,
width
,
height
);
// 100: posX 0: posY
checkBox
->
SetPosition
(
100
,
0
,
width
,
height
);
// 100: posX 0: posY
if
(
checkBox
->
GetState
()
==
UICheckBox
::
SELECTED
)
{
if
(
checkBox
->
GetState
()
==
UICheckBox
::
SELECTED
)
{
...
@@ -224,11 +226,11 @@ void UITestBUTTON::UIKitCheckBoxTest001()
...
@@ -224,11 +226,11 @@ void UITestBUTTON::UIKitCheckBoxTest001()
label
->
SetText
(
"checkbox功能"
);
label
->
SetText
(
"checkbox功能"
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
// 40: posX 35 posY 100 width 100 height
// 40: posX 35 posY 100 width 100 height
UIViewGroup
*
group
=
CreateButtonGroup
(
40
,
35
,
100
,
100
,
&
checkBoxChangeListener_
);
UIViewGroup
*
group
=
CreateButtonGroup
(
40
,
35
,
100
,
100
,
&
checkBoxChangeListener_
,
UI_TEST_CHECKBOX_1
);
// 250: posX 35 posY 100 width 100 height
// 250: posX 35 posY 100 width 100 height
UIViewGroup
*
group1
=
CreateButtonGroup
(
250
,
35
,
100
,
100
,
&
checkBoxChangeListener1_
);
UIViewGroup
*
group1
=
CreateButtonGroup
(
250
,
35
,
100
,
100
,
&
checkBoxChangeListener1_
,
UI_TEST_CHECKBOX_2
);
// 500: posX 35 posY 100 width 100 height
// 500: posX 35 posY 100 width 100 height
UIViewGroup
*
group2
=
CreateButtonGroup
(
500
,
35
,
100
,
100
,
&
checkBoxChangeListener2_
);
UIViewGroup
*
group2
=
CreateButtonGroup
(
500
,
35
,
100
,
100
,
&
checkBoxChangeListener2_
,
UI_TEST_CHECKBOX_3
);
container_
->
Add
(
group
);
container_
->
Add
(
group
);
container_
->
Add
(
group1
);
container_
->
Add
(
group1
);
container_
->
Add
(
group2
);
container_
->
Add
(
group2
);
...
@@ -246,14 +248,14 @@ void UITestBUTTON::UIKitRadioButtonTest001()
...
@@ -246,14 +248,14 @@ void UITestBUTTON::UIKitRadioButtonTest001()
label
->
SetText
(
"radiobutton功能"
);
label
->
SetText
(
"radiobutton功能"
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
// 40: posX 160 posY 100 width 100 height
// 40: posX 160 posY 100 width 100 height
UIViewGroup
*
group
=
UIViewGroup
*
group
=
CreateButtonGroup
(
40
,
160
,
100
,
100
,
&
radioChangeListener_
,
UI_TEST_RADIO_BUTTON_1
,
CreateButtonGroup
(
40
,
160
,
100
,
100
,
&
radioChangeListener_
,
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
// 250: posX 160 posY 100 width 100 height
// 250: posX 160 posY 100 width 100 height
UIViewGroup
*
group1
=
UIViewGroup
*
group1
=
CreateButtonGroup
(
250
,
160
,
100
,
100
,
&
radioChangeListener1_
,
UI_TEST_RADIO_BUTTON_2
,
CreateButtonGroup
(
250
,
160
,
100
,
100
,
&
radioChangeListener1_
,
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
// 500: posX 160 posY 100 width 100 height
// 500: posX 160 posY 100 width 100 height
UIViewGroup
*
group2
=
UIViewGroup
*
group2
=
CreateButtonGroup
(
500
,
160
,
100
,
100
,
&
radioChangeListener2_
,
UI_TEST_RADIO_BUTTON_3
,
CreateButtonGroup
(
500
,
160
,
100
,
100
,
&
radioChangeListener2_
,
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
UIViewType
::
UI_RADIO_BUTTON
,
"bb"
);
container_
->
Add
(
group
);
container_
->
Add
(
group
);
container_
->
Add
(
group1
);
container_
->
Add
(
group1
);
container_
->
Add
(
group2
);
container_
->
Add
(
group2
);
...
@@ -272,13 +274,14 @@ void UITestBUTTON::UIKitToggleButtonTest001()
...
@@ -272,13 +274,14 @@ void UITestBUTTON::UIKitToggleButtonTest001()
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
// 40: posX 300 posY 100 width 100 height
// 40: posX 300 posY 100 width 100 height
UIViewGroup
*
group
=
CreateButtonGroup
(
40
,
300
,
100
,
100
,
&
toggleChangeListener_
,
UIViewType
::
UI_TOGGLE_BUTTON
);
UIViewGroup
*
group
=
CreateButtonGroup
(
40
,
300
,
100
,
100
,
&
toggleChangeListener_
,
UI_TEST_TOGGLE_BUTTON_1
,
UIViewType
::
UI_TOGGLE_BUTTON
);
// 250: posX 300 posY 100 width 100 height
// 250: posX 300 posY 100 width 100 height
UIViewGroup
*
group1
=
UIViewGroup
*
group1
=
CreateButtonGroup
(
250
,
300
,
100
,
100
,
&
toggleChangeListener1_
,
UI_TEST_TOGGLE_BUTTON_2
,
CreateButtonGroup
(
250
,
300
,
100
,
100
,
&
toggleChangeListener1_
,
UIViewType
::
UI_TOGGLE_BUTTON
);
UIViewType
::
UI_TOGGLE_BUTTON
);
// 500: posX 300 posY 100 width 100 height
// 500: posX 300 posY 100 width 100 height
UIViewGroup
*
group2
=
UIViewGroup
*
group2
=
CreateButtonGroup
(
500
,
300
,
100
,
100
,
&
toggleChangeListener2_
,
UI_TEST_TOGGLE_BUTTON_3
,
CreateButtonGroup
(
500
,
300
,
100
,
100
,
&
toggleChangeListener2_
,
UIViewType
::
UI_TOGGLE_BUTTON
);
UIViewType
::
UI_TOGGLE_BUTTON
);
container_
->
Add
(
group
);
container_
->
Add
(
group
);
container_
->
Add
(
group1
);
container_
->
Add
(
group1
);
container_
->
Add
(
group2
);
container_
->
Add
(
group2
);
...
@@ -299,19 +302,23 @@ void UITestBUTTON::UIKitCheckBoxTest002() const
...
@@ -299,19 +302,23 @@ void UITestBUTTON::UIKitCheckBoxTest002() const
checkbox
->
SetPosition
(
30
,
430
);
// 30: x-coordinate, 430: y-coordinate
checkbox
->
SetPosition
(
30
,
430
);
// 30: x-coordinate, 430: y-coordinate
checkbox
->
SetWidth
(
130
);
// 130: width
checkbox
->
SetWidth
(
130
);
// 130: width
checkbox
->
SetHeight
(
130
);
// 130: height
checkbox
->
SetHeight
(
130
);
// 130: height
checkbox
->
SetViewId
(
UI_TEST_CHECKBOX_SETIMAGE_1
);
checkbox
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
checkbox
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
UICheckBox
*
checkbox2
=
new
UICheckBox
();
UICheckBox
*
checkbox2
=
new
UICheckBox
();
checkbox2
->
SetPosition
(
200
,
430
);
// 200: x-coordinate, 430: y-coordinate
checkbox2
->
SetPosition
(
200
,
430
);
// 200: x-coordinate, 430: y-coordinate
checkbox2
->
SetWidth
(
130
);
// 130: width
checkbox2
->
SetWidth
(
130
);
// 130: width
checkbox2
->
SetHeight
(
130
);
// 130: height
checkbox2
->
SetHeight
(
130
);
// 130: height
checkbox2
->
SetViewId
(
UI_TEST_CHECKBOX_SETIMAGE_2
);
checkbox2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
checkbox2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
UICheckBox
*
checkbox3
=
new
UICheckBox
();
UICheckBox
*
checkbox3
=
new
UICheckBox
();
checkbox3
->
SetPosition
(
350
,
430
);
// 350: x-coordinate, 430: y-coordinate
checkbox3
->
SetPosition
(
350
,
430
);
// 350: x-coordinate, 430: y-coordinate
checkbox3
->
SetViewId
(
UI_TEST_CHECKBOX_SETIMAGE_3
);
UICheckBox
*
checkbox4
=
new
UICheckBox
();
UICheckBox
*
checkbox4
=
new
UICheckBox
();
checkbox4
->
SetPosition
(
450
,
430
);
// 450: x-coordinate, 430: y-coordinate
checkbox4
->
SetPosition
(
450
,
430
);
// 450: x-coordinate, 430: y-coordinate
checkbox4
->
SetViewId
(
UI_TEST_CHECKBOX_SETIMAGE_4
);
container_
->
Add
(
checkbox
);
container_
->
Add
(
checkbox
);
container_
->
Add
(
checkbox2
);
container_
->
Add
(
checkbox2
);
...
@@ -329,18 +336,21 @@ void UITestBUTTON::UIKitRadioButtonTest002() const
...
@@ -329,18 +336,21 @@ void UITestBUTTON::UIKitRadioButtonTest002() const
label
->
SetPosition
(
TEXT_DISTANCE_TO_LEFT_SIDE
,
570
,
Screen
::
GetInstance
().
GetWidth
(),
label
->
SetPosition
(
TEXT_DISTANCE_TO_LEFT_SIDE
,
570
,
Screen
::
GetInstance
().
GetWidth
(),
TITLE_LABEL_DEFAULT_HEIGHT
);
TITLE_LABEL_DEFAULT_HEIGHT
);
label
->
SetText
(
"radiobutton SetImage功能"
);
label
->
SetText
(
"radiobutton SetImage功能"
);
label
->
SetViewId
(
"radiobuttonLabel"
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
UIRadioButton
*
radioButton
=
new
UIRadioButton
(
"aaa"
);
UIRadioButton
*
radioButton
=
new
UIRadioButton
(
"aaa"
);
radioButton
->
SetPosition
(
30
,
10
);
// 30: x-coordinate, 10: y-coordinate
radioButton
->
SetPosition
(
30
,
10
);
// 30: x-coordinate, 10: y-coordinate
radioButton
->
SetWidth
(
130
);
// 130: width
radioButton
->
SetWidth
(
130
);
// 130: width
radioButton
->
SetHeight
(
130
);
// 130: height
radioButton
->
SetHeight
(
130
);
// 130: height
radioButton
->
SetViewId
(
UI_TEST_RADIO_SETIMAGE_1
);
radioButton
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
radioButton
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
UIRadioButton
*
radioButton2
=
new
UIRadioButton
(
"aaa"
);
UIRadioButton
*
radioButton2
=
new
UIRadioButton
(
"aaa"
);
radioButton2
->
SetPosition
(
200
,
10
);
// 200: x-coordinate, 10: y-coordinate
radioButton2
->
SetPosition
(
200
,
10
);
// 200: x-coordinate, 10: y-coordinate
radioButton2
->
SetWidth
(
130
);
// 130: width
radioButton2
->
SetWidth
(
130
);
// 130: width
radioButton2
->
SetHeight
(
130
);
// 130: height
radioButton2
->
SetHeight
(
130
);
// 130: height
radioButton2
->
SetViewId
(
UI_TEST_RADIO_SETIMAGE_2
);
radioButton2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
radioButton2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
OHOS
::
UIViewGroup
*
viewGroup
=
new
UIViewGroup
();
OHOS
::
UIViewGroup
*
viewGroup
=
new
UIViewGroup
();
...
@@ -365,6 +375,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
...
@@ -365,6 +375,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
label
->
SetPosition
(
TEXT_DISTANCE_TO_LEFT_SIDE
,
740
,
Screen
::
GetInstance
().
GetWidth
(),
label
->
SetPosition
(
TEXT_DISTANCE_TO_LEFT_SIDE
,
740
,
Screen
::
GetInstance
().
GetWidth
(),
TITLE_LABEL_DEFAULT_HEIGHT
);
TITLE_LABEL_DEFAULT_HEIGHT
);
label
->
SetText
(
"togglebutton SetImage功能"
);
label
->
SetText
(
"togglebutton SetImage功能"
);
label
->
SetViewId
(
"togglebuttonLabel"
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
UIToggleButton
*
togglebutton
=
new
UIToggleButton
();
UIToggleButton
*
togglebutton
=
new
UIToggleButton
();
...
@@ -373,6 +384,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
...
@@ -373,6 +384,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
togglebutton
->
SetState
(
true
);
togglebutton
->
SetState
(
true
);
togglebutton
->
SetWidth
(
130
);
// 130: width
togglebutton
->
SetWidth
(
130
);
// 130: width
togglebutton
->
SetHeight
(
130
);
// 130: height
togglebutton
->
SetHeight
(
130
);
// 130: height
togglebutton
->
SetViewId
(
UI_TEST_TOGGLE_SETIMAGE_1
);
togglebutton
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
togglebutton
->
SetImages
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
UIToggleButton
*
togglebutton2
=
new
UIToggleButton
();
UIToggleButton
*
togglebutton2
=
new
UIToggleButton
();
...
@@ -381,6 +393,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
...
@@ -381,6 +393,7 @@ void UITestBUTTON::UIKitToggleButtonTest002()
togglebutton2
->
SetState
(
false
);
togglebutton2
->
SetState
(
false
);
togglebutton2
->
SetWidth
(
130
);
// 130: width
togglebutton2
->
SetWidth
(
130
);
// 130: width
togglebutton2
->
SetHeight
(
130
);
// 130: height
togglebutton2
->
SetHeight
(
130
);
// 130: height
togglebutton2
->
SetViewId
(
UI_TEST_TOGGLE_SETIMAGE_2
);
togglebutton2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
togglebutton2
->
SetImages
(
GREEN_IMAGE_PATH
,
RED_IMAGE_PATH
);
container_
->
Add
(
togglebutton
);
container_
->
Add
(
togglebutton
);
...
@@ -611,7 +624,7 @@ UILabel* GetTestUILabel(const char* titlename)
...
@@ -611,7 +624,7 @@ UILabel* GetTestUILabel(const char* titlename)
return
label
;
return
label
;
}
}
UILabelButton
*
GetTestUIButton
(
const
char
*
buttonText
,
int16_t
x
,
int16_t
y
,
UIButton
*
button
)
UILabelButton
*
GetTestUIButton
(
const
char
*
buttonText
,
int16_t
x
,
int16_t
y
,
UIButton
*
button
,
const
char
*
id
)
{
{
if
(
buttonText
==
nullptr
)
{
if
(
buttonText
==
nullptr
)
{
return
nullptr
;
return
nullptr
;
...
@@ -622,6 +635,7 @@ UILabelButton* GetTestUIButton(const char* buttonText, int16_t x, int16_t y, UIB
...
@@ -622,6 +635,7 @@ UILabelButton* GetTestUIButton(const char* buttonText, int16_t x, int16_t y, UIB
labelButton
->
SetPosition
(
x
,
y
);
labelButton
->
SetPosition
(
x
,
y
);
labelButton
->
Resize
(
BUTTON_WIDHT1
,
BUTTON_HEIGHT1
);
labelButton
->
Resize
(
BUTTON_WIDHT1
,
BUTTON_HEIGHT1
);
labelButton
->
SetText
(
buttonText
);
labelButton
->
SetText
(
buttonText
);
labelButton
->
SetViewId
(
id
);
labelButton
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
labelButton
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
labelButton
->
SetStyleForState
(
STYLE_BORDER_RADIUS
,
BUTTON_STYLE_BORDER_RADIUS_VALUE
,
UIButton
::
PRESSED
);
labelButton
->
SetStyleForState
(
STYLE_BORDER_RADIUS
,
BUTTON_STYLE_BORDER_RADIUS_VALUE
,
UIButton
::
PRESSED
);
labelButton
->
SetStyleForState
(
STYLE_BORDER_RADIUS
,
BUTTON_STYLE_BORDER_RADIUS_VALUE
,
UIButton
::
INACTIVE
);
labelButton
->
SetStyleForState
(
STYLE_BORDER_RADIUS
,
BUTTON_STYLE_BORDER_RADIUS_VALUE
,
UIButton
::
INACTIVE
);
...
@@ -636,7 +650,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -636,7 +650,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
if
((
container
==
nullptr
)
||
(
button
==
nullptr
))
{
if
((
container
==
nullptr
)
||
(
button
==
nullptr
))
{
return
;
return
;
}
}
UILabelButton
*
button8
=
GetTestUIButton
(
"隐藏"
,
430
,
940
,
button
);
// 430: x-coordinate, 940: y-coordinate
UILabelButton
*
button8
=
GetTestUIButton
(
"隐藏"
,
430
,
940
,
button
,
UI_TEST_BUTTON_7
);
// 430: x-coordinate, 940: y-coordinate
if
(
clickEnableVisiableListener_
==
nullptr
)
{
if
(
clickEnableVisiableListener_
==
nullptr
)
{
clickEnableVisiableListener_
=
clickEnableVisiableListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -644,7 +659,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -644,7 +659,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button8
->
SetOnClickListener
(
clickEnableVisiableListener_
);
button8
->
SetOnClickListener
(
clickEnableVisiableListener_
);
UILabelButton
*
button9
=
GetTestUIButton
(
"显示"
,
430
,
990
,
button
);
// 430: x-coordinate, 990: y-coordinate
UILabelButton
*
button9
=
GetTestUIButton
(
"显示"
,
430
,
990
,
button
,
UI_TEST_BUTTON_8
);
// 430: x-coordinate, 990: y-coordinate
if
(
clickDisableVisiableListener_
==
nullptr
)
{
if
(
clickDisableVisiableListener_
==
nullptr
)
{
clickDisableVisiableListener_
=
clickDisableVisiableListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -652,7 +668,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -652,7 +668,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button9
->
SetOnClickListener
(
clickDisableVisiableListener_
);
button9
->
SetOnClickListener
(
clickDisableVisiableListener_
);
UILabelButton
*
button10
=
GetTestUIButton
(
"可触摸 "
,
520
,
940
,
button
);
// 520: x-coordinate, 940: y-coordinate
UILabelButton
*
button10
=
GetTestUIButton
(
"可触摸 "
,
520
,
940
,
button
,
UI_TEST_BUTTON_9
);
// 520: x-coordinate, 940: y-coordinate
if
(
clickEnableTouchableListener_
==
nullptr
)
{
if
(
clickEnableTouchableListener_
==
nullptr
)
{
clickEnableTouchableListener_
=
clickEnableTouchableListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -660,7 +677,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -660,7 +677,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button10
->
SetOnClickListener
(
clickEnableTouchableListener_
);
button10
->
SetOnClickListener
(
clickEnableTouchableListener_
);
UILabelButton
*
button11
=
GetTestUIButton
(
"不可触摸"
,
520
,
990
,
button
);
// 520: x-coordinate, 990: y-coordinate
UILabelButton
*
button11
=
GetTestUIButton
(
"不可触摸"
,
520
,
990
,
button
,
UI_TEST_BUTTON_10
);
// 520: x-coordinate, 990: y-coordinate
if
(
clickDisableTouchableListener_
==
nullptr
)
{
if
(
clickDisableTouchableListener_
==
nullptr
)
{
clickDisableTouchableListener_
=
clickDisableTouchableListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -668,14 +686,16 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -668,14 +686,16 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button11
->
SetOnClickListener
(
clickDisableTouchableListener_
);
button11
->
SetOnClickListener
(
clickDisableTouchableListener_
);
UILabelButton
*
button12
=
GetTestUIButton
(
"变白"
,
160
,
1040
,
button
);
// 160: x-coordinate, 1040: y-coordinate
UILabelButton
*
button12
=
GetTestUIButton
(
"变白"
,
160
,
1040
,
button
,
UI_TEST_BUTTON_11
);
// 160: x-coordinate, 1040: y-coordinate
if
(
clickColorToWhiteListener_
==
nullptr
)
{
if
(
clickColorToWhiteListener_
==
nullptr
)
{
clickColorToWhiteListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
clickColorToWhiteListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickChangeColorListener
(
reinterpret_cast
<
UIView
*>
(
button
),
0xFF
,
0xFF
,
0xFF
));
new
TestBtnOnClickChangeColorListener
(
reinterpret_cast
<
UIView
*>
(
button
),
0xFF
,
0xFF
,
0xFF
));
}
}
button12
->
SetOnClickListener
(
clickColorToWhiteListener_
);
button12
->
SetOnClickListener
(
clickColorToWhiteListener_
);
UILabelButton
*
button13
=
GetTestUIButton
(
"变红"
,
160
,
1090
,
button
);
// 160: x-coordinate, 1090: y-coordinate
UILabelButton
*
button13
=
GetTestUIButton
(
"变红"
,
160
,
1090
,
button
,
UI_TEST_BUTTON_12
);
// 160: x-coordinate, 1090: y-coordinate
if
(
clickColorToRedListener_
==
nullptr
)
{
if
(
clickColorToRedListener_
==
nullptr
)
{
clickColorToRedListener_
=
clickColorToRedListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -683,7 +703,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -683,7 +703,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button13
->
SetOnClickListener
(
clickColorToRedListener_
);
button13
->
SetOnClickListener
(
clickColorToRedListener_
);
UILabelButton
*
button14
=
GetTestUIButton
(
"色彩还原"
,
250
,
1040
,
button
);
// 250: x-coordinate, 1040: y-coordinate
UILabelButton
*
button14
=
GetTestUIButton
(
"色彩还原"
,
250
,
1040
,
button
,
UI_TEST_BUTTON_13
);
// 250: x-coordinate, 1040: y-coordinate
if
(
clickRevetColorListener_
==
nullptr
)
{
if
(
clickRevetColorListener_
==
nullptr
)
{
clickRevetColorListener_
=
clickRevetColorListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -691,7 +712,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -691,7 +712,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
}
button14
->
SetOnClickListener
(
clickRevetColorListener_
);
button14
->
SetOnClickListener
(
clickRevetColorListener_
);
UILabelButton
*
button15
=
GetTestUIButton
(
"全部还原"
,
250
,
1090
,
button
);
// 250: x-coordinate, 1090: y-coordinate
UILabelButton
*
button15
=
GetTestUIButton
(
"全部还原"
,
250
,
1090
,
button
,
UI_TEST_BUTTON_14
);
// 250: x-coordinate, 1090: y-coordinate
if
(
clickRevetToOriginListener_
==
nullptr
)
{
if
(
clickRevetToOriginListener_
==
nullptr
)
{
clickRevetToOriginListener_
=
clickRevetToOriginListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -710,7 +732,7 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -710,7 +732,7 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
#if defined(DEFAULT_ANIMATION) && DEFAULT_ANIMATION
#if defined(DEFAULT_ANIMATION) && DEFAULT_ANIMATION
// 340: x-coordinate, 1040: y-coordinate
// 340: x-coordinate, 1040: y-coordinate
UILabelButton
*
button16
=
GetTestUIButton
(
"开启动效"
,
340
,
1040
,
button
);
UILabelButton
*
button16
=
GetTestUIButton
(
"开启动效"
,
340
,
1040
,
button
,
UI_TEST_BUTTON_15
);
if
(
enableAnimationListener_
==
nullptr
)
{
if
(
enableAnimationListener_
==
nullptr
)
{
enableAnimationListener_
=
enableAnimationListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
static_cast
<
UIView
::
OnClickListener
*>
(
...
@@ -719,7 +741,7 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
...
@@ -719,7 +741,7 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
button16
->
SetOnClickListener
(
enableAnimationListener_
);
button16
->
SetOnClickListener
(
enableAnimationListener_
);
// 340: x-coordinate, 1090: y-coordinate
// 340: x-coordinate, 1090: y-coordinate
UILabelButton
*
button17
=
GetTestUIButton
(
"关闭动效"
,
340
,
1090
,
button
);
UILabelButton
*
button17
=
GetTestUIButton
(
"关闭动效"
,
340
,
1090
,
button
,
UI_TEST_BUTTON_16
);
if
(
disableAnimationListener_
==
nullptr
)
{
if
(
disableAnimationListener_
==
nullptr
)
{
disableAnimationListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
disableAnimationListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnAnimationListener
(
reinterpret_cast
<
UIView
*>
(
button
),
false
));
new
TestBtnAnimationListener
(
reinterpret_cast
<
UIView
*>
(
button
),
false
));
...
@@ -743,22 +765,26 @@ void UITestBUTTON::UIKitButtonTest001()
...
@@ -743,22 +765,26 @@ void UITestBUTTON::UIKitButtonTest001()
button
->
SetWidth
(
80
);
// 80: width
button
->
SetWidth
(
80
);
// 80: width
button
->
SetHeight
(
60
);
// 60: height
button
->
SetHeight
(
60
);
// 60: height
button
->
SetImageSrc
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
button
->
SetImageSrc
(
BLUE_IMAGE_PATH
,
YELLOW_IMAGE_PATH
);
button
->
SetViewId
(
UI_TEST_BUTTON_17
);
UILabelButton
*
button2
=
GetTestUIButton
(
"放大"
,
160
,
940
,
button
);
// 160: x-coordinate, 940: y-coordinate
UILabelButton
*
button2
=
GetTestUIButton
(
"放大"
,
160
,
940
,
button
,
UI_TEST_BUTTON_1
);
// 160: x-coordinate, 940: y-coordinate
if
(
clickBigListener_
==
nullptr
)
{
if
(
clickBigListener_
==
nullptr
)
{
clickBigListener_
=
clickBigListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickShapeChangeListener
(
button
,
CHANGE_SIZE
));
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickShapeChangeListener
(
button
,
CHANGE_SIZE
));
}
}
button2
->
SetOnClickListener
(
clickBigListener_
);
button2
->
SetOnClickListener
(
clickBigListener_
);
UILabelButton
*
button3
=
GetTestUIButton
(
"缩小"
,
160
,
990
,
button
);
// 160: x-coordinate, 990: y-coordinate
UILabelButton
*
button3
=
GetTestUIButton
(
"缩小"
,
160
,
990
,
button
,
UI_TEST_BUTTON_2
);
// 160: x-coordinate, 990: y-coordinate
if
(
clickSmallListener_
==
nullptr
)
{
if
(
clickSmallListener_
==
nullptr
)
{
clickSmallListener_
=
clickSmallListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickShapeChangeListener
(
button
,
-
CHANGE_SIZE
));
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickShapeChangeListener
(
button
,
-
CHANGE_SIZE
));
}
}
button3
->
SetOnClickListener
(
clickSmallListener_
);
button3
->
SetOnClickListener
(
clickSmallListener_
);
UILabelButton
*
button4
=
GetTestUIButton
(
"左移"
,
250
,
940
,
button
);
// 250: x-coordinate, 940: y-coordinate
UILabelButton
*
button4
=
GetTestUIButton
(
"左移"
,
250
,
940
,
button
,
UI_TEST_BUTTON_3
);
// 250: x-coordinate, 940: y-coordinate
if
(
clickLeftListener_
==
nullptr
)
{
if
(
clickLeftListener_
==
nullptr
)
{
clickLeftListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
clickLeftListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
reinterpret_cast
<
UIView
*>
(
button
),
reinterpret_cast
<
UIView
*>
(
button
),
...
@@ -766,7 +792,8 @@ void UITestBUTTON::UIKitButtonTest001()
...
@@ -766,7 +792,8 @@ void UITestBUTTON::UIKitButtonTest001()
}
}
button4
->
SetOnClickListener
(
clickLeftListener_
);
button4
->
SetOnClickListener
(
clickLeftListener_
);
UILabelButton
*
button5
=
GetTestUIButton
(
"右移"
,
250
,
990
,
button
);
// 250: x-coordinate, 990: y-coordinate
UILabelButton
*
button5
=
GetTestUIButton
(
"右移"
,
250
,
990
,
button
,
UI_TEST_BUTTON_4
);
// 250: x-coordinate, 990: y-coordinate
button5
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
button5
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
if
(
clickRightListener_
==
nullptr
)
{
if
(
clickRightListener_
==
nullptr
)
{
clickRightListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
clickRightListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
...
@@ -775,7 +802,8 @@ void UITestBUTTON::UIKitButtonTest001()
...
@@ -775,7 +802,8 @@ void UITestBUTTON::UIKitButtonTest001()
}
}
button5
->
SetOnClickListener
(
clickRightListener_
);
button5
->
SetOnClickListener
(
clickRightListener_
);
UILabelButton
*
button6
=
GetTestUIButton
(
"上移"
,
340
,
940
,
button
);
// 340: x-coordinate, 940: y-coordinate
UILabelButton
*
button6
=
GetTestUIButton
(
"上移"
,
340
,
940
,
button
,
UI_TEST_BUTTON_5
);
// 340: x-coordinate, 940: y-coordinate
button6
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
button6
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
if
(
clickUpListener_
==
nullptr
)
{
if
(
clickUpListener_
==
nullptr
)
{
clickUpListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
clickUpListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
...
@@ -784,7 +812,8 @@ void UITestBUTTON::UIKitButtonTest001()
...
@@ -784,7 +812,8 @@ void UITestBUTTON::UIKitButtonTest001()
}
}
button6
->
SetOnClickListener
(
clickUpListener_
);
button6
->
SetOnClickListener
(
clickUpListener_
);
UILabelButton
*
button7
=
GetTestUIButton
(
"下移"
,
340
,
990
,
button
);
// 340: x-coordinate, 990: y-coordinate
UILabelButton
*
button7
=
GetTestUIButton
(
"下移"
,
340
,
990
,
button
,
UI_TEST_BUTTON_6
);
// 340: x-coordinate, 990: y-coordinate
if
(
clickDownListener_
==
nullptr
)
{
if
(
clickDownListener_
==
nullptr
)
{
clickDownListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
clickDownListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnOnClickPositionChangeListener
(
reinterpret_cast
<
UIView
*>
(
button
),
reinterpret_cast
<
UIView
*>
(
button
),
...
...
test/uitest/test_button/ui_test_button.h
浏览文件 @
2f7360fe
...
@@ -22,6 +22,41 @@
...
@@ -22,6 +22,41 @@
#include "ui_test.h"
#include "ui_test.h"
namespace
OHOS
{
namespace
OHOS
{
constexpr
char
*
UI_TEST_CHECKBOX_1
=
"testCheckBox1"
;
constexpr
char
*
UI_TEST_CHECKBOX_2
=
"testCheckBox2"
;
constexpr
char
*
UI_TEST_CHECKBOX_3
=
"testCheckBox3"
;
constexpr
char
*
UI_TEST_RADIO_BUTTON_1
=
"testRadioButton1"
;
constexpr
char
*
UI_TEST_RADIO_BUTTON_2
=
"testRadioButton2"
;
constexpr
char
*
UI_TEST_RADIO_BUTTON_3
=
"testRadioButton3"
;
constexpr
char
*
UI_TEST_TOGGLE_BUTTON_1
=
"testToggleButton1"
;
constexpr
char
*
UI_TEST_TOGGLE_BUTTON_2
=
"testToggleButton2"
;
constexpr
char
*
UI_TEST_TOGGLE_BUTTON_3
=
"testToggleButton3"
;
constexpr
char
*
UI_TEST_CHECKBOX_SETIMAGE_1
=
"checkBoxSetImage1"
;
constexpr
char
*
UI_TEST_CHECKBOX_SETIMAGE_2
=
"checkBoxSetImage2"
;
constexpr
char
*
UI_TEST_CHECKBOX_SETIMAGE_3
=
"checkBoxSetImage3"
;
constexpr
char
*
UI_TEST_CHECKBOX_SETIMAGE_4
=
"checkBoxSetImage4"
;
constexpr
char
*
UI_TEST_RADIO_SETIMAGE_1
=
"radioButtonSetImage1"
;
constexpr
char
*
UI_TEST_RADIO_SETIMAGE_2
=
"radioButtonSetImage2"
;
constexpr
char
*
UI_TEST_TOGGLE_SETIMAGE_1
=
"toggleButtonSetImage1"
;
constexpr
char
*
UI_TEST_TOGGLE_SETIMAGE_2
=
"toggleButtonSetImage2"
;
constexpr
char
*
UI_TEST_BUTTON_1
=
"enlarge"
;
constexpr
char
*
UI_TEST_BUTTON_2
=
"narrow"
;
constexpr
char
*
UI_TEST_BUTTON_3
=
"goLeft"
;
constexpr
char
*
UI_TEST_BUTTON_4
=
"goRight"
;
constexpr
char
*
UI_TEST_BUTTON_5
=
"goUp"
;
constexpr
char
*
UI_TEST_BUTTON_6
=
"goDown"
;
constexpr
char
*
UI_TEST_BUTTON_7
=
"hide"
;
constexpr
char
*
UI_TEST_BUTTON_8
=
"display"
;
constexpr
char
*
UI_TEST_BUTTON_9
=
"touchable"
;
constexpr
char
*
UI_TEST_BUTTON_10
=
"untouchable"
;
constexpr
char
*
UI_TEST_BUTTON_11
=
"white"
;
constexpr
char
*
UI_TEST_BUTTON_12
=
"red"
;
constexpr
char
*
UI_TEST_BUTTON_13
=
"resetColor"
;
constexpr
char
*
UI_TEST_BUTTON_14
=
"resetAll"
;
constexpr
char
*
UI_TEST_BUTTON_15
=
"animation"
;
constexpr
char
*
UI_TEST_BUTTON_16
=
"noAnimation"
;
constexpr
char
*
UI_TEST_BUTTON_17
=
"buttonWithImage"
;
class
UITestBUTTON
:
public
UITest
{
class
UITestBUTTON
:
public
UITest
{
public:
public:
UITestBUTTON
()
{}
UITestBUTTON
()
{}
...
@@ -69,6 +104,7 @@ private:
...
@@ -69,6 +104,7 @@ private:
void
UIKitButtonTest002
(
UIScrollView
*
container
,
UIButton
*
button
);
void
UIKitButtonTest002
(
UIScrollView
*
container
,
UIButton
*
button
);
UIViewGroup
*
CreateButtonGroup
(
int16_t
posX
,
int16_t
posY
,
int16_t
width
,
int16_t
height
,
UIViewGroup
*
CreateButtonGroup
(
int16_t
posX
,
int16_t
posY
,
int16_t
width
,
int16_t
height
,
UICheckBox
::
OnChangeListener
**
listener
,
UICheckBox
::
OnChangeListener
**
listener
,
const
char
*
id
=
nullptr
,
UIViewType
type
=
UI_CHECK_BOX
,
UIViewType
type
=
UI_CHECK_BOX
,
const
char
*
name
=
"aa"
);
const
char
*
name
=
"aa"
);
static
constexpr
int16_t
CHANGE_SIZE
=
10
;
static
constexpr
int16_t
CHANGE_SIZE
=
10
;
...
...
test/uitest/test_clip/ui_test_clip.cpp
浏览文件 @
2f7360fe
...
@@ -209,14 +209,14 @@ void UITestClip::UIKitClipTest002()
...
@@ -209,14 +209,14 @@ void UITestClip::UIKitClipTest002()
int16_t
x
=
VIEW_DISTANCE_TO_LEFT_SIDE
+
BLOCK_WIDTH
+
GAP
;
int16_t
x
=
VIEW_DISTANCE_TO_LEFT_SIDE
+
BLOCK_WIDTH
+
GAP
;
int16_t
y
=
positionY_
;
int16_t
y
=
positionY_
;
btnStartAngleInc_
=
new
UILabelButton
();
btnStartAngleInc_
=
new
UILabelButton
();
SetUpButton
(
btnStartAngleInc_
,
"起始角度+"
,
x
,
y
);
SetUpButton
(
btnStartAngleInc_
,
"起始角度+"
,
x
,
y
,
UI_TEST_ARC_1
);
btnStartAngleDec_
=
new
UILabelButton
();
btnStartAngleDec_
=
new
UILabelButton
();
SetUpButton
(
btnStartAngleDec_
,
"起始角度-"
,
x
+
BUTTON_WIDHT2
+
GAP
,
y
);
SetUpButton
(
btnStartAngleDec_
,
"起始角度-"
,
x
+
BUTTON_WIDHT2
+
GAP
,
y
,
UI_TEST_ARC_2
);
btnEndAngleInc_
=
new
UILabelButton
();
btnEndAngleInc_
=
new
UILabelButton
();
y
+=
BUTTON_HEIGHT2
+
GAP
;
y
+=
BUTTON_HEIGHT2
+
GAP
;
SetUpButton
(
btnEndAngleInc_
,
"结束角度+"
,
x
,
y
);
SetUpButton
(
btnEndAngleInc_
,
"结束角度+"
,
x
,
y
,
UI_TEST_ARC_3
);
btnEndAngleDec_
=
new
UILabelButton
();
btnEndAngleDec_
=
new
UILabelButton
();
SetUpButton
(
btnEndAngleDec_
,
"结束角度-"
,
x
+
BUTTON_WIDHT2
+
GAP
,
y
);
SetUpButton
(
btnEndAngleDec_
,
"结束角度-"
,
x
+
BUTTON_WIDHT2
+
GAP
,
y
,
UI_TEST_ARC_4
);
ClipPath
path
;
ClipPath
path
;
// {80, 80}: center; 50: radius
// {80, 80}: center; 50: radius
...
...
test/uitest/test_clip/ui_test_clip.h
浏览文件 @
2f7360fe
...
@@ -27,6 +27,10 @@ constexpr char* UI_TEST_RADIUS_1 = "radius+1";
...
@@ -27,6 +27,10 @@ constexpr char* UI_TEST_RADIUS_1 = "radius+1";
constexpr
char
*
UI_TEST_RADIUS_2
=
"radius-1"
;
constexpr
char
*
UI_TEST_RADIUS_2
=
"radius-1"
;
constexpr
char
*
UI_TEST_RADIUS_3
=
"radius+5"
;
constexpr
char
*
UI_TEST_RADIUS_3
=
"radius+5"
;
constexpr
char
*
UI_TEST_RADIUS_4
=
"radius-5"
;
constexpr
char
*
UI_TEST_RADIUS_4
=
"radius-5"
;
constexpr
char
*
UI_TEST_ARC_1
=
"startAngle+1"
;
constexpr
char
*
UI_TEST_ARC_2
=
"startAngle-1"
;
constexpr
char
*
UI_TEST_ARC_3
=
"endAngle+1"
;
constexpr
char
*
UI_TEST_ARC_4
=
"endAngle-1"
;
class
UITestClip
:
public
UITest
,
public
UIView
::
OnClickListener
{
class
UITestClip
:
public
UITest
,
public
UIView
::
OnClickListener
{
public:
public:
UITestClip
()
{}
UITestClip
()
{}
...
...
test/uitest/test_edit_text/custom_input_method.cpp
浏览文件 @
2f7360fe
...
@@ -169,6 +169,7 @@ void CustomInputMethod::SetupView(KeyboardType type)
...
@@ -169,6 +169,7 @@ void CustomInputMethod::SetupView(KeyboardType type)
container_
->
Add
(
inputTypeBtn_
);
container_
->
Add
(
inputTypeBtn_
);
inputTypeBtn_
->
Resize
(
100
,
40
);
// 100: width, 40: height
inputTypeBtn_
->
Resize
(
100
,
40
);
// 100: width, 40: height
inputTypeBtn_
->
SetText
(
"toggle"
);
inputTypeBtn_
->
SetText
(
"toggle"
);
inputTypeBtn_
->
SetViewId
(
UI_TEST_KEY_INPUT
);
inputTypeBtn_
->
LayoutRightToSibling
(
"Input_edit_text_view"
,
10
);
// 10: offset
inputTypeBtn_
->
LayoutRightToSibling
(
"Input_edit_text_view"
,
10
);
// 10: offset
inputTypeBtn_
->
SetOnClickListener
(
this
);
inputTypeBtn_
->
SetOnClickListener
(
this
);
inputTypeBtn_
->
SetStyleForState
(
STYLE_BACKGROUND_COLOR
,
BUTTON_STYLE_BACKGROUND_COLOR_VALUE
,
inputTypeBtn_
->
SetStyleForState
(
STYLE_BACKGROUND_COLOR
,
BUTTON_STYLE_BACKGROUND_COLOR_VALUE
,
...
@@ -239,6 +240,7 @@ UILabelButton* CustomInputMethod::SetupButton(const char* title)
...
@@ -239,6 +240,7 @@ UILabelButton* CustomInputMethod::SetupButton(const char* title)
{
{
UILabelButton
*
keyBtn
=
new
UILabelButton
();
UILabelButton
*
keyBtn
=
new
UILabelButton
();
keyBtn
->
SetText
(
title
);
keyBtn
->
SetText
(
title
);
keyBtn
->
SetViewId
(
title
);
keyBtn
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
BUTTON_LABEL_SIZE
);
keyBtn
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
BUTTON_LABEL_SIZE
);
keyBtn
->
SetStyle
(
STYLE_MARGIN_LEFT
,
KEY_MARGIN_LEFT
);
keyBtn
->
SetStyle
(
STYLE_MARGIN_LEFT
,
KEY_MARGIN_LEFT
);
keyBtn
->
SetOnClickListener
(
this
);
keyBtn
->
SetOnClickListener
(
this
);
...
...
test/uitest/test_edit_text/custom_input_method.h
浏览文件 @
2f7360fe
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "ui_test.h"
#include "ui_test.h"
namespace
OHOS
{
namespace
OHOS
{
constexpr
char
*
UI_TEST_KEY_INPUT
=
"toggle"
;
enum
class
KeyboardType
{
enum
class
KeyboardType
{
LOW_CASE
,
LOW_CASE
,
UPPER_CASE
,
UPPER_CASE
,
...
...
test/uitest/test_edit_text/ui_test_edit_text.h
浏览文件 @
2f7360fe
...
@@ -24,6 +24,11 @@
...
@@ -24,6 +24,11 @@
#include "ui_test.h"
#include "ui_test.h"
namespace
OHOS
{
namespace
OHOS
{
constexpr
char
*
UI_TEST_EDIT_TEXT_1
=
"editName"
;
constexpr
char
*
UI_TEST_EDIT_TEXT_2
=
"inputName"
;
constexpr
char
*
UI_TEST_EDIT_TEXT_3
=
"editPwd"
;
constexpr
char
*
UI_TEST_EDIT_TEXT_4
=
"inputPwd"
;
constexpr
char
*
UI_TEST_EDIT_TEXT_5
=
"redPwd"
;
class
UITestEditText
:
public
UITest
,
public
UIView
::
OnClickListener
,
public
UIEditText
::
OnChangeListener
{
class
UITestEditText
:
public
UITest
,
public
UIView
::
OnClickListener
,
public
UIEditText
::
OnChangeListener
{
public:
public:
UITestEditText
()
{}
UITestEditText
()
{}
...
...
test/uitest/test_view_zindex/ui_test_view_zindex.cpp
浏览文件 @
2f7360fe
...
@@ -43,7 +43,8 @@ const ZIndexBtn ZINDEX_BTN_GROUP[ZINDEX_BTN_NUM] = {{"zIndex->-1", -1}, {"zIndex
...
@@ -43,7 +43,8 @@ const ZIndexBtn ZINDEX_BTN_GROUP[ZINDEX_BTN_NUM] = {{"zIndex->-1", -1}, {"zIndex
const
ZIndexView
ZINDEX_VIEW_GROUP
[
ZINDEX_VIEW_NUM
]
=
{
const
ZIndexView
ZINDEX_VIEW_GROUP
[
ZINDEX_VIEW_NUM
]
=
{
{
"zIndex=6"
,
6
,
Color
::
Blue
()},
{
"zIndex=4"
,
4
,
Color
::
Blue
()},
{
"zIndex=2"
,
2
,
Color
::
Blue
()},
{
"zIndex=6"
,
6
,
Color
::
Blue
()},
{
"zIndex=4"
,
4
,
Color
::
Blue
()},
{
"zIndex=2"
,
2
,
Color
::
Blue
()},
{
"A.zIndex=0"
,
0
,
Color
::
Magenta
()},
{
"B.zIndex=0"
,
0
,
Color
::
Magenta
()},
{
"C.zIndex=0"
,
0
,
Color
::
Magenta
()}};
{
"A.zIndex=0"
,
0
,
Color
::
Magenta
()},
{
"B.zIndex=0"
,
0
,
Color
::
Magenta
()},
{
"C.zIndex=0"
,
0
,
Color
::
Magenta
()}};
const
char
*
ZINDEX_BTN_VIEWID_GROUP
[
ZINDEX_BTN_NUM
]
=
{
"zIndex=-1"
,
"zIndex=0"
,
"zIndex=1"
,
"zIndex=2"
,
"zIndex=3"
,
"zIndex=4"
,
"zIndex=5"
,
"zIndex=7"
};
const
char
*
MODIFY_INSERT_HEAD
=
"InsertHead"
;
const
char
*
MODIFY_INSERT_HEAD
=
"InsertHead"
;
const
char
*
MODIFY_INSERT_TAIL
=
"InsertTail"
;
const
char
*
MODIFY_INSERT_TAIL
=
"InsertTail"
;
const
char
*
MODIFY_AFTER_ZINDEX_4
=
"AfterZIndex=4"
;
const
char
*
MODIFY_AFTER_ZINDEX_4
=
"AfterZIndex=4"
;
...
@@ -119,13 +120,13 @@ UILabel* UITestViewZIndex::CreateZIndexLabel(const char* text, int16_t zIndex, C
...
@@ -119,13 +120,13 @@ UILabel* UITestViewZIndex::CreateZIndexLabel(const char* text, int16_t zIndex, C
return
label
;
return
label
;
}
}
UILabelButton
*
UITestViewZIndex
::
CreateZIndexBtn
(
const
char
*
text
)
UILabelButton
*
UITestViewZIndex
::
CreateZIndexBtn
(
const
char
*
text
,
const
char
*
viewId
)
{
{
UILabelButton
*
btn
=
new
UILabelButton
();
UILabelButton
*
btn
=
new
UILabelButton
();
btn
->
Resize
(
120
,
40
);
// 120: width 40:height
btn
->
Resize
(
120
,
40
);
// 120: width 40:height
btn
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
15
);
// 15: font size
btn
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
15
);
// 15: font size
btn
->
SetText
(
text
);
btn
->
SetText
(
text
);
btn
->
SetViewId
(
text
);
btn
->
SetViewId
(
viewId
);
btn
->
SetOnClickListener
(
this
);
btn
->
SetOnClickListener
(
this
);
return
btn
;
return
btn
;
}
}
...
@@ -152,7 +153,7 @@ void UITestViewZIndex::ClickZIndexBtn(UIView& view)
...
@@ -152,7 +153,7 @@ void UITestViewZIndex::ClickZIndexBtn(UIView& view)
}
}
const
char
*
id
=
view
.
GetViewId
();
const
char
*
id
=
view
.
GetViewId
();
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_BTN_NUM
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_BTN_NUM
;
i
++
)
{
if
(
strcmp
(
id
,
ZINDEX_BTN_
GROUP
[
i
].
text
)
==
0
)
{
if
(
strcmp
(
id
,
ZINDEX_BTN_
VIEWID_GROUP
[
i
]
)
==
0
)
{
zIndexView
->
SetZIndex
(
ZINDEX_BTN_GROUP
[
i
].
zIndex
);
zIndexView
->
SetZIndex
(
ZINDEX_BTN_GROUP
[
i
].
zIndex
);
}
}
}
}
...
@@ -314,13 +315,13 @@ void UITestViewZIndex::SetupZIndexBtn()
...
@@ -314,13 +315,13 @@ void UITestViewZIndex::SetupZIndexBtn()
group
->
Add
(
clickHint
);
group
->
Add
(
clickHint
);
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_BTN_NUM
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_BTN_NUM
;
i
++
)
{
UILabelButton
*
zIndexBtn
=
CreateZIndexBtn
(
ZINDEX_BTN_GROUP
[
i
].
text
);
UILabelButton
*
zIndexBtn
=
CreateZIndexBtn
(
ZINDEX_BTN_GROUP
[
i
].
text
,
ZINDEX_BTN_VIEWID_GROUP
[
i
]
);
group
->
Add
(
zIndexBtn
);
group
->
Add
(
zIndexBtn
);
if
(
i
==
0
)
{
if
(
i
==
0
)
{
zIndexBtn
->
SetPosition
(
0
,
50
);
// 50: offset y
zIndexBtn
->
SetPosition
(
0
,
50
);
// 50: offset y
}
else
{
}
else
{
zIndexBtn
->
LayoutBottomToSibling
(
ZINDEX_BTN_
GROUP
[
i
-
1
].
text
,
BUTTON_OFFSET
);
zIndexBtn
->
LayoutBottomToSibling
(
ZINDEX_BTN_
VIEWID_GROUP
[
i
-
1
]
,
BUTTON_OFFSET
);
zIndexBtn
->
AlignLeftToSibling
(
ZINDEX_BTN_
GROUP
[
i
-
1
].
text
);
zIndexBtn
->
AlignLeftToSibling
(
ZINDEX_BTN_
VIEWID_GROUP
[
i
-
1
]
);
}
}
}
}
}
}
...
@@ -335,7 +336,7 @@ void UITestViewZIndex::SetupChildModifyBtn()
...
@@ -335,7 +336,7 @@ void UITestViewZIndex::SetupChildModifyBtn()
group
->
LayoutRightToSibling
(
ID_ZINDEX_BUTTON_VG
);
group
->
LayoutRightToSibling
(
ID_ZINDEX_BUTTON_VG
);
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_MODIFY_NUM
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
ZINDEX_MODIFY_NUM
;
i
++
)
{
UILabelButton
*
zIndexModifyBtn
=
CreateZIndexBtn
(
ZINDEX_MODIFY_GROUP
[
i
]);
UILabelButton
*
zIndexModifyBtn
=
CreateZIndexBtn
(
ZINDEX_MODIFY_GROUP
[
i
]
,
ZINDEX_MODIFY_GROUP
[
i
]
);
zIndexModifyBtn
->
SetWidth
(
150
);
// 150: width
zIndexModifyBtn
->
SetWidth
(
150
);
// 150: width
group
->
Add
(
zIndexModifyBtn
);
group
->
Add
(
zIndexModifyBtn
);
if
(
i
==
0
)
{
if
(
i
==
0
)
{
...
...
test/uitest/test_view_zindex/ui_test_view_zindex.h
浏览文件 @
2f7360fe
...
@@ -38,7 +38,7 @@ public:
...
@@ -38,7 +38,7 @@ public:
private:
private:
UILabel
*
CreateTitleLabel
()
const
;
UILabel
*
CreateTitleLabel
()
const
;
UILabel
*
CreateZIndexLabel
(
const
char
*
text
,
int16_t
zIndex
,
ColorType
color
);
UILabel
*
CreateZIndexLabel
(
const
char
*
text
,
int16_t
zIndex
,
ColorType
color
);
UILabelButton
*
CreateZIndexBtn
(
const
char
*
text
);
UILabelButton
*
CreateZIndexBtn
(
const
char
*
text
,
const
char
*
viewId
);
void
SetupZIndexView
();
void
SetupZIndexView
();
void
SetupZIndexBtn
();
void
SetupZIndexBtn
();
void
SetupChildModifyBtn
();
void
SetupChildModifyBtn
();
...
...
tools/server/test_case/button_auto_test.json
浏览文件 @
2f7360fe
{
{
"testInfo"
:
[
"testInfo"
:
[
{
{
"className"
:
"
clip_test_radius_
01"
,
"className"
:
"
UIKit_Button_Test_0
01"
,
"pageNav"
:
[
"
Clip
"
],
"pageNav"
:
[
"
Button
"
],
"testSteps"
:
[
"testSteps"
:
[
{
{
"viewID"
:
"
radius+
1"
,
"viewID"
:
"
testCheckBox
1"
,
"eventID"
:
0
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
"saveCheckPoint"
:
true
},
},
{
{
"viewID"
:
"radius-1"
,
"viewID"
:
"testCheckBox2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testCheckBox3"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testRadioButton1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testRadioButton2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testRadioButton3"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testToggleButton1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testToggleButton2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"testToggleButton3"
,
"eventID"
:
0
,
"saveCheckPoint"
:
true
}
]
},
{
"className"
:
"UIKit_Button_Test_002"
,
"pageNav"
:
[
"Button"
],
"testSteps"
:
[
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-350
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"checkBoxSetImage1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"checkBoxSetImage2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"checkBoxSetImage3"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"checkBoxSetImage4"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"radioButtonSetImage1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"radioButtonSetImage2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-350
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"toggleButtonSetImage1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"toggleButtonSetImage2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
}
]
},
{
"className"
:
"UIKit_Button_Test_003"
,
"pageNav"
:
[
"Button"
],
"testSteps"
:
[
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-800
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"resetAll"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"enlarge"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"goLeft"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"goUp"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"resetAll"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"narrow"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"goRight"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"goDown"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"red"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"white"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"resetColor"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"touchable"
,
"eventID"
:
0
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
"saveCheckPoint"
:
true
...
...
tools/server/test_case/clip_auto_test.json
浏览文件 @
2f7360fe
...
@@ -15,24 +15,72 @@
...
@@ -15,24 +15,72 @@
"eventID"
:
0
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
"saveCheckPoint"
:
true
},
{
"viewID"
:
"radius+1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"radius-1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
}
}
]
]
},
},
{
{
"className"
:
"clip_test_radius_0
1
"
,
"className"
:
"clip_test_radius_0
2
"
,
"pageNav"
:
[
"Clip"
],
"pageNav"
:
[
"Clip"
],
"testSteps"
:
[
"testSteps"
:
[
{
{
"viewID"
:
"radius+1"
,
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-100
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"startAngle+1"
,
"eventID"
:
0
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
"saveCheckPoint"
:
true
},
},
{
{
"viewID"
:
"
radius-
1"
,
"viewID"
:
"
endAngle+
1"
,
"eventID"
:
0
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
"saveCheckPoint"
:
true
},
{
"viewID"
:
"startAngle-1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"endAngle-1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-100
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-100
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-100
],
"saveCheckPoint"
:
true
}
}
]
]
}
}
...
...
tools/server/test_case/editText_auto_test.json
0 → 100644
浏览文件 @
2f7360fe
{
"testInfo"
:
[
{
"className"
:
"UIKit_UIEditText_Test_Display_001"
,
"pageNav"
:
[
"EditText"
],
"testSteps"
:
[
{
"viewID"
:
"editText1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"o"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"h"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"o"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"s"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"editText2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"shift"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"O"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"H"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"O"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"S"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"editText3"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"P"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"W"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"D"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"123"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"@"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"?"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"toggle"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"toggle"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"editText4"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"#+="
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
">"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"."
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"<"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"space"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"!"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"toggle"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"editText5"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"del"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"ABC"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"t"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"e"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"x"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"t"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"toggle"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
false
},
{
"viewID"
:
"toggle"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
}
]
}
]
}
\ No newline at end of file
tools/server/test_case/vectorFont_auto_test.json
0 → 100644
浏览文件 @
2f7360fe
{
"testInfo"
:
[
{
"className"
:
"Font_FontEngine_Vector_Test_001"
,
"pageNav"
:
[
"Vector_Font"
],
"testSteps"
:
[
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"graphic_ui_test_case_id"
,
"eventID"
:
1
,
"eventValue"
:
[
0
,
-400
],
"saveCheckPoint"
:
true
}
]
}
]
}
\ No newline at end of file
tools/server/test_case/zIndex_auto_test.json
0 → 100644
浏览文件 @
2f7360fe
{
"testInfo"
:
[
{
"className"
:
"UIKit_ViewZIndex_Test_001"
,
"pageNav"
:
[
"View zIndex"
],
"testSteps"
:
[
{
"viewID"
:
"zIndex=2"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=0"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=-1"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=3"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=5"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=7"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=4"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
}
]
},
{
"className"
:
"UIKit_ViewZIndex_Test_002"
,
"pageNav"
:
[
"View zIndex"
],
"testSteps"
:
[
{
"viewID"
:
"zIndex=4"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"InsertHead"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"InsertTail"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"InsertHead"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"AfterZindex=4"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=0"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"InsertHead"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"AfterB.Zindex=0"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"Remove"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"Reset"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"zIndex=7"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
},
{
"viewID"
:
"AnimateIn"
,
"eventID"
:
0
,
"eventValue"
:
[
1
,
2
],
"saveCheckPoint"
:
true
}
]
}
]
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录