Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d6a87ef3
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d6a87ef3
编写于
7月 01, 2023
作者:
L
limeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts文件名修改
Signed-off-by:
N
limeng
<
limeng208@huawei.com
>
上级
02f45609
变更
42
隐藏空白更改
内联
并排
Showing
42 changed file
with
311 addition
and
311 deletion
+311
-311
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/BindMenu.ets
...component_api/src/main/ets/TestAbility/pages/BindMenu.ets
+4
-4
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPI.ets
...omponent_api/src/main/ets/TestAbility/pages/CanvasAPI.ets
+2
-2
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPICanvasRender.ets
.../src/main/ets/TestAbility/pages/CanvasAPICanvasRender.ets
+2
-2
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPIUnit.ets
...nent_api/src/main/ets/TestAbility/pages/CanvasAPIUnit.ets
+2
-2
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasColor.ets
...ponent_api/src/main/ets/TestAbility/pages/CanvasColor.ets
+2
-2
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasShader.ets
...onent_api/src/main/ets/TestAbility/pages/CanvasShader.ets
+3
-3
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ImageText.ets
...omponent_api/src/main/ets/TestAbility/pages/ImageText.ets
+24
-24
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListDelete.ets
...mponent_api/src/main/ets/TestAbility/pages/ListDelete.ets
+1
-1
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListRebound.ets
...ponent_api/src/main/ets/TestAbility/pages/ListRebound.ets
+1
-1
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/NavigationParam.ets
...nt_api/src/main/ets/TestAbility/pages/NavigationParam.ets
+3
-3
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/OffScreenCanvas.ets
...nt_api/src/main/ets/TestAbility/pages/OffScreenCanvas.ets
+2
-2
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/TextAreaCallback.ets
...t_api/src/main/ets/TestAbility/pages/TextAreaCallback.ets
+3
-3
arkui/ace_ets_component_api/src/main/ets/test/BindMenu.test.ets
...ace_ets_component_api/src/main/ets/test/BindMenu.test.ets
+8
-8
arkui/ace_ets_component_api/src/main/ets/test/CanvasAPI.test.ets
...ce_ets_component_api/src/main/ets/test/CanvasAPI.test.ets
+6
-6
arkui/ace_ets_component_api/src/main/ets/test/CanvasAPICanvasRender.test.ets
...nent_api/src/main/ets/test/CanvasAPICanvasRender.test.ets
+6
-6
arkui/ace_ets_component_api/src/main/ets/test/CanvasAPIUnit.test.ets
...ts_component_api/src/main/ets/test/CanvasAPIUnit.test.ets
+6
-6
arkui/ace_ets_component_api/src/main/ets/test/CanvasColor.test.ets
..._ets_component_api/src/main/ets/test/CanvasColor.test.ets
+6
-6
arkui/ace_ets_component_api/src/main/ets/test/CanvasShader.test.ets
...ets_component_api/src/main/ets/test/CanvasShader.test.ets
+7
-7
arkui/ace_ets_component_api/src/main/ets/test/ImageText.test.ets
...ce_ets_component_api/src/main/ets/test/ImageText.test.ets
+27
-27
arkui/ace_ets_component_api/src/main/ets/test/List.test.ets
arkui/ace_ets_component_api/src/main/ets/test/List.test.ets
+24
-24
arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets
...e_ets_component_api/src/main/ets/test/ListDelete.test.ets
+5
-5
arkui/ace_ets_component_api/src/main/ets/test/ListRebound.test.ets
..._ets_component_api/src/main/ets/test/ListRebound.test.ets
+5
-5
arkui/ace_ets_component_api/src/main/ets/test/NavigationParam.test.ets
..._component_api/src/main/ets/test/NavigationParam.test.ets
+7
-7
arkui/ace_ets_component_api/src/main/ets/test/OffScreenCanvas.test.ets
..._component_api/src/main/ets/test/OffScreenCanvas.test.ets
+6
-6
arkui/ace_ets_component_api/src/main/ets/test/TextAreaCallback.test.ets
...component_api/src/main/ets/test/TextAreaCallback.test.ets
+7
-7
arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json
...onent_api/src/main/resources/base/profile/test_pages.json
+12
-12
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/CustomDialogMask.ets
..._four/src/main/ets/TestAbility/pages/CustomDialogMask.ets
+7
-7
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/ListScroll.ets
...nt_api_four/src/main/ets/TestAbility/pages/ListScroll.ets
+6
-6
arkui/ace_ets_component_api_four/src/main/ets/test/CustomDialogMask.test.ets
...nent_api_four/src/main/ets/test/CustomDialogMask.test.ets
+20
-20
arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets
...ce_ets_component_api_four/src/main/ets/test/List.test.ets
+4
-4
arkui/ace_ets_component_api_four/src/main/ets/test/ListScroll.test.ets
..._component_api_four/src/main/ets/test/ListScroll.test.ets
+9
-9
arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json
..._api_four/src/main/resources/base/profile/test_pages.json
+2
-2
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/CounterEnable.ets
...pi_three/src/main/ets/TestAbility/pages/CounterEnable.ets
+4
-4
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/TextAreaSelect.ets
...i_three/src/main/ets/TestAbility/pages/TextAreaSelect.ets
+18
-18
arkui/ace_ets_component_api_three/src/main/ets/test/CounterEnable.test.ets
...ponent_api_three/src/main/ets/test/CounterEnable.test.ets
+9
-9
arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets
...e_ets_component_api_three/src/main/ets/test/List.test.ets
+4
-4
arkui/ace_ets_component_api_three/src/main/ets/test/TextAreaSelect.test.ets
...onent_api_three/src/main/ets/test/TextAreaSelect.test.ets
+34
-34
arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json
...api_three/src/main/resources/base/profile/test_pages.json
+2
-2
arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/ShortcutKey.ets
...nt_api_two/src/main/ets/TestAbility/pages/ShortcutKey.ets
+3
-3
arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets
...ace_ets_component_api_two/src/main/ets/test/List.test.ets
+2
-2
arkui/ace_ets_component_api_two/src/main/ets/test/ShortcutKey.test.ets
..._component_api_two/src/main/ets/test/ShortcutKey.test.ets
+5
-5
arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json
...t_api_two/src/main/resources/base/profile/test_pages.json
+1
-1
未找到文件。
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HTP2K
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
BindMenu
.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Component
struct
SR000HTP2K
{
struct
BindMenu
{
@Builder MenuBuilder() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text('Test menu item 1')
...
...
@@ -38,7 +38,7 @@ struct SR000HTP2K {
Row() {
Text('placeholder')
.width("40%").height('100%')
.key('
SR000HTP2K
_placeholder')
.key('
BindMenu
_placeholder')
Text('click for Menu')
.width("60%").height('100%')
.borderWidth(1).borderColor(Color.Green).textAlign(TextAlign.Center)
...
...
@@ -82,7 +82,7 @@ struct SR000HTP2K {
events_emitter.emit(event, eventData)
}
})
.key('
SR000HTP2K
_bindMenu1')
.key('
BindMenu
_bindMenu1')
}
.width("90%").height(50).margin(10)
...
...
@@ -120,7 +120,7 @@ struct SR000HTP2K {
events_emitter.emit(event, eventData)
}
})
.key('
SR000HTP2K
_bindContextMenu1')
.key('
BindMenu
_bindContextMenu1')
}
.width("90%").height(50).margin(10)
}
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUESG_S
I.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
CanvasAP
I.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUESG_S
I {
struct
CanvasAP
I {
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
...
...
@@ -46,7 +46,7 @@ struct SR000HUESG_SI {
.height('500px')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.key('
SR000HUESG_S
I_Canvas1')
.key('
CanvasAP
I_Canvas1')
.onReady(() => {
this.noTransform()
this.transformByField1()
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUET2
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
CanvasAPICanvasRender
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUET2
{
struct
CanvasAPICanvasRender
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
...
...
@@ -27,7 +27,7 @@ struct SR000HUET2 {
.width('100%')
.height('30%')
.backgroundColor('#ffff00')
.key('
SR000HUET2
_Canvas1')
.key('
CanvasAPICanvasRender
_Canvas1')
.onReady(() => {
this.context_fillText1()
this.context_fillText2()
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUESL
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
CanvasAPIUnit
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUESL
{
struct
CanvasAPIUnit
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
...
...
@@ -27,7 +27,7 @@ struct SR000HUESL {
.width('100%')
.height('30%')
.backgroundColor('#ffff00')
.key('
SR000HUESL
_Canvas1')
.key('
CanvasAPIUnit
_Canvas1')
.onReady(() => {
this.context_font1()
this.context_font2()
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUES3
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
CanvasColor
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUES3
{
struct
CanvasColor
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private img: ImageBitmap = new ImageBitmap('/pages/images/test1.jpg')
...
...
@@ -35,7 +35,7 @@ struct SR000HUES3 {
this.strokeStyle_CanvasGradient()
this.strokeStyle_CanvasPattern()
})
.id('
SR000HUES3
_Canvas1')
.id('
CanvasColor
_Canvas1')
}
}
}
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUES7
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
CanvasShader
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUES7
{
struct
CanvasShader
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
...
...
@@ -28,7 +28,7 @@ struct SR000HUES7 {
.height('20%')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.key('
SR000HUES7
_Canvas1')
.key('
CanvasShader
_Canvas1')
.onReady(() => {
this.createConicGradient1()
this.createConicGradient2()
...
...
@@ -54,7 +54,7 @@ struct SR000HUES7 {
.height('20%')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.key('
SR000HUES7
_Canvas2')
.key('
CanvasShader
_Canvas2')
.onReady(() => {
this.clamp1()
this.clamp2()
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HR4C4
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
ImageText
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HR4C4
{
struct
ImageText
{
@State align1: ImageSpanAlignment = ImageSpanAlignment.BASELINE
@State align2: ImageSpanAlignment = ImageSpanAlignment.CENTER
@State align3: ImageSpanAlignment = ImageSpanAlignment.TOP
...
...
@@ -33,19 +33,19 @@ struct SR000HR4C4 {
Text() {
ImageSpan($r('app.media.icon')).width('114px').height("114px")
.verticalAlign(this.align1)
.key('
SR000HR4C4
_ImageSpan1')
.key('
ImageText
_ImageSpan1')
Span('Span').fontSize(this.fontSize1)
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
.verticalAlign(this.align2)
.key('
SR000HR4C4
_ImageSpan2')
.key('
ImageText
_ImageSpan2')
Span('Span').fontSize(this.fontSize2)
ImageSpan($r('app.media.icon')).width('114px').height("114px")
.verticalAlign(this.align3)
.key('
SR000HR4C4
_ImageSpan3')
.key('
ImageText
_ImageSpan3')
Span('Span').fontSize(this.fontSize3)
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
.verticalAlign(this.align4)
.key('
SR000HR4C4
_ImageSpan4')
.key('
ImageText
_ImageSpan4')
Span('Span Text4').fontSize(this.fontSize4)
}
.borderWidth(1).borderColor(Color.Green)
...
...
@@ -55,7 +55,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Contain)
.key('
SR000HR4C4
_ImageSpan5')
.key('
ImageText
_ImageSpan5')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -65,7 +65,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Cover)
.key('
SR000HR4C4
_ImageSpan6')
.key('
ImageText
_ImageSpan6')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -75,7 +75,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Auto)
.key('
SR000HR4C4
_ImageSpan7')
.key('
ImageText
_ImageSpan7')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -85,7 +85,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Fill)
.key('
SR000HR4C4
_ImageSpan8')
.key('
ImageText
_ImageSpan8')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -95,7 +95,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.ScaleDown)
.key('
SR000HR4C4
_ImageSpan9')
.key('
ImageText
_ImageSpan9')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -105,7 +105,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.None)
.key('
SR000HR4C4
_ImageSpan10')
.key('
ImageText
_ImageSpan10')
}
.borderWidth(1)
.borderColor(Color.Green)
...
...
@@ -114,16 +114,16 @@ struct SR000HR4C4 {
Text() {
Span('Span Text1 ').fontSize(20)
.key('
SR000HR4C4
_Span1')
.key('
ImageText
_Span1')
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan11')
.key('
ImageText
_ImageSpan11')
Span('Span Text2 ').fontSize(20)
}
.borderWidth(1).borderColor(Color.Green)
.margin({top: 15})
.width('90%')
.textIndent(this.indent)
.key('
SR000HR4C4
_Text1')
.key('
ImageText
_Text1')
Button("indent+50")
.margin(10)
.width('30%')
...
...
@@ -135,11 +135,11 @@ struct SR000HR4C4 {
.onClick(() => {
this.indent += 50;
})
.key('
SR000HR4C4
_Button1')
.key('
ImageText
_Button1')
Text() {
ImageSpan(null).width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan12')
.key('
ImageText
_ImageSpan12')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -147,7 +147,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan(undefined).width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan13')
.key('
ImageText
_ImageSpan13')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -155,7 +155,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan14')
.key('
ImageText
_ImageSpan14')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -165,7 +165,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.verticalAlign(null)
.key('
SR000HR4C4
_ImageSpan15')
.key('
ImageText
_ImageSpan15')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -174,7 +174,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.verticalAlign(undefined)
.key('
SR000HR4C4
_ImageSpan16')
.key('
ImageText
_ImageSpan16')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -183,7 +183,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.objectFit(null)
.key('
SR000HR4C4
_ImageSpan17')
.key('
ImageText
_ImageSpan17')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -192,7 +192,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.objectFit(undefined)
.key('
SR000HR4C4
_ImageSpan18')
.key('
ImageText
_ImageSpan18')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -200,7 +200,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan19')
.key('
ImageText
_ImageSpan19')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
@@ -209,7 +209,7 @@ struct SR000HR4C4 {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan20')
.key('
ImageText
_ImageSpan20')
}
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HTP23
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
ListDelete
.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,7 +16,7 @@ import MyUtils from '../common/MyUtils';
@Entry
@Component
struct
SR000HTP23
{
struct
ListDelete
{
@State arr: number[] = [0, 1, 2]
@State arr2: number[] = [0, 1, 2]
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HTP2C
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
ListRebound
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HTP2C
{
struct
ListRebound
{
@State Number: String[] = ['0', '1', '2', '3']
scroller: Scroller = new Scroller()
@State isRefreshing: boolean = false
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HTP2O
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
NavigationParam
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HTP2O
{
struct
NavigationParam
{
private arr: number[] = [0, 1, 2]
@Builder NavigationTitle() {
...
...
@@ -62,7 +62,7 @@ struct SR000HTP2O {
}
.title($r("app.string.test_title"))
.titleMode(NavigationTitleMode.Free)
.key('
SR000HTP2O
_Navigation1')
.key('
NavigationParam
_Navigation1')
Navigation() {
List({ space: 5, initialIndex: 0 }) {
...
...
@@ -85,7 +85,7 @@ struct SR000HTP2O {
}
.title("test_string_title")
.titleMode(NavigationTitleMode.Free)
.key('
SR000HTP2O
_Navigation2')
.key('
NavigationParam
_Navigation2')
}
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HUESC
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
OffScreenCanvas
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HUESC
{
struct
OffScreenCanvas
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private settings_false: RenderingContextSettings = new RenderingContextSettings(false)
...
...
@@ -26,7 +26,7 @@ struct SR000HUESC {
Canvas(this.context)
.width('100%')
.height('100%')
.key('
SR000HUESC
_Canvas1')
.key('
OffScreenCanvas
_Canvas1')
.onReady(() => {
this.offscreenCanvas.getContext(null)
this.offscreenCanvas.getContext(undefined)
...
...
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
SR000HTP2G
.ets
→
arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/
TextAreaCallback
.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Component
struct
SR000HTP2G
{
struct
TextAreaCallback
{
controller: TextAreaController = new TextAreaController()
build() {
...
...
@@ -59,7 +59,7 @@ struct SR000HTP2G {
.width('80%')
.tabIndex(2)
.margin({ top: 5, bottom: 5 })
.key('
SR000HTP2G
_TextArea1')
.key('
TextAreaCallback
_TextArea1')
TextArea({ placeholder: 'input your word', controller: this.controller })
.placeholderColor("rgb(0,0,225)")
...
...
@@ -82,7 +82,7 @@ struct SR000HTP2G {
.width('80%')
.tabIndex(3)
.margin({ top: 5, bottom: 5 })
.key('
SR000HTP2G
_TextArea2')
.key('
TextAreaCallback
_TextArea2')
}.width('100%')
}
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HTP2K
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
BindMenu
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import
router
from
'@ohos.router'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
events_emitter
from
'@ohos.events.emitter'
;
export
default
function
SR000HTP2K
Test
()
{
export
default
function
BindMenu
Test
()
{
const
SUITE
=
'
SR000HTP2K
'
const
SUITE
=
'
BindMenu
'
const
waitUiReadyMs
=
500
;
describe
(
'
SR000HTP2K
Test'
,
function
()
{
describe
(
'
BindMenu
Test'
,
function
()
{
beforeEach
(
async
function
(
done
)
{
let
options
=
{
url
:
"TestAbility/pages/
SR000HTP2K
"
,
url
:
"TestAbility/pages/
BindMenu
"
,
}
try
{
router
.
clear
();
let
pages
=
router
.
getState
();
if
(
pages
==
null
||
!
(
"
SR000HTP2K
"
==
pages
.
name
))
{
if
(
pages
==
null
||
!
(
"
BindMenu
"
==
pages
.
name
))
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
console
.
info
(
`${SUITE} router.pushUrl success`
);
})
.
catch
(
err
=>
{
...
...
@@ -65,7 +65,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_placeholder'
,
10
,
""
)
sendEventByKey
(
'
BindMenu
_placeholder'
,
10
,
""
)
}
let
callback
=
(
event
)
=>
{
...
...
@@ -79,7 +79,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_bindMenu1'
,
10
,
""
)
sendEventByKey
(
'
BindMenu
_bindMenu1'
,
10
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
});
...
...
@@ -120,7 +120,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_bindContextMenu1'
,
11
,
""
)
sendEventByKey
(
'
BindMenu
_bindContextMenu1'
,
11
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
});
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUESG_S
I.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
CanvasAP
I.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESG_S
ITest() {
export default function
CanvasAP
ITest() {
const SUITE = '
SR000HUESG_S
I'
describe('
SR000HUESG_S
ITest', function () {
const SUITE = '
CanvasAP
I'
describe('
CanvasAP
ITest', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUESG_S
I",
url: "TestAbility/pages/
CanvasAP
I",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUESG_S
I" == pages.name)) {
if (pages == null || !("
CanvasAP
I" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUESG_SITest() {
it('ArkUI_Canvas_API_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESG_S
I_Canvas1')
let strJson = getInspectorByKey('
CanvasAP
I_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUET2
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
CanvasAPICanvasRender
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUET2
Test() {
export default function
CanvasAPICanvasRender
Test() {
const SUITE = '
SR000HUET2
'
describe('
SR000HUET2
Test', function () {
const SUITE = '
CanvasAPICanvasRender
'
describe('
CanvasAPICanvasRender
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUET2
",
url: "TestAbility/pages/
CanvasAPICanvasRender
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUET2
" == pages.name)) {
if (pages == null || !("
CanvasAPICanvasRender
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUET2Test() {
it('ArkUI_Canvas_API_CanvasRender_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_CanvasRender_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUET2
_Canvas1')
let strJson = getInspectorByKey('
CanvasAPICanvasRender
_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUESL
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
CanvasAPIUnit
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESL
Test() {
export default function
CanvasAPIUnit
Test() {
const SUITE = '
SR000HUESL
'
describe('
SR000HUESL
Test', function () {
const SUITE = '
CanvasAPIUnit
'
describe('
CanvasAPIUnit
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUESL
",
url: "TestAbility/pages/
CanvasAPIUnit
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUESL
" == pages.name)) {
if (pages == null || !("
CanvasAPIUnit
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUESLTest() {
it('ArkUI_Canvas_API_Unit_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_Unit_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESL
_Canvas1')
let strJson = getInspectorByKey('
CanvasAPIUnit
_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUES3
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
CanvasColor
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUES3
Test() {
export default function
CanvasColor
Test() {
const SUITE = '
SR000HUES3
'
describe('
SR000HUES3
Test', function () {
const SUITE = '
CanvasColor
'
describe('
CanvasColor
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUES3
",
url: "TestAbility/pages/
CanvasColor
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUES3
" == pages.name)) {
if (pages == null || !("
CanvasColor
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUES3Test() {
it('ArkUI_Canvas_Color_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Color_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES3
_Canvas1')
let strJson = getInspectorByKey('
CanvasColor
_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUES7
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
CanvasShader
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUES7
Test() {
export default function
CanvasShader
Test() {
const SUITE = '
SR000HUES7
'
describe('
SR000HUES7
Test', function () {
const SUITE = '
CanvasShader
'
describe('
CanvasShader
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUES7
",
url: "TestAbility/pages/
CanvasShader
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUES7
" == pages.name)) {
if (pages == null || !("
CanvasShader
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUES7Test() {
it('ArkUI_Canvas_Shader_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Shader_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES7
_Canvas1')
let strJson = getInspectorByKey('
CanvasShader
_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
@@ -64,7 +64,7 @@ export default function SR000HUES7Test() {
it('ArkUI_Canvas_Shader_0200', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Shader_0200'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES7
_Canvas2')
let strJson = getInspectorByKey('
CanvasShader
_Canvas2')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HR4C4
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
ImageText
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,19 +14,19 @@
*/
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
export default function
SR000HR4C4
Test() {
export default function
ImageText
Test() {
const SUITE = '
SR000HR4C4
'
describe('
SR000HR4C4
Test', function () {
const SUITE = '
ImageText
'
describe('
ImageText
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HR4C4
",
url: "TestAbility/pages/
ImageText
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HR4C4
" == pages.name)) {
if (pages == null || !("
ImageText
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -48,19 +48,19 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0100'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan1');
let strJson = getInspectorByKey('
ImageText
_ImageSpan1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BASELINE')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan2');
strJson = getInspectorByKey('
ImageText
_ImageSpan2');
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('CENTER')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan3');
strJson = getInspectorByKey('
ImageText
_ImageSpan3');
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('TOP')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan4');
strJson = getInspectorByKey('
ImageText
_ImageSpan4');
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BOTTOM')
...
...
@@ -77,27 +77,27 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0200'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan5');
let strJson = getInspectorByKey('
ImageText
_ImageSpan5');
let obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Contain')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan6');
strJson = getInspectorByKey('
ImageText
_ImageSpan6');
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Cover')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan7');
strJson = getInspectorByKey('
ImageText
_ImageSpan7');
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Auto')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan8');
strJson = getInspectorByKey('
ImageText
_ImageSpan8');
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Fill')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan9');
strJson = getInspectorByKey('
ImageText
_ImageSpan9');
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.ScaleDown')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan10');
strJson = getInspectorByKey('
ImageText
_ImageSpan10');
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.None')
...
...
@@ -114,11 +114,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0300'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_Text1');
let strJson = getInspectorByKey('
ImageText
_Text1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.textIndent).assertEqual(undefined)
if ( sendEventByKey('
SR000HR4C4
_Button1', 10, null) ) {
let strJson = getInspectorByKey('
SR000HR4C4
_Text1');
if ( sendEventByKey('
ImageText
_Button1', 10, null) ) {
let strJson = getInspectorByKey('
ImageText
_Text1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.textIndent).assertEqual(undefined)
}
...
...
@@ -135,15 +135,15 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0400'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan12');
let strJson = getInspectorByKey('
ImageText
_ImageSpan12');
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan13');
strJson = getInspectorByKey('
ImageText
_ImageSpan13');
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan14');
strJson = getInspectorByKey('
ImageText
_ImageSpan14');
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
...
@@ -161,11 +161,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0500'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan15');
let strJson = getInspectorByKey('
ImageText
_ImageSpan15');
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan16');
strJson = getInspectorByKey('
ImageText
_ImageSpan16');
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
...
@@ -183,11 +183,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0600'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan17');
let strJson = getInspectorByKey('
ImageText
_ImageSpan17');
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan18');
strJson = getInspectorByKey('
ImageText
_ImageSpan18');
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
...
@@ -205,11 +205,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0700'
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan19');
let strJson = getInspectorByKey('
ImageText
_ImageSpan19');
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan20');
strJson = getInspectorByKey('
ImageText
_ImageSpan20');
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
...
arkui/ace_ets_component_api/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -12,30 +12,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
SR000HTP23Test from './SR000HTP23
.test'
import
SR000HTP2CTest from './SR000HTP2C
.test'
import
SR000HTP2GTest from './SR000HTP2G
.test'
import
SR000HTP2KTest from './SR000HTP2K
.test'
import
SR000HTP2OTest from './SR000HTP2O
.test'
import
SR000HR4C4Test from './SR000HR4C4
.test'
import
SR000HUES3Test from './SR000HUES3
.test'
import
SR000HUESCTest from './SR000HUESC
.test'
import
SR000HUESLTest from './SR000HUESL
.test'
import
SR000HUET2Test from './SR000HUET2
.test'
import
SR000HUESG_SITest from './SR000HUESG_S
I.test'
import
SR000HUES7Test from './SR000HUES7
.test'
import
ListDeleteTest from './ListDelete
.test'
import
ListReboundTest from './ListRebound
.test'
import
TextAreaCallbackTest from './TextAreaCallback
.test'
import
BindMenuTest from './BindMenu
.test'
import
NavigationParamTest from './NavigationParam
.test'
import
ImageTextTest from './ImageText
.test'
import
CanvasColorTest from './CanvasColor
.test'
import
OffScreenCanvasTest from './OffScreenCanvas
.test'
import
CanvasAPIUnitTest from './CanvasAPIUnit
.test'
import
CanvasAPICanvasRenderTest from './CanvasAPICanvasRender
.test'
import
CanvasAPITest from './CanvasAP
I.test'
import
CanvasShaderTest from './CanvasShader
.test'
export default function testsuite() {
SR000HTP23
Test()
SR000HTP2C
Test()
SR000HTP2G
Test()
SR000HTP2K
Test()
SR000HTP2O
Test()
SR000HR4C4
Test()
SR000HUES3
Test()
SR000HUESC
Test()
SR000HUESL
Test()
SR000HUET2
Test()
SR000HUESG_S
ITest()
SR000HUES7
Test()
ListDelete
Test()
ListRebound
Test()
TextAreaCallback
Test()
BindMenu
Test()
NavigationParam
Test()
ImageText
Test()
CanvasColor
Test()
OffScreenCanvas
Test()
CanvasAPIUnit
Test()
CanvasAPICanvasRender
Test()
CanvasAP
ITest()
CanvasShader
Test()
}
\ No newline at end of file
arkui/ace_ets_component_api/src/main/ets/test/
SR000HTP23
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
ListDelete
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -17,9 +17,9 @@ import router from '@ohos.router'
import {Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HTP23
Test() {
export default function
ListDelete
Test() {
const SUITE = '
SR000HTP23
'
const SUITE = '
ListDelete
'
function getRectCenter(rect: string) {
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
return [
...
...
@@ -35,16 +35,16 @@ export default function SR000HTP23Test() {
]
}
describe('
SR000HTP23
Test', function () {
describe('
ListDelete
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HTP23
",
url: "TestAbility/pages/
ListDelete
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HTP23
" == pages.name)) {
if (pages == null || !("
ListDelete
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HTP2C
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
ListRebound
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -15,9 +15,9 @@
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {Driver, Component, ON} from '@ohos.UiTest'
export default function
SR000HTP2C
Test() {
export default function
ListRebound
Test() {
const SUITE = '
SR000HTP2C
'
const SUITE = '
ListRebound
'
function getRectCenter(rect: string) {
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
return [
...
...
@@ -25,16 +25,16 @@ export default function SR000HTP2CTest() {
px2vp(parseFloat(rtn[1].trim()) + (parseFloat(rtn[3].trim()) - parseFloat(rtn[1].trim())) / 2),
]
}
describe('
SR000HTP2C
Test', function () {
describe('
ListRebound
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HTP2C
",
url: "TestAbility/pages/
ListRebound
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HTP2C
" == pages.name)) {
if (pages == null || !("
ListRebound
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HTP2O
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
NavigationParam
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HTP2O
Test() {
export default function
NavigationParam
Test() {
const SUITE = '
SR000HTP2O
'
const SUITE = '
NavigationParam
'
const waitUiReadyMs = 500;
function sleep(time) {
let date = new Date()
...
...
@@ -30,16 +30,16 @@ export default function SR000HTP2OTest() {
}
}
describe('
SR000HTP2O
Test', function () {
describe('
NavigationParam
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HTP2O
",
url: "TestAbility/pages/
NavigationParam
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HTP2O
" == pages.name)) {
if (pages == null || !("
NavigationParam
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -60,7 +60,7 @@ export default function SR000HTP2OTest() {
it('ArkUI_Navigation_0100', 0, async function (done) {
let CASE = 'ArkUI_Navigation_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HTP2O
_Navigation1')
let strJson = getInspectorByKey('
NavigationParam
_Navigation1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Navigation')
console.info(`${SUITE} ${CASE} END`)
...
...
@@ -75,7 +75,7 @@ export default function SR000HTP2OTest() {
it('ArkUI_Navigation_0200', 0, async function (done) {
let CASE = 'ArkUI_Navigation_0200'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HTP2O
_Navigation2')
let strJson = getInspectorByKey('
NavigationParam
_Navigation2')
let obj = JSON.parse(strJson);
expect(obj.$attrs.title).assertEqual('test_string_title')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HUESC
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
OffScreenCanvas
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESC
Test() {
export default function
OffScreenCanvas
Test() {
const SUITE = '
SR000HUESC
'
describe('
SR000HUESC
Test', function () {
const SUITE = '
OffScreenCanvas
'
describe('
OffScreenCanvas
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HUESC
",
url: "TestAbility/pages/
OffScreenCanvas
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HUESC
" == pages.name)) {
if (pages == null || !("
OffScreenCanvas
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -49,7 +49,7 @@ export default function SR000HUESCTest() {
it('ArkUI_Canvas_API_OffScreenCanvas_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_OffScreenCanvas_0100'
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESC
_Canvas1')
let strJson = getInspectorByKey('
OffScreenCanvas
_Canvas1')
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
...
...
arkui/ace_ets_component_api/src/main/ets/test/
SR000HTP2G
.test.ets
→
arkui/ace_ets_component_api/src/main/ets/test/
TextAreaCallback
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import
router
from
'@ohos.router'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
events_emitter
from
'@ohos.events.emitter'
;
export
default
function
SR000HTP2G
Test
()
{
export
default
function
TextAreaCallback
Test
()
{
const
SUITE
=
'
SR000HTP2G
'
const
SUITE
=
'
TextAreaCallback
'
const
waitUiReadyMs
=
500
;
describe
(
'
SR000HTP2G
Test'
,
function
()
{
describe
(
'
TextAreaCallback
Test'
,
function
()
{
beforeEach
(
async
function
(
done
)
{
let
options
=
{
url
:
"TestAbility/pages/
SR000HTP2G
"
,
url
:
"TestAbility/pages/
TextAreaCallback
"
,
}
try
{
router
.
clear
();
let
pages
=
router
.
getState
();
if
(
pages
==
null
||
!
(
"
SR000HTP2G
"
==
pages
.
name
))
{
if
(
pages
==
null
||
!
(
"
TextAreaCallback
"
==
pages
.
name
))
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
console
.
info
(
`${SUITE} router.pushUrl success`
);
})
.
catch
(
err
=>
{
...
...
@@ -64,7 +64,7 @@ export default function SR000HTP2GTest() {
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2G
_TextArea2'
,
10
,
""
)
sendEventByKey
(
'
TextAreaCallback
_TextArea2'
,
10
,
""
)
}
let
callback
=
(
event
)
=>
{
...
...
@@ -78,7 +78,7 @@ export default function SR000HTP2GTest() {
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2G
_TextArea1'
,
10
,
""
)
sendEventByKey
(
'
TextAreaCallback
_TextArea1'
,
10
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
});
...
...
arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HTP23
"
,
"TestAbility/pages/
SR000HTP2C
"
,
"TestAbility/pages/
SR000HTP2G
"
,
"TestAbility/pages/
SR000HTP2K
"
,
"TestAbility/pages/
SR000HTP2O
"
,
"TestAbility/pages/
SR000HR4C4
"
,
"TestAbility/pages/
SR000HUES3
"
,
"TestAbility/pages/
SR000HUESC
"
,
"TestAbility/pages/
SR000HUESL
"
,
"TestAbility/pages/
SR000HUET2
"
,
"TestAbility/pages/
SR000HUESG_S
I"
,
"TestAbility/pages/
SR000HUES7
"
"TestAbility/pages/
ListDelete
"
,
"TestAbility/pages/
ListRebound
"
,
"TestAbility/pages/
TextAreaCallback
"
,
"TestAbility/pages/
BindMenu
"
,
"TestAbility/pages/
NavigationParam
"
,
"TestAbility/pages/
ImageText
"
,
"TestAbility/pages/
CanvasColor
"
,
"TestAbility/pages/
OffScreenCanvas
"
,
"TestAbility/pages/
CanvasAPIUnit
"
,
"TestAbility/pages/
CanvasAPICanvasRender
"
,
"TestAbility/pages/
CanvasAP
I"
,
"TestAbility/pages/
CanvasShader
"
]
}
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/
SR000HRF74
.ets
→
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/
CustomDialogMask
.ets
浏览文件 @
d6a87ef3
...
...
@@ -24,14 +24,14 @@ struct UserDialog0100 {
this.controller.close()
this.action()
})
.key('
SR000HRF74
_Button_Close_1')
.key('
CustomDialogMask
_Button_Close_1')
}.padding(20)
}
}
@Entry
@Component
struct
SR000HRF74
{
struct
CustomDialogMask
{
dialogController: CustomDialogController = new CustomDialogController({
builder: UserDialog0100({ action: this.afterClose }),
cancel: this.onCancel
...
...
@@ -74,7 +74,7 @@ struct SR000HRF74 {
.onClick(() => {
this.dialogController.open()
})
.key('
SR000HRF74
_Button_Open_1')
.key('
CustomDialogMask
_Button_Open_1')
Button('maskColor set by Color')
.margin(10)
.width('90%')
...
...
@@ -86,7 +86,7 @@ struct SR000HRF74 {
.onClick(() => {
this.dialogController2.open()
})
.key('
SR000HRF74
_Button_Open_2')
.key('
CustomDialogMask
_Button_Open_2')
Button('maskColor set by string')
.margin(10)
.width('90%')
...
...
@@ -98,7 +98,7 @@ struct SR000HRF74 {
.onClick(() => {
this.dialogController3.open()
})
.key('
SR000HRF74
_Button_Open_3')
.key('
CustomDialogMask
_Button_Open_3')
Button('maskColor set by Resource')
.margin(10)
.width('90%')
...
...
@@ -110,7 +110,7 @@ struct SR000HRF74 {
.onClick(() => {
this.dialogController4.open()
})
.key('
SR000HRF74
_Button_Open_4')
.key('
CustomDialogMask
_Button_Open_4')
Button('maskColor set by number')
.margin(10)
.width('90%')
...
...
@@ -122,7 +122,7 @@ struct SR000HRF74 {
.onClick(() => {
this.dialogController5.open()
})
.key('
SR000HRF74
_Button_Open_5')
.key('
CustomDialogMask
_Button_Open_5')
}
}
}
\ No newline at end of file
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/
SR000HV334
.ets
→
arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/
ListScroll
.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Component
struct
SR000HV334
{
struct
ListScroll
{
@State listPosition: number = 0;
private arr: number[] = Array.apply(this, {length: 60}).map((item, i) => i)
private scrollerForList: Scroller = new Scroller()
...
...
@@ -28,24 +28,24 @@ struct SR000HV334 {
.onClick(() => {
this.scrollerForList.scrollToIndex(14, false)
}).height(45)
.key('
SR000HV334
_Button_To_14')
.key('
ListScroll
_Button_To_14')
Button("To(15)")
.onClick(() => {
this.scrollerForList.scrollToIndex(15, true)
}).height(45)
.key('
SR000HV334
_Button_To_15')
.key('
ListScroll
_Button_To_15')
}.margin({top: 10})
Row() {
Button("To(0)")
.onClick(() => {
this.scrollerForList.scrollToIndex(0, false)
}).height(45)
.key('
SR000HV334
_Button_To_0')
.key('
ListScroll
_Button_To_0')
Button("To(max)")
.onClick(() => {
this.scrollerForList.scrollToIndex(this.arr.length - 1, true)
}).height(45)
.key('
SR000HV334
_Button_To_max')
.key('
ListScroll
_Button_To_max')
}.margin({top: 10})
List({ space: 5,initialIndex:23, scroller: this.scrollerForList }) {
...
...
@@ -92,7 +92,7 @@ struct SR000HV334 {
events_emitter.emit(event, eventData)
}
})
.key('
SR000HV334
_List1')
.key('
ListScroll
_List1')
}.width('100%').height('100%')
}
}
\ No newline at end of file
arkui/ace_ets_component_api_four/src/main/ets/test/
SR000HRF74
.test.ets
→
arkui/ace_ets_component_api_four/src/main/ets/test/
CustomDialogMask
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -15,9 +15,9 @@
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
export default function
SR000HRF74
Test() {
export default function
CustomDialogMask
Test() {
const SUITE = '
SR000HRF74
'
const SUITE = '
CustomDialogMask
'
const waitUiReadyMs = 500;
function sleep(time) {
let date = new Date()
...
...
@@ -29,16 +29,16 @@ export default function SR000HRF74Test() {
}
}
describe('
SR000HRF74
Test', function () {
describe('
CustomDialogMask
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HRF74
",
url: "TestAbility/pages/
CustomDialogMask
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HRF74
" == pages.name)) {
if (pages == null || !("
CustomDialogMask
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -63,12 +63,12 @@ export default function SR000HRF74Test() {
sleep(2)
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_1', 10, "")
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
sleep(1)
...
...
@@ -87,13 +87,13 @@ export default function SR000HRF74Test() {
sleep(1)
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_2', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_2', 10, "")
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
sleep(1)
...
...
@@ -111,13 +111,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_3', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_3', 10, "")
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
sleep(1)
...
...
@@ -135,13 +135,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_4', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_4', 10, "")
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
sleep(1)
...
...
@@ -159,13 +159,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_5', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_5', 10, "")
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
sleep(1)
...
...
arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -12,10 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
SR000HV334Test from './SR000HV334
.test'
import
SR000HRF74Test from './SR000HRF74
.test'
import
ListScrollTest from './ListScroll
.test'
import
CustomDialogMaskTest from './CustomDialogMask
.test'
export default function testsuite() {
SR000HRF74
Test()
SR000HV334
Test()
CustomDialogMask
Test()
ListScroll
Test()
}
\ No newline at end of file
arkui/ace_ets_component_api_four/src/main/ets/test/
SR000HV334
.test.ets
→
arkui/ace_ets_component_api_four/src/main/ets/test/
ListScroll
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,20 +16,20 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HV334
Test() {
export default function
ListScroll
Test() {
const SUITE = '
SR000HV334
'
const SUITE = '
ListScroll
'
const waitUiReadyMs = 500;
describe('
SR000HV334
Test', function () {
describe('
ListScroll
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HV334
",
url: "TestAbility/pages/
ListScroll
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HV334
" == pages.name)) {
if (pages == null || !("
ListScroll
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -61,7 +61,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_14', 10, "")
sendEventByKey('
ListScroll
_Button_To_14', 10, "")
console.info(`${SUITE} ${CASE} END`)
});
...
...
@@ -85,7 +85,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_15', 10, "")
sendEventByKey('
ListScroll
_Button_To_15', 10, "")
console.info(`${SUITE} ${CASE} END`)
});
...
...
@@ -109,7 +109,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_0', 10, "")
sendEventByKey('
ListScroll
_Button_To_0', 10, "")
console.info(`${SUITE} ${CASE} END`)
});
...
...
@@ -133,7 +133,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_max', 10, "")
sendEventByKey('
ListScroll
_Button_To_max', 10, "")
console.info(`${SUITE} ${CASE} END`)
});
...
...
arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HV334
"
,
"TestAbility/pages/
SR000HRF74
"
"TestAbility/pages/
ListScroll
"
,
"TestAbility/pages/
CustomDialogMask
"
]
}
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/
SR000HTP1U
.ets
→
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/
CounterEnable
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HTP1U
{
struct
CounterEnable
{
@State value: number = 0
@State enable_inc: boolean = false
@State enable_dec: boolean = false
...
...
@@ -33,17 +33,17 @@ struct SR000HTP1U {
})
.enableInc(this.enable_inc)
.enableDec(this.enable_dec)
.key('
SR000HTP1U
_Counter_1')
.key('
CounterEnable
_Counter_1')
Button("enable_inc_true")
.onClick(() => {
this.enable_inc = true;
}).height(45)
.key('
SR000HTP1U
_Button_1')
.key('
CounterEnable
_Button_1')
Button("enable_dec_true")
.onClick(() => {
this.enable_dec = true;
}).height(45)
.key('
SR000HTP1U
_Button_2')
.key('
CounterEnable
_Button_2')
}.width("100%")
}
}
\ No newline at end of file
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/
SR000HTP21
.ets
→
arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/
TextAreaSelect
.ets
浏览文件 @
d6a87ef3
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
SR000HTP21
{
struct
TextAreaSelect
{
controller: TextAreaController = new TextAreaController()
controller2: TextAreaController = new TextAreaController()
controller3: TextAreaController = new TextAreaController()
...
...
@@ -33,79 +33,79 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.tabIndex(1)
.key('
SR000HTP21
_TextArea_1')
.key('
TextAreaSelect
_TextArea_1')
Button("Show selected (-2,-1)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(-2,-1)
})
.key('
SR000HTP21
_Button_1')
.key('
TextAreaSelect
_Button_1')
Button("Show selected (-1,0)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(-1,0)
})
.key('
SR000HTP21
_Button_2')
.key('
TextAreaSelect
_Button_2')
Button("Show selected (0,3)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(0,3)
})
.key('
SR000HTP21
_Button_3')
.key('
TextAreaSelect
_Button_3')
Button("Show selected (1,3)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(1,3)
})
.key('
SR000HTP21
_Button_4')
.key('
TextAreaSelect
_Button_4')
Button("Show selected (-1,6)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(-1,6)
})
.key('
SR000HTP21
_Button_5')
.key('
TextAreaSelect
_Button_5')
Button("Show selected (0,6)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(0,6)
})
.key('
SR000HTP21
_Button_6')
.key('
TextAreaSelect
_Button_6')
Button("Show selected (-1,8)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(-1,8)
})
.key('
SR000HTP21
_Button_7')
.key('
TextAreaSelect
_Button_7')
Button("Show selected (0,8)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(0,8)
})
.key('
SR000HTP21
_Button_8')
.key('
TextAreaSelect
_Button_8')
Button("Show selected (null,null)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(null,null)
})
.key('
SR000HTP21
_Button_9')
.key('
TextAreaSelect
_Button_9')
Button("Show selected (null,undefined)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(null,undefined)
})
.key('
SR000HTP21
_Button_10')
.key('
TextAreaSelect
_Button_10')
Button("Show selected (undefined,null)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(undefined,null)
})
.key('
SR000HTP21
_Button_11')
.key('
TextAreaSelect
_Button_11')
Button("Show selected (undefined,undefined)")
.margin(30)
.onClick(() => {
this.controller.setTextSelection(undefined,undefined)
})
.key('
SR000HTP21
_Button_12')
.key('
TextAreaSelect
_Button_12')
TextArea({ text: '', placeholder: 'input your word', controller: this.controller2 })
.placeholderColor("rgb(0,0,225)")
.placeholderFont({ size: 20, weight: 100, family: 'cursive', style: FontStyle.Italic })
...
...
@@ -117,13 +117,13 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.tabIndex(2)
.key('
SR000HTP21
_TextArea_2')
.key('
TextAreaSelect
_TextArea_2')
Button("Show selected (1,3)")
.margin(30)
.onClick(() => {
this.controller2.setTextSelection(1,3)
})
.key('
SR000HTP21
_Button_13')
.key('
TextAreaSelect
_Button_13')
TextArea({ text: '北京aaaaa上海tianjin深圳', placeholder: 'input your word', controller: this.controller3 })
.width(200)
.height(50)
...
...
@@ -137,13 +137,13 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.tabIndex(3)
.key('
SR000HTP21
_TextArea_3')
.key('
TextAreaSelect
_TextArea_3')
Button("Show selected (6,10)")
.margin(30)
.onClick(() => {
this.controller3.setTextSelection(6,10)
})
.key('
SR000HTP21
_Button_14')
.key('
TextAreaSelect
_Button_14')
}
}
}
\ No newline at end of file
arkui/ace_ets_component_api_three/src/main/ets/test/
SR000HTP1U
.test.ets
→
arkui/ace_ets_component_api_three/src/main/ets/test/
CounterEnable
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HTP1U
Test() {
export default function
CounterEnable
Test() {
const SUITE = '
SR000HTP1U
'
const SUITE = '
CounterEnable
'
const waitUiReadyMs = 500;
function sleep(time) {
let date = new Date()
...
...
@@ -30,16 +30,16 @@ export default function SR000HTP1UTest() {
}
}
describe('
SR000HTP1U
Test', function () {
describe('
CounterEnable
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HTP1U
",
url: "TestAbility/pages/
CounterEnable
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HTP1U
" == pages.name)) {
if (pages == null || !("
CounterEnable
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -61,8 +61,8 @@ export default function SR000HTP1UTest() {
let CASE = 'ArkUI_Counter_0100'
console.info(`${SUITE} ${CASE} START`);
sendEventByKey('
SR000HTP1U
_Button_1', 10, "")
let strJson = getInspectorByKey('
SR000HTP1U
_Counter_1');
sendEventByKey('
CounterEnable
_Button_1', 10, "")
let strJson = getInspectorByKey('
CounterEnable
_Counter_1');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual("Counter");
...
...
@@ -78,8 +78,8 @@ export default function SR000HTP1UTest() {
it('ArkUI_Counter_0200', 0, async function (done) {
let CASE = 'ArkUI_Counter_0200'
console.info(`${SUITE} ${CASE} START`);
sendEventByKey('
SR000HTP1U
_Button_2', 10, "")
let strJson = getInspectorByKey('
SR000HTP1U
_Counter_1');
sendEventByKey('
CounterEnable
_Button_2', 10, "")
let strJson = getInspectorByKey('
CounterEnable
_Counter_1');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual("Counter");
...
...
arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -12,10 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
SR000HTP1UTest from './SR000HTP1U
.test'
import
SR000HTP21Test from './SR000HTP21
.test'
import
CounterEnableTest from './CounterEnable
.test'
import
TextAreaSelectTest from './TextAreaSelect
.test'
export default function testsuite() {
SR000HTP1U
Test()
SR000HTP21
Test()
CounterEnable
Test()
TextAreaSelect
Test()
}
\ No newline at end of file
arkui/ace_ets_component_api_three/src/main/ets/test/
SR000HTP21
.test.ets
→
arkui/ace_ets_component_api_three/src/main/ets/test/
TextAreaSelect
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
export default function
SR000HTP21
Test() {
export default function
TextAreaSelect
Test() {
const SUITE = '
SR000HTP21
'
const SUITE = '
TextAreaSelect
'
const waitUiReadyMs = 500;
describe('
SR000HTP21
Test', function () {
describe('
TextAreaSelect
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/
SR000HTP21
",
url: "TestAbility/pages/
TextAreaSelect
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("
SR000HTP21
" == pages.name)) {
if (pages == null || !("
TextAreaSelect
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
@@ -54,9 +54,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_1', 10, "")
sendEventByKey('
TextAreaSelect
_Button_1', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
...
...
@@ -75,9 +75,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_2', 10, "")
sendEventByKey('
TextAreaSelect
_Button_2', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -97,9 +97,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_3', 10, "")
sendEventByKey('
TextAreaSelect
_Button_3', 10, "")
await driver.delayMs(waitUiReadyMs*5)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("3");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -119,9 +119,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_4', 10, "")
sendEventByKey('
TextAreaSelect
_Button_4', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("3");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -141,9 +141,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_5', 10, "")
sendEventByKey('
TextAreaSelect
_Button_5', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -163,9 +163,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_6', 10, "")
sendEventByKey('
TextAreaSelect
_Button_6', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -185,9 +185,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_7', 10, "")
sendEventByKey('
TextAreaSelect
_Button_7', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -207,9 +207,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_8', 10, "")
sendEventByKey('
TextAreaSelect
_Button_8', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -229,9 +229,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_9', 10, "")
sendEventByKey('
TextAreaSelect
_Button_9', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -251,9 +251,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_10', 10, "")
sendEventByKey('
TextAreaSelect
_Button_10', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -273,9 +273,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_11', 10, "")
sendEventByKey('
TextAreaSelect
_Button_11', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -295,9 +295,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_12', 10, "")
sendEventByKey('
TextAreaSelect
_Button_12', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -317,9 +317,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_13', 10, "")
sendEventByKey('
TextAreaSelect
_Button_13', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_2');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_2');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
...
...
@@ -339,11 +339,11 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_TextArea_3', 10, "")
sendEventByKey('
TextAreaSelect
_TextArea_3', 10, "")
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_14', 10, "")
sendEventByKey('
TextAreaSelect
_Button_14', 10, "")
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_3');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_3');
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("10");
await driver.delayMs(waitUiReadyMs)
...
...
arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HTP1U
"
,
"TestAbility/pages/
SR000HTP21
"
"TestAbility/pages/
CounterEnable
"
,
"TestAbility/pages/
TextAreaSelect
"
]
}
arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/S
R000HQURK
.ets
→
arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/S
hortcutKey
.ets
浏览文件 @
d6a87ef3
...
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Component
struct S
R000HQURK
{
struct S
hortcutKey
{
private arr: string[] = ['0', '1','2', '3', '4', '5', '6', '7', '8', '9',
'-', '=', '`', '[', ']', ';', '\'', ',', '.', '/', ' ', '*', '+',
'B','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','W']
...
...
@@ -48,7 +48,7 @@ struct SR000HQURK {
.onClick(() => {
this.sendEvent('Ctrl_' + item, this.baseEvent + index)
})
.key('S
R000HQURK
_Button_' + index)
.key('S
hortcutKey
_Button_' + index)
}, item => item)
ForEach(this.functionKey, (item, index) => {
...
...
@@ -58,7 +58,7 @@ struct SR000HQURK {
this.sendEvent('Ctrl_' + item, this.baseEvent2 + index)
})
.width("80%")
.key('S
R000HQURK
2_Ctrl_' + item)
.key('S
hortcutKey
2_Ctrl_' + item)
}, item => item)
Button("Shift+1")
...
...
arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import S
R000HQURKTest from './SR000HQURK
.test'
import S
hortcutKeyTest from './ShortcutKey
.test'
export default function testsuite() {
S
R000HQURK
Test()
S
hortcutKey
Test()
}
\ No newline at end of file
arkui/ace_ets_component_api_two/src/main/ets/test/S
R000HQURK
.test.ets
→
arkui/ace_ets_component_api_two/src/main/ets/test/S
hortcutKey
.test.ets
浏览文件 @
d6a87ef3
...
...
@@ -18,9 +18,9 @@ import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import input from '@ohos.multimodalInput.keyCode';
export default function S
R000HQURK
Test() {
export default function S
hortcutKey
Test() {
const SUITE = 'S
R000HQURK
'
const SUITE = 'S
hortcutKey
'
function sleep(time) {
let date = new Date()
let start = date.getSeconds()
...
...
@@ -99,16 +99,16 @@ export default function SR000HQURKTest() {
const baseEvent = 62000
const baseEvent2 = 73000
describe('S
R000HQURK
Test', function () {
describe('S
hortcutKey
Test', function () {
beforeEach(async function (done) {
let options = {
url: "TestAbility/pages/S
R000HQURK
",
url: "TestAbility/pages/S
hortcutKey
",
}
try {
router.clear();
let pages = router.getState();
if (pages == null || !("S
R000HQURK
" == pages.name)) {
if (pages == null || !("S
hortcutKey
" == pages.name)) {
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
...
...
arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/S
R000HQURK
"
"TestAbility/pages/S
hortcutKey
"
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录