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';
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Entry
@Component
@Component
struct
SR000HTP2K
{
struct
BindMenu
{
@Builder MenuBuilder() {
@Builder MenuBuilder() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text('Test menu item 1')
Text('Test menu item 1')
...
@@ -38,7 +38,7 @@ struct SR000HTP2K {
...
@@ -38,7 +38,7 @@ struct SR000HTP2K {
Row() {
Row() {
Text('placeholder')
Text('placeholder')
.width("40%").height('100%')
.width("40%").height('100%')
.key('
SR000HTP2K
_placeholder')
.key('
BindMenu
_placeholder')
Text('click for Menu')
Text('click for Menu')
.width("60%").height('100%')
.width("60%").height('100%')
.borderWidth(1).borderColor(Color.Green).textAlign(TextAlign.Center)
.borderWidth(1).borderColor(Color.Green).textAlign(TextAlign.Center)
...
@@ -82,7 +82,7 @@ struct SR000HTP2K {
...
@@ -82,7 +82,7 @@ struct SR000HTP2K {
events_emitter.emit(event, eventData)
events_emitter.emit(event, eventData)
}
}
})
})
.key('
SR000HTP2K
_bindMenu1')
.key('
BindMenu
_bindMenu1')
}
}
.width("90%").height(50).margin(10)
.width("90%").height(50).margin(10)
...
@@ -120,7 +120,7 @@ struct SR000HTP2K {
...
@@ -120,7 +120,7 @@ struct SR000HTP2K {
events_emitter.emit(event, eventData)
events_emitter.emit(event, eventData)
}
}
})
})
.key('
SR000HTP2K
_bindContextMenu1')
.key('
BindMenu
_bindContextMenu1')
}
}
.width("90%").height(50).margin(10)
.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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUESG_S
I {
struct
CanvasAP
I {
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
...
@@ -46,7 +46,7 @@ struct SR000HUESG_SI {
...
@@ -46,7 +46,7 @@ struct SR000HUESG_SI {
.height('500px')
.height('500px')
.backgroundColor('#ff83835d')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.margin({ top: 5 })
.key('
SR000HUESG_S
I_Canvas1')
.key('
CanvasAP
I_Canvas1')
.onReady(() => {
.onReady(() => {
this.noTransform()
this.noTransform()
this.transformByField1()
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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUET2
{
struct
CanvasAPICanvasRender
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
...
@@ -27,7 +27,7 @@ struct SR000HUET2 {
...
@@ -27,7 +27,7 @@ struct SR000HUET2 {
.width('100%')
.width('100%')
.height('30%')
.height('30%')
.backgroundColor('#ffff00')
.backgroundColor('#ffff00')
.key('
SR000HUET2
_Canvas1')
.key('
CanvasAPICanvasRender
_Canvas1')
.onReady(() => {
.onReady(() => {
this.context_fillText1()
this.context_fillText1()
this.context_fillText2()
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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUESL
{
struct
CanvasAPIUnit
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings)
...
@@ -27,7 +27,7 @@ struct SR000HUESL {
...
@@ -27,7 +27,7 @@ struct SR000HUESL {
.width('100%')
.width('100%')
.height('30%')
.height('30%')
.backgroundColor('#ffff00')
.backgroundColor('#ffff00')
.key('
SR000HUESL
_Canvas1')
.key('
CanvasAPIUnit
_Canvas1')
.onReady(() => {
.onReady(() => {
this.context_font1()
this.context_font1()
this.context_font2()
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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUES3
{
struct
CanvasColor
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private img: ImageBitmap = new ImageBitmap('/pages/images/test1.jpg')
private img: ImageBitmap = new ImageBitmap('/pages/images/test1.jpg')
...
@@ -35,7 +35,7 @@ struct SR000HUES3 {
...
@@ -35,7 +35,7 @@ struct SR000HUES3 {
this.strokeStyle_CanvasGradient()
this.strokeStyle_CanvasGradient()
this.strokeStyle_CanvasPattern()
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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUES7
{
struct
CanvasShader
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
...
@@ -28,7 +28,7 @@ struct SR000HUES7 {
...
@@ -28,7 +28,7 @@ struct SR000HUES7 {
.height('20%')
.height('20%')
.backgroundColor('#ff83835d')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.margin({ top: 5 })
.key('
SR000HUES7
_Canvas1')
.key('
CanvasShader
_Canvas1')
.onReady(() => {
.onReady(() => {
this.createConicGradient1()
this.createConicGradient1()
this.createConicGradient2()
this.createConicGradient2()
...
@@ -54,7 +54,7 @@ struct SR000HUES7 {
...
@@ -54,7 +54,7 @@ struct SR000HUES7 {
.height('20%')
.height('20%')
.backgroundColor('#ff83835d')
.backgroundColor('#ff83835d')
.margin({ top: 5 })
.margin({ top: 5 })
.key('
SR000HUES7
_Canvas2')
.key('
CanvasShader
_Canvas2')
.onReady(() => {
.onReady(() => {
this.clamp1()
this.clamp1()
this.clamp2()
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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HR4C4
{
struct
ImageText
{
@State align1: ImageSpanAlignment = ImageSpanAlignment.BASELINE
@State align1: ImageSpanAlignment = ImageSpanAlignment.BASELINE
@State align2: ImageSpanAlignment = ImageSpanAlignment.CENTER
@State align2: ImageSpanAlignment = ImageSpanAlignment.CENTER
@State align3: ImageSpanAlignment = ImageSpanAlignment.TOP
@State align3: ImageSpanAlignment = ImageSpanAlignment.TOP
...
@@ -33,19 +33,19 @@ struct SR000HR4C4 {
...
@@ -33,19 +33,19 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan($r('app.media.icon')).width('114px').height("114px")
ImageSpan($r('app.media.icon')).width('114px').height("114px")
.verticalAlign(this.align1)
.verticalAlign(this.align1)
.key('
SR000HR4C4
_ImageSpan1')
.key('
ImageText
_ImageSpan1')
Span('Span').fontSize(this.fontSize1)
Span('Span').fontSize(this.fontSize1)
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
.verticalAlign(this.align2)
.verticalAlign(this.align2)
.key('
SR000HR4C4
_ImageSpan2')
.key('
ImageText
_ImageSpan2')
Span('Span').fontSize(this.fontSize2)
Span('Span').fontSize(this.fontSize2)
ImageSpan($r('app.media.icon')).width('114px').height("114px")
ImageSpan($r('app.media.icon')).width('114px').height("114px")
.verticalAlign(this.align3)
.verticalAlign(this.align3)
.key('
SR000HR4C4
_ImageSpan3')
.key('
ImageText
_ImageSpan3')
Span('Span').fontSize(this.fontSize3)
Span('Span').fontSize(this.fontSize3)
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
ImageSpan('/pages/images/img1.png').width('150px').height("150px")
.verticalAlign(this.align4)
.verticalAlign(this.align4)
.key('
SR000HR4C4
_ImageSpan4')
.key('
ImageText
_ImageSpan4')
Span('Span Text4').fontSize(this.fontSize4)
Span('Span Text4').fontSize(this.fontSize4)
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
...
@@ -55,7 +55,7 @@ struct SR000HR4C4 {
...
@@ -55,7 +55,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Contain)
.objectFit(ImageFit.Contain)
.key('
SR000HR4C4
_ImageSpan5')
.key('
ImageText
_ImageSpan5')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -65,7 +65,7 @@ struct SR000HR4C4 {
...
@@ -65,7 +65,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Cover)
.objectFit(ImageFit.Cover)
.key('
SR000HR4C4
_ImageSpan6')
.key('
ImageText
_ImageSpan6')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -75,7 +75,7 @@ struct SR000HR4C4 {
...
@@ -75,7 +75,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Auto)
.objectFit(ImageFit.Auto)
.key('
SR000HR4C4
_ImageSpan7')
.key('
ImageText
_ImageSpan7')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -85,7 +85,7 @@ struct SR000HR4C4 {
...
@@ -85,7 +85,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.Fill)
.objectFit(ImageFit.Fill)
.key('
SR000HR4C4
_ImageSpan8')
.key('
ImageText
_ImageSpan8')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -95,7 +95,7 @@ struct SR000HR4C4 {
...
@@ -95,7 +95,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.ScaleDown)
.objectFit(ImageFit.ScaleDown)
.key('
SR000HR4C4
_ImageSpan9')
.key('
ImageText
_ImageSpan9')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -105,7 +105,7 @@ struct SR000HR4C4 {
...
@@ -105,7 +105,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px')
.objectFit(ImageFit.None)
.objectFit(ImageFit.None)
.key('
SR000HR4C4
_ImageSpan10')
.key('
ImageText
_ImageSpan10')
}
}
.borderWidth(1)
.borderWidth(1)
.borderColor(Color.Green)
.borderColor(Color.Green)
...
@@ -114,16 +114,16 @@ struct SR000HR4C4 {
...
@@ -114,16 +114,16 @@ struct SR000HR4C4 {
Text() {
Text() {
Span('Span Text1 ').fontSize(20)
Span('Span Text1 ').fontSize(20)
.key('
SR000HR4C4
_Span1')
.key('
ImageText
_Span1')
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan11')
.key('
ImageText
_ImageSpan11')
Span('Span Text2 ').fontSize(20)
Span('Span Text2 ').fontSize(20)
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({top: 15})
.margin({top: 15})
.width('90%')
.width('90%')
.textIndent(this.indent)
.textIndent(this.indent)
.key('
SR000HR4C4
_Text1')
.key('
ImageText
_Text1')
Button("indent+50")
Button("indent+50")
.margin(10)
.margin(10)
.width('30%')
.width('30%')
...
@@ -135,11 +135,11 @@ struct SR000HR4C4 {
...
@@ -135,11 +135,11 @@ struct SR000HR4C4 {
.onClick(() => {
.onClick(() => {
this.indent += 50;
this.indent += 50;
})
})
.key('
SR000HR4C4
_Button1')
.key('
ImageText
_Button1')
Text() {
Text() {
ImageSpan(null).width('276px').height("183px")
ImageSpan(null).width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan12')
.key('
ImageText
_ImageSpan12')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -147,7 +147,7 @@ struct SR000HR4C4 {
...
@@ -147,7 +147,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan(undefined).width('276px').height("183px")
ImageSpan(undefined).width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan13')
.key('
ImageText
_ImageSpan13')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -155,7 +155,7 @@ struct SR000HR4C4 {
...
@@ -155,7 +155,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('').width('276px').height("183px")
ImageSpan('').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan14')
.key('
ImageText
_ImageSpan14')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -165,7 +165,7 @@ struct SR000HR4C4 {
...
@@ -165,7 +165,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.verticalAlign(null)
.verticalAlign(null)
.key('
SR000HR4C4
_ImageSpan15')
.key('
ImageText
_ImageSpan15')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -174,7 +174,7 @@ struct SR000HR4C4 {
...
@@ -174,7 +174,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.verticalAlign(undefined)
.verticalAlign(undefined)
.key('
SR000HR4C4
_ImageSpan16')
.key('
ImageText
_ImageSpan16')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -183,7 +183,7 @@ struct SR000HR4C4 {
...
@@ -183,7 +183,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.objectFit(null)
.objectFit(null)
.key('
SR000HR4C4
_ImageSpan17')
.key('
ImageText
_ImageSpan17')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -192,7 +192,7 @@ struct SR000HR4C4 {
...
@@ -192,7 +192,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.objectFit(undefined)
.objectFit(undefined)
.key('
SR000HR4C4
_ImageSpan18')
.key('
ImageText
_ImageSpan18')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -200,7 +200,7 @@ struct SR000HR4C4 {
...
@@ -200,7 +200,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan19')
.key('
ImageText
_ImageSpan19')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.margin({ top: 5 })
...
@@ -209,7 +209,7 @@ struct SR000HR4C4 {
...
@@ -209,7 +209,7 @@ struct SR000HR4C4 {
Text() {
Text() {
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
ImageSpan('/pages/images/test1.jpg').width('276px').height("183px")
.key('
SR000HR4C4
_ImageSpan20')
.key('
ImageText
_ImageSpan20')
}
}
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
.margin({ top: 5 })
.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';
...
@@ -16,7 +16,7 @@ import MyUtils from '../common/MyUtils';
@Entry
@Entry
@Component
@Component
struct
SR000HTP23
{
struct
ListDelete
{
@State arr: number[] = [0, 1, 2]
@State arr: number[] = [0, 1, 2]
@State arr2: 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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HTP2C
{
struct
ListRebound
{
@State Number: String[] = ['0', '1', '2', '3']
@State Number: String[] = ['0', '1', '2', '3']
scroller: Scroller = new Scroller()
scroller: Scroller = new Scroller()
@State isRefreshing: boolean = false
@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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HTP2O
{
struct
NavigationParam
{
private arr: number[] = [0, 1, 2]
private arr: number[] = [0, 1, 2]
@Builder NavigationTitle() {
@Builder NavigationTitle() {
...
@@ -62,7 +62,7 @@ struct SR000HTP2O {
...
@@ -62,7 +62,7 @@ struct SR000HTP2O {
}
}
.title($r("app.string.test_title"))
.title($r("app.string.test_title"))
.titleMode(NavigationTitleMode.Free)
.titleMode(NavigationTitleMode.Free)
.key('
SR000HTP2O
_Navigation1')
.key('
NavigationParam
_Navigation1')
Navigation() {
Navigation() {
List({ space: 5, initialIndex: 0 }) {
List({ space: 5, initialIndex: 0 }) {
...
@@ -85,7 +85,7 @@ struct SR000HTP2O {
...
@@ -85,7 +85,7 @@ struct SR000HTP2O {
}
}
.title("test_string_title")
.title("test_string_title")
.titleMode(NavigationTitleMode.Free)
.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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HUESC
{
struct
OffScreenCanvas
{
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private settings_false: RenderingContextSettings = new RenderingContextSettings(false)
private settings_false: RenderingContextSettings = new RenderingContextSettings(false)
...
@@ -26,7 +26,7 @@ struct SR000HUESC {
...
@@ -26,7 +26,7 @@ struct SR000HUESC {
Canvas(this.context)
Canvas(this.context)
.width('100%')
.width('100%')
.height('100%')
.height('100%')
.key('
SR000HUESC
_Canvas1')
.key('
OffScreenCanvas
_Canvas1')
.onReady(() => {
.onReady(() => {
this.offscreenCanvas.getContext(null)
this.offscreenCanvas.getContext(null)
this.offscreenCanvas.getContext(undefined)
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';
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Entry
@Component
@Component
struct
SR000HTP2G
{
struct
TextAreaCallback
{
controller: TextAreaController = new TextAreaController()
controller: TextAreaController = new TextAreaController()
build() {
build() {
...
@@ -59,7 +59,7 @@ struct SR000HTP2G {
...
@@ -59,7 +59,7 @@ struct SR000HTP2G {
.width('80%')
.width('80%')
.tabIndex(2)
.tabIndex(2)
.margin({ top: 5, bottom: 5 })
.margin({ top: 5, bottom: 5 })
.key('
SR000HTP2G
_TextArea1')
.key('
TextAreaCallback
_TextArea1')
TextArea({ placeholder: 'input your word', controller: this.controller })
TextArea({ placeholder: 'input your word', controller: this.controller })
.placeholderColor("rgb(0,0,225)")
.placeholderColor("rgb(0,0,225)")
...
@@ -82,7 +82,7 @@ struct SR000HTP2G {
...
@@ -82,7 +82,7 @@ struct SR000HTP2G {
.width('80%')
.width('80%')
.tabIndex(3)
.tabIndex(3)
.margin({ top: 5, bottom: 5 })
.margin({ top: 5, bottom: 5 })
.key('
SR000HTP2G
_TextArea2')
.key('
TextAreaCallback
_TextArea2')
}.width('100%')
}.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'
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import
router
from
'@ohos.router'
import
router
from
'@ohos.router'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
events_emitter
from
'@ohos.events.emitter'
;
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
;
const
waitUiReadyMs
=
500
;
describe
(
'
SR000HTP2K
Test'
,
function
()
{
describe
(
'
BindMenu
Test'
,
function
()
{
beforeEach
(
async
function
(
done
)
{
beforeEach
(
async
function
(
done
)
{
let
options
=
{
let
options
=
{
url
:
"TestAbility/pages/
SR000HTP2K
"
,
url
:
"TestAbility/pages/
BindMenu
"
,
}
}
try
{
try
{
router
.
clear
();
router
.
clear
();
let
pages
=
router
.
getState
();
let
pages
=
router
.
getState
();
if
(
pages
==
null
||
!
(
"
SR000HTP2K
"
==
pages
.
name
))
{
if
(
pages
==
null
||
!
(
"
BindMenu
"
==
pages
.
name
))
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
console
.
info
(
`${SUITE} router.pushUrl success`
);
console
.
info
(
`${SUITE} router.pushUrl success`
);
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
...
@@ -65,7 +65,7 @@ export default function SR000HTP2KTest() {
...
@@ -65,7 +65,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_placeholder'
,
10
,
""
)
sendEventByKey
(
'
BindMenu
_placeholder'
,
10
,
""
)
}
}
let
callback
=
(
event
)
=>
{
let
callback
=
(
event
)
=>
{
...
@@ -79,7 +79,7 @@ export default function SR000HTP2KTest() {
...
@@ -79,7 +79,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_bindMenu1'
,
10
,
""
)
sendEventByKey
(
'
BindMenu
_bindMenu1'
,
10
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
console
.
info
(
`${SUITE} ${CASE} END`
);
});
});
...
@@ -120,7 +120,7 @@ export default function SR000HTP2KTest() {
...
@@ -120,7 +120,7 @@ export default function SR000HTP2KTest() {
events_emitter
.
on
(
event
,
callback
);
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2K
_bindContextMenu1'
,
11
,
""
)
sendEventByKey
(
'
BindMenu
_bindContextMenu1'
,
11
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESG_S
ITest() {
export default function
CanvasAP
ITest() {
const SUITE = '
SR000HUESG_S
I'
const SUITE = '
CanvasAP
I'
describe('
SR000HUESG_S
ITest', function () {
describe('
CanvasAP
ITest', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUESG_S
I",
url: "TestAbility/pages/
CanvasAP
I",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUESG_S
I" == pages.name)) {
if (pages == null || !("
CanvasAP
I" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUESG_SITest() {
...
@@ -49,7 +49,7 @@ export default function SR000HUESG_SITest() {
it('ArkUI_Canvas_API_0100', 0, async function (done) {
it('ArkUI_Canvas_API_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_0100'
let CASE = 'ArkUI_Canvas_API_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESG_S
I_Canvas1')
let strJson = getInspectorByKey('
CanvasAP
I_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUET2
Test() {
export default function
CanvasAPICanvasRender
Test() {
const SUITE = '
SR000HUET2
'
const SUITE = '
CanvasAPICanvasRender
'
describe('
SR000HUET2
Test', function () {
describe('
CanvasAPICanvasRender
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUET2
",
url: "TestAbility/pages/
CanvasAPICanvasRender
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUET2
" == pages.name)) {
if (pages == null || !("
CanvasAPICanvasRender
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUET2Test() {
...
@@ -49,7 +49,7 @@ export default function SR000HUET2Test() {
it('ArkUI_Canvas_API_CanvasRender_0100', 0, async function (done) {
it('ArkUI_Canvas_API_CanvasRender_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_CanvasRender_0100'
let CASE = 'ArkUI_Canvas_API_CanvasRender_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUET2
_Canvas1')
let strJson = getInspectorByKey('
CanvasAPICanvasRender
_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESL
Test() {
export default function
CanvasAPIUnit
Test() {
const SUITE = '
SR000HUESL
'
const SUITE = '
CanvasAPIUnit
'
describe('
SR000HUESL
Test', function () {
describe('
CanvasAPIUnit
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUESL
",
url: "TestAbility/pages/
CanvasAPIUnit
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUESL
" == pages.name)) {
if (pages == null || !("
CanvasAPIUnit
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUESLTest() {
...
@@ -49,7 +49,7 @@ export default function SR000HUESLTest() {
it('ArkUI_Canvas_API_Unit_0100', 0, async function (done) {
it('ArkUI_Canvas_API_Unit_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_Unit_0100'
let CASE = 'ArkUI_Canvas_API_Unit_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESL
_Canvas1')
let strJson = getInspectorByKey('
CanvasAPIUnit
_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUES3
Test() {
export default function
CanvasColor
Test() {
const SUITE = '
SR000HUES3
'
const SUITE = '
CanvasColor
'
describe('
SR000HUES3
Test', function () {
describe('
CanvasColor
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUES3
",
url: "TestAbility/pages/
CanvasColor
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUES3
" == pages.name)) {
if (pages == null || !("
CanvasColor
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUES3Test() {
...
@@ -49,7 +49,7 @@ export default function SR000HUES3Test() {
it('ArkUI_Canvas_Color_0100', 0, async function (done) {
it('ArkUI_Canvas_Color_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Color_0100'
let CASE = 'ArkUI_Canvas_Color_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES3
_Canvas1')
let strJson = getInspectorByKey('
CanvasColor
_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUES7
Test() {
export default function
CanvasShader
Test() {
const SUITE = '
SR000HUES7
'
const SUITE = '
CanvasShader
'
describe('
SR000HUES7
Test', function () {
describe('
CanvasShader
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUES7
",
url: "TestAbility/pages/
CanvasShader
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUES7
" == pages.name)) {
if (pages == null || !("
CanvasShader
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUES7Test() {
...
@@ -49,7 +49,7 @@ export default function SR000HUES7Test() {
it('ArkUI_Canvas_Shader_0100', 0, async function (done) {
it('ArkUI_Canvas_Shader_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Shader_0100'
let CASE = 'ArkUI_Canvas_Shader_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES7
_Canvas1')
let strJson = getInspectorByKey('
CanvasShader
_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
...
@@ -64,7 +64,7 @@ export default function SR000HUES7Test() {
...
@@ -64,7 +64,7 @@ export default function SR000HUES7Test() {
it('ArkUI_Canvas_Shader_0200', 0, async function (done) {
it('ArkUI_Canvas_Shader_0200', 0, async function (done) {
let CASE = 'ArkUI_Canvas_Shader_0200'
let CASE = 'ArkUI_Canvas_Shader_0200'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUES7
_Canvas2')
let strJson = getInspectorByKey('
CanvasShader
_Canvas2')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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 @@
...
@@ -14,19 +14,19 @@
*/
*/
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
export default function
SR000HR4C4
Test() {
export default function
ImageText
Test() {
const SUITE = '
SR000HR4C4
'
const SUITE = '
ImageText
'
describe('
SR000HR4C4
Test', function () {
describe('
ImageText
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HR4C4
",
url: "TestAbility/pages/
ImageText
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HR4C4
" == pages.name)) {
if (pages == null || !("
ImageText
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -48,19 +48,19 @@ export default function SR000HR4C4Test() {
...
@@ -48,19 +48,19 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0100'
let CASE = 'ArkUI_Image_Text_0100'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan1');
let strJson = getInspectorByKey('
ImageText
_ImageSpan1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BASELINE')
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BASELINE')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan2');
strJson = getInspectorByKey('
ImageText
_ImageSpan2');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('CENTER')
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('CENTER')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan3');
strJson = getInspectorByKey('
ImageText
_ImageSpan3');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('TOP')
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('TOP')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan4');
strJson = getInspectorByKey('
ImageText
_ImageSpan4');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BOTTOM')
expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BOTTOM')
...
@@ -77,27 +77,27 @@ export default function SR000HR4C4Test() {
...
@@ -77,27 +77,27 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0200'
let CASE = 'ArkUI_Image_Text_0200'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan5');
let strJson = getInspectorByKey('
ImageText
_ImageSpan5');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Contain')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Contain')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan6');
strJson = getInspectorByKey('
ImageText
_ImageSpan6');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Cover')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Cover')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan7');
strJson = getInspectorByKey('
ImageText
_ImageSpan7');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Auto')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Auto')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan8');
strJson = getInspectorByKey('
ImageText
_ImageSpan8');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Fill')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.Fill')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan9');
strJson = getInspectorByKey('
ImageText
_ImageSpan9');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.ScaleDown')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.ScaleDown')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan10');
strJson = getInspectorByKey('
ImageText
_ImageSpan10');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.objectFit).assertEqual('ImageFit.None')
expect(obj.$attrs.objectFit).assertEqual('ImageFit.None')
...
@@ -114,11 +114,11 @@ export default function SR000HR4C4Test() {
...
@@ -114,11 +114,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0300'
let CASE = 'ArkUI_Image_Text_0300'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_Text1');
let strJson = getInspectorByKey('
ImageText
_Text1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.textIndent).assertEqual(undefined)
expect(obj.$attrs.textIndent).assertEqual(undefined)
if ( sendEventByKey('
SR000HR4C4
_Button1', 10, null) ) {
if ( sendEventByKey('
ImageText
_Button1', 10, null) ) {
let strJson = getInspectorByKey('
SR000HR4C4
_Text1');
let strJson = getInspectorByKey('
ImageText
_Text1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.textIndent).assertEqual(undefined)
expect(obj.$attrs.textIndent).assertEqual(undefined)
}
}
...
@@ -135,15 +135,15 @@ export default function SR000HR4C4Test() {
...
@@ -135,15 +135,15 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0400'
let CASE = 'ArkUI_Image_Text_0400'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan12');
let strJson = getInspectorByKey('
ImageText
_ImageSpan12');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan13');
strJson = getInspectorByKey('
ImageText
_ImageSpan13');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan14');
strJson = getInspectorByKey('
ImageText
_ImageSpan14');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
@@ -161,11 +161,11 @@ export default function SR000HR4C4Test() {
...
@@ -161,11 +161,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0500'
let CASE = 'ArkUI_Image_Text_0500'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan15');
let strJson = getInspectorByKey('
ImageText
_ImageSpan15');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan16');
strJson = getInspectorByKey('
ImageText
_ImageSpan16');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
@@ -183,11 +183,11 @@ export default function SR000HR4C4Test() {
...
@@ -183,11 +183,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0600'
let CASE = 'ArkUI_Image_Text_0600'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan17');
let strJson = getInspectorByKey('
ImageText
_ImageSpan17');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan18');
strJson = getInspectorByKey('
ImageText
_ImageSpan18');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
...
@@ -205,11 +205,11 @@ export default function SR000HR4C4Test() {
...
@@ -205,11 +205,11 @@ export default function SR000HR4C4Test() {
let CASE = 'ArkUI_Image_Text_0700'
let CASE = 'ArkUI_Image_Text_0700'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
let strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan19');
let strJson = getInspectorByKey('
ImageText
_ImageSpan19');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
expect(obj.$attrs.width).assertEqual('276.00px')
strJson = getInspectorByKey('
SR000HR4C4
_ImageSpan20');
strJson = getInspectorByKey('
ImageText
_ImageSpan20');
obj = JSON.parse(strJson);
obj = JSON.parse(strJson);
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.height).assertEqual('183.00px')
expect(obj.$attrs.width).assertEqual('276.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 @@
...
@@ -12,30 +12,30 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
SR000HTP23Test from './SR000HTP23
.test'
import
ListDeleteTest from './ListDelete
.test'
import
SR000HTP2CTest from './SR000HTP2C
.test'
import
ListReboundTest from './ListRebound
.test'
import
SR000HTP2GTest from './SR000HTP2G
.test'
import
TextAreaCallbackTest from './TextAreaCallback
.test'
import
SR000HTP2KTest from './SR000HTP2K
.test'
import
BindMenuTest from './BindMenu
.test'
import
SR000HTP2OTest from './SR000HTP2O
.test'
import
NavigationParamTest from './NavigationParam
.test'
import
SR000HR4C4Test from './SR000HR4C4
.test'
import
ImageTextTest from './ImageText
.test'
import
SR000HUES3Test from './SR000HUES3
.test'
import
CanvasColorTest from './CanvasColor
.test'
import
SR000HUESCTest from './SR000HUESC
.test'
import
OffScreenCanvasTest from './OffScreenCanvas
.test'
import
SR000HUESLTest from './SR000HUESL
.test'
import
CanvasAPIUnitTest from './CanvasAPIUnit
.test'
import
SR000HUET2Test from './SR000HUET2
.test'
import
CanvasAPICanvasRenderTest from './CanvasAPICanvasRender
.test'
import
SR000HUESG_SITest from './SR000HUESG_S
I.test'
import
CanvasAPITest from './CanvasAP
I.test'
import
SR000HUES7Test from './SR000HUES7
.test'
import
CanvasShaderTest from './CanvasShader
.test'
export default function testsuite() {
export default function testsuite() {
SR000HTP23
Test()
ListDelete
Test()
SR000HTP2C
Test()
ListRebound
Test()
SR000HTP2G
Test()
TextAreaCallback
Test()
SR000HTP2K
Test()
BindMenu
Test()
SR000HTP2O
Test()
NavigationParam
Test()
SR000HR4C4
Test()
ImageText
Test()
SR000HUES3
Test()
CanvasColor
Test()
SR000HUESC
Test()
OffScreenCanvas
Test()
SR000HUESL
Test()
CanvasAPIUnit
Test()
SR000HUET2
Test()
CanvasAPICanvasRender
Test()
SR000HUESG_S
ITest()
CanvasAP
ITest()
SR000HUES7
Test()
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'
...
@@ -17,9 +17,9 @@ import router from '@ohos.router'
import {Driver, Component, ON} from '@ohos.UiTest'
import {Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
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) {
function getRectCenter(rect: string) {
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
return [
return [
...
@@ -35,16 +35,16 @@ export default function SR000HTP23Test() {
...
@@ -35,16 +35,16 @@ export default function SR000HTP23Test() {
]
]
}
}
describe('
SR000HTP23
Test', function () {
describe('
ListDelete
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HTP23
",
url: "TestAbility/pages/
ListDelete
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HTP23
" == pages.name)) {
if (pages == null || !("
ListDelete
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).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 @@
...
@@ -15,9 +15,9 @@
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {Driver, Component, ON} from '@ohos.UiTest'
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) {
function getRectCenter(rect: string) {
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',')
return [
return [
...
@@ -25,16 +25,16 @@ export default function SR000HTP2CTest() {
...
@@ -25,16 +25,16 @@ export default function SR000HTP2CTest() {
px2vp(parseFloat(rtn[1].trim()) + (parseFloat(rtn[3].trim()) - parseFloat(rtn[1].trim())) / 2),
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) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HTP2C
",
url: "TestAbility/pages/
ListRebound
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HTP2C
" == pages.name)) {
if (pages == null || !("
ListRebound
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).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'
...
@@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
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;
const waitUiReadyMs = 500;
function sleep(time) {
function sleep(time) {
let date = new Date()
let date = new Date()
...
@@ -30,16 +30,16 @@ export default function SR000HTP2OTest() {
...
@@ -30,16 +30,16 @@ export default function SR000HTP2OTest() {
}
}
}
}
describe('
SR000HTP2O
Test', function () {
describe('
NavigationParam
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HTP2O
",
url: "TestAbility/pages/
NavigationParam
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HTP2O
" == pages.name)) {
if (pages == null || !("
NavigationParam
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -60,7 +60,7 @@ export default function SR000HTP2OTest() {
...
@@ -60,7 +60,7 @@ export default function SR000HTP2OTest() {
it('ArkUI_Navigation_0100', 0, async function (done) {
it('ArkUI_Navigation_0100', 0, async function (done) {
let CASE = 'ArkUI_Navigation_0100'
let CASE = 'ArkUI_Navigation_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HTP2O
_Navigation1')
let strJson = getInspectorByKey('
NavigationParam
_Navigation1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Navigation')
expect(obj.$type).assertEqual('Navigation')
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
...
@@ -75,7 +75,7 @@ export default function SR000HTP2OTest() {
...
@@ -75,7 +75,7 @@ export default function SR000HTP2OTest() {
it('ArkUI_Navigation_0200', 0, async function (done) {
it('ArkUI_Navigation_0200', 0, async function (done) {
let CASE = 'ArkUI_Navigation_0200'
let CASE = 'ArkUI_Navigation_0200'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HTP2O
_Navigation2')
let strJson = getInspectorByKey('
NavigationParam
_Navigation2')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.title).assertEqual('test_string_title')
expect(obj.$attrs.title).assertEqual('test_string_title')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
export default function
SR000HUESC
Test() {
export default function
OffScreenCanvas
Test() {
const SUITE = '
SR000HUESC
'
const SUITE = '
OffScreenCanvas
'
describe('
SR000HUESC
Test', function () {
describe('
OffScreenCanvas
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HUESC
",
url: "TestAbility/pages/
OffScreenCanvas
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HUESC
" == pages.name)) {
if (pages == null || !("
OffScreenCanvas
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -49,7 +49,7 @@ export default function SR000HUESCTest() {
...
@@ -49,7 +49,7 @@ export default function SR000HUESCTest() {
it('ArkUI_Canvas_API_OffScreenCanvas_0100', 0, async function (done) {
it('ArkUI_Canvas_API_OffScreenCanvas_0100', 0, async function (done) {
let CASE = 'ArkUI_Canvas_API_OffScreenCanvas_0100'
let CASE = 'ArkUI_Canvas_API_OffScreenCanvas_0100'
console.info(`${SUITE} ${CASE} START`)
console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('
SR000HUESC
_Canvas1')
let strJson = getInspectorByKey('
OffScreenCanvas
_Canvas1')
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Canvas')
expect(obj.$type).assertEqual('Canvas')
console.info(`${SUITE} ${CASE} END`)
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'
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import
router
from
'@ohos.router'
import
router
from
'@ohos.router'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
{
UiDriver
,
UiComponent
,
BY
,
Driver
,
Component
,
ON
}
from
'@ohos.UiTest'
import
events_emitter
from
'@ohos.events.emitter'
;
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
;
const
waitUiReadyMs
=
500
;
describe
(
'
SR000HTP2G
Test'
,
function
()
{
describe
(
'
TextAreaCallback
Test'
,
function
()
{
beforeEach
(
async
function
(
done
)
{
beforeEach
(
async
function
(
done
)
{
let
options
=
{
let
options
=
{
url
:
"TestAbility/pages/
SR000HTP2G
"
,
url
:
"TestAbility/pages/
TextAreaCallback
"
,
}
}
try
{
try
{
router
.
clear
();
router
.
clear
();
let
pages
=
router
.
getState
();
let
pages
=
router
.
getState
();
if
(
pages
==
null
||
!
(
"
SR000HTP2G
"
==
pages
.
name
))
{
if
(
pages
==
null
||
!
(
"
TextAreaCallback
"
==
pages
.
name
))
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
await
router
.
pushUrl
(
options
)
.
then
(()
=>
{
console
.
info
(
`${SUITE} router.pushUrl success`
);
console
.
info
(
`${SUITE} router.pushUrl success`
);
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
...
@@ -64,7 +64,7 @@ export default function SR000HTP2GTest() {
...
@@ -64,7 +64,7 @@ export default function SR000HTP2GTest() {
events_emitter
.
on
(
event
,
callback
);
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2G
_TextArea2'
,
10
,
""
)
sendEventByKey
(
'
TextAreaCallback
_TextArea2'
,
10
,
""
)
}
}
let
callback
=
(
event
)
=>
{
let
callback
=
(
event
)
=>
{
...
@@ -78,7 +78,7 @@ export default function SR000HTP2GTest() {
...
@@ -78,7 +78,7 @@ export default function SR000HTP2GTest() {
events_emitter
.
on
(
event
,
callback
);
events_emitter
.
on
(
event
,
callback
);
let
driver
=
Driver
.
create
()
let
driver
=
Driver
.
create
()
await
driver
.
delayMs
(
waitUiReadyMs
)
await
driver
.
delayMs
(
waitUiReadyMs
)
sendEventByKey
(
'
SR000HTP2G
_TextArea1'
,
10
,
""
)
sendEventByKey
(
'
TextAreaCallback
_TextArea1'
,
10
,
""
)
console
.
info
(
`${SUITE} ${CASE} END`
);
console
.
info
(
`${SUITE} ${CASE} END`
);
});
});
...
...
arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
{
"src"
:
[
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HTP23
"
,
"TestAbility/pages/
ListDelete
"
,
"TestAbility/pages/
SR000HTP2C
"
,
"TestAbility/pages/
ListRebound
"
,
"TestAbility/pages/
SR000HTP2G
"
,
"TestAbility/pages/
TextAreaCallback
"
,
"TestAbility/pages/
SR000HTP2K
"
,
"TestAbility/pages/
BindMenu
"
,
"TestAbility/pages/
SR000HTP2O
"
,
"TestAbility/pages/
NavigationParam
"
,
"TestAbility/pages/
SR000HR4C4
"
,
"TestAbility/pages/
ImageText
"
,
"TestAbility/pages/
SR000HUES3
"
,
"TestAbility/pages/
CanvasColor
"
,
"TestAbility/pages/
SR000HUESC
"
,
"TestAbility/pages/
OffScreenCanvas
"
,
"TestAbility/pages/
SR000HUESL
"
,
"TestAbility/pages/
CanvasAPIUnit
"
,
"TestAbility/pages/
SR000HUET2
"
,
"TestAbility/pages/
CanvasAPICanvasRender
"
,
"TestAbility/pages/
SR000HUESG_S
I"
,
"TestAbility/pages/
CanvasAP
I"
,
"TestAbility/pages/
SR000HUES7
"
"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 {
...
@@ -24,14 +24,14 @@ struct UserDialog0100 {
this.controller.close()
this.controller.close()
this.action()
this.action()
})
})
.key('
SR000HRF74
_Button_Close_1')
.key('
CustomDialogMask
_Button_Close_1')
}.padding(20)
}.padding(20)
}
}
}
}
@Entry
@Entry
@Component
@Component
struct
SR000HRF74
{
struct
CustomDialogMask
{
dialogController: CustomDialogController = new CustomDialogController({
dialogController: CustomDialogController = new CustomDialogController({
builder: UserDialog0100({ action: this.afterClose }),
builder: UserDialog0100({ action: this.afterClose }),
cancel: this.onCancel
cancel: this.onCancel
...
@@ -74,7 +74,7 @@ struct SR000HRF74 {
...
@@ -74,7 +74,7 @@ struct SR000HRF74 {
.onClick(() => {
.onClick(() => {
this.dialogController.open()
this.dialogController.open()
})
})
.key('
SR000HRF74
_Button_Open_1')
.key('
CustomDialogMask
_Button_Open_1')
Button('maskColor set by Color')
Button('maskColor set by Color')
.margin(10)
.margin(10)
.width('90%')
.width('90%')
...
@@ -86,7 +86,7 @@ struct SR000HRF74 {
...
@@ -86,7 +86,7 @@ struct SR000HRF74 {
.onClick(() => {
.onClick(() => {
this.dialogController2.open()
this.dialogController2.open()
})
})
.key('
SR000HRF74
_Button_Open_2')
.key('
CustomDialogMask
_Button_Open_2')
Button('maskColor set by string')
Button('maskColor set by string')
.margin(10)
.margin(10)
.width('90%')
.width('90%')
...
@@ -98,7 +98,7 @@ struct SR000HRF74 {
...
@@ -98,7 +98,7 @@ struct SR000HRF74 {
.onClick(() => {
.onClick(() => {
this.dialogController3.open()
this.dialogController3.open()
})
})
.key('
SR000HRF74
_Button_Open_3')
.key('
CustomDialogMask
_Button_Open_3')
Button('maskColor set by Resource')
Button('maskColor set by Resource')
.margin(10)
.margin(10)
.width('90%')
.width('90%')
...
@@ -110,7 +110,7 @@ struct SR000HRF74 {
...
@@ -110,7 +110,7 @@ struct SR000HRF74 {
.onClick(() => {
.onClick(() => {
this.dialogController4.open()
this.dialogController4.open()
})
})
.key('
SR000HRF74
_Button_Open_4')
.key('
CustomDialogMask
_Button_Open_4')
Button('maskColor set by number')
Button('maskColor set by number')
.margin(10)
.margin(10)
.width('90%')
.width('90%')
...
@@ -122,7 +122,7 @@ struct SR000HRF74 {
...
@@ -122,7 +122,7 @@ struct SR000HRF74 {
.onClick(() => {
.onClick(() => {
this.dialogController5.open()
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';
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Entry
@Component
@Component
struct
SR000HV334
{
struct
ListScroll
{
@State listPosition: number = 0;
@State listPosition: number = 0;
private arr: number[] = Array.apply(this, {length: 60}).map((item, i) => i)
private arr: number[] = Array.apply(this, {length: 60}).map((item, i) => i)
private scrollerForList: Scroller = new Scroller()
private scrollerForList: Scroller = new Scroller()
...
@@ -28,24 +28,24 @@ struct SR000HV334 {
...
@@ -28,24 +28,24 @@ struct SR000HV334 {
.onClick(() => {
.onClick(() => {
this.scrollerForList.scrollToIndex(14, false)
this.scrollerForList.scrollToIndex(14, false)
}).height(45)
}).height(45)
.key('
SR000HV334
_Button_To_14')
.key('
ListScroll
_Button_To_14')
Button("To(15)")
Button("To(15)")
.onClick(() => {
.onClick(() => {
this.scrollerForList.scrollToIndex(15, true)
this.scrollerForList.scrollToIndex(15, true)
}).height(45)
}).height(45)
.key('
SR000HV334
_Button_To_15')
.key('
ListScroll
_Button_To_15')
}.margin({top: 10})
}.margin({top: 10})
Row() {
Row() {
Button("To(0)")
Button("To(0)")
.onClick(() => {
.onClick(() => {
this.scrollerForList.scrollToIndex(0, false)
this.scrollerForList.scrollToIndex(0, false)
}).height(45)
}).height(45)
.key('
SR000HV334
_Button_To_0')
.key('
ListScroll
_Button_To_0')
Button("To(max)")
Button("To(max)")
.onClick(() => {
.onClick(() => {
this.scrollerForList.scrollToIndex(this.arr.length - 1, true)
this.scrollerForList.scrollToIndex(this.arr.length - 1, true)
}).height(45)
}).height(45)
.key('
SR000HV334
_Button_To_max')
.key('
ListScroll
_Button_To_max')
}.margin({top: 10})
}.margin({top: 10})
List({ space: 5,initialIndex:23, scroller: this.scrollerForList }) {
List({ space: 5,initialIndex:23, scroller: this.scrollerForList }) {
...
@@ -92,7 +92,7 @@ struct SR000HV334 {
...
@@ -92,7 +92,7 @@ struct SR000HV334 {
events_emitter.emit(event, eventData)
events_emitter.emit(event, eventData)
}
}
})
})
.key('
SR000HV334
_List1')
.key('
ListScroll
_List1')
}.width('100%').height('100%')
}.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 @@
...
@@ -15,9 +15,9 @@
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
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;
const waitUiReadyMs = 500;
function sleep(time) {
function sleep(time) {
let date = new Date()
let date = new Date()
...
@@ -29,16 +29,16 @@ export default function SR000HRF74Test() {
...
@@ -29,16 +29,16 @@ export default function SR000HRF74Test() {
}
}
}
}
describe('
SR000HRF74
Test', function () {
describe('
CustomDialogMask
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HRF74
",
url: "TestAbility/pages/
CustomDialogMask
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HRF74
" == pages.name)) {
if (pages == null || !("
CustomDialogMask
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -63,12 +63,12 @@ export default function SR000HRF74Test() {
...
@@ -63,12 +63,12 @@ export default function SR000HRF74Test() {
sleep(2)
sleep(2)
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_1', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
console.info(`${SUITE} ${CASE} END`);
sleep(1)
sleep(1)
...
@@ -87,13 +87,13 @@ export default function SR000HRF74Test() {
...
@@ -87,13 +87,13 @@ export default function SR000HRF74Test() {
sleep(1)
sleep(1)
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_2', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_2', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
console.info(`${SUITE} ${CASE} END`);
sleep(1)
sleep(1)
...
@@ -111,13 +111,13 @@ export default function SR000HRF74Test() {
...
@@ -111,13 +111,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_3', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_3', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
console.info(`${SUITE} ${CASE} END`);
sleep(1)
sleep(1)
...
@@ -135,13 +135,13 @@ export default function SR000HRF74Test() {
...
@@ -135,13 +135,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_4', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_4', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
console.info(`${SUITE} ${CASE} END`);
sleep(1)
sleep(1)
...
@@ -159,13 +159,13 @@ export default function SR000HRF74Test() {
...
@@ -159,13 +159,13 @@ export default function SR000HRF74Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HRF74
_Button_Open_5', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Open_5', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strObj = getInspectorByKey('
SR000HRF74
_Button_Close_1');
let strObj = getInspectorByKey('
CustomDialogMask
_Button_Close_1');
let obj = JSON.parse(strObj);
let obj = JSON.parse(strObj);
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible");
sendEventByKey('
SR000HRF74
_Button_Close_1', 10, "")
sendEventByKey('
CustomDialogMask
_Button_Close_1', 10, "")
console.info(`${SUITE} ${CASE} END`);
console.info(`${SUITE} ${CASE} END`);
sleep(1)
sleep(1)
...
...
arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
@@ -12,10 +12,10 @@
...
@@ -12,10 +12,10 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
SR000HV334Test from './SR000HV334
.test'
import
ListScrollTest from './ListScroll
.test'
import
SR000HRF74Test from './SR000HRF74
.test'
import
CustomDialogMaskTest from './CustomDialogMask
.test'
export default function testsuite() {
export default function testsuite() {
SR000HRF74
Test()
CustomDialogMask
Test()
SR000HV334
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'
...
@@ -16,20 +16,20 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
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;
const waitUiReadyMs = 500;
describe('
SR000HV334
Test', function () {
describe('
ListScroll
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HV334
",
url: "TestAbility/pages/
ListScroll
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HV334
" == pages.name)) {
if (pages == null || !("
ListScroll
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -61,7 +61,7 @@ export default function SR000HV334Test() {
...
@@ -61,7 +61,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
events_emitter.on(event, callback);
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_14', 10, "")
sendEventByKey('
ListScroll
_Button_To_14', 10, "")
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
});
});
...
@@ -85,7 +85,7 @@ export default function SR000HV334Test() {
...
@@ -85,7 +85,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
events_emitter.on(event, callback);
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_15', 10, "")
sendEventByKey('
ListScroll
_Button_To_15', 10, "")
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
});
});
...
@@ -109,7 +109,7 @@ export default function SR000HV334Test() {
...
@@ -109,7 +109,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
events_emitter.on(event, callback);
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_0', 10, "")
sendEventByKey('
ListScroll
_Button_To_0', 10, "")
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
});
});
...
@@ -133,7 +133,7 @@ export default function SR000HV334Test() {
...
@@ -133,7 +133,7 @@ export default function SR000HV334Test() {
events_emitter.on(event, callback);
events_emitter.on(event, callback);
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HV334
_Button_To_max', 10, "")
sendEventByKey('
ListScroll
_Button_To_max', 10, "")
console.info(`${SUITE} ${CASE} END`)
console.info(`${SUITE} ${CASE} END`)
});
});
...
...
arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
{
"src"
:
[
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HV334
"
,
"TestAbility/pages/
ListScroll
"
,
"TestAbility/pages/
SR000HRF74
"
"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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HTP1U
{
struct
CounterEnable
{
@State value: number = 0
@State value: number = 0
@State enable_inc: boolean = false
@State enable_inc: boolean = false
@State enable_dec: boolean = false
@State enable_dec: boolean = false
...
@@ -33,17 +33,17 @@ struct SR000HTP1U {
...
@@ -33,17 +33,17 @@ struct SR000HTP1U {
})
})
.enableInc(this.enable_inc)
.enableInc(this.enable_inc)
.enableDec(this.enable_dec)
.enableDec(this.enable_dec)
.key('
SR000HTP1U
_Counter_1')
.key('
CounterEnable
_Counter_1')
Button("enable_inc_true")
Button("enable_inc_true")
.onClick(() => {
.onClick(() => {
this.enable_inc = true;
this.enable_inc = true;
}).height(45)
}).height(45)
.key('
SR000HTP1U
_Button_1')
.key('
CounterEnable
_Button_1')
Button("enable_dec_true")
Button("enable_dec_true")
.onClick(() => {
.onClick(() => {
this.enable_dec = true;
this.enable_dec = true;
}).height(45)
}).height(45)
.key('
SR000HTP1U
_Button_2')
.key('
CounterEnable
_Button_2')
}.width("100%")
}.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 @@
...
@@ -14,7 +14,7 @@
*/
*/
@Entry
@Entry
@Component
@Component
struct
SR000HTP21
{
struct
TextAreaSelect
{
controller: TextAreaController = new TextAreaController()
controller: TextAreaController = new TextAreaController()
controller2: TextAreaController = new TextAreaController()
controller2: TextAreaController = new TextAreaController()
controller3: TextAreaController = new TextAreaController()
controller3: TextAreaController = new TextAreaController()
...
@@ -33,79 +33,79 @@ struct SR000HTP21 {
...
@@ -33,79 +33,79 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.fontColor(Color.Red)
.tabIndex(1)
.tabIndex(1)
.key('
SR000HTP21
_TextArea_1')
.key('
TextAreaSelect
_TextArea_1')
Button("Show selected (-2,-1)")
Button("Show selected (-2,-1)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(-2,-1)
this.controller.setTextSelection(-2,-1)
})
})
.key('
SR000HTP21
_Button_1')
.key('
TextAreaSelect
_Button_1')
Button("Show selected (-1,0)")
Button("Show selected (-1,0)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(-1,0)
this.controller.setTextSelection(-1,0)
})
})
.key('
SR000HTP21
_Button_2')
.key('
TextAreaSelect
_Button_2')
Button("Show selected (0,3)")
Button("Show selected (0,3)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(0,3)
this.controller.setTextSelection(0,3)
})
})
.key('
SR000HTP21
_Button_3')
.key('
TextAreaSelect
_Button_3')
Button("Show selected (1,3)")
Button("Show selected (1,3)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(1,3)
this.controller.setTextSelection(1,3)
})
})
.key('
SR000HTP21
_Button_4')
.key('
TextAreaSelect
_Button_4')
Button("Show selected (-1,6)")
Button("Show selected (-1,6)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(-1,6)
this.controller.setTextSelection(-1,6)
})
})
.key('
SR000HTP21
_Button_5')
.key('
TextAreaSelect
_Button_5')
Button("Show selected (0,6)")
Button("Show selected (0,6)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(0,6)
this.controller.setTextSelection(0,6)
})
})
.key('
SR000HTP21
_Button_6')
.key('
TextAreaSelect
_Button_6')
Button("Show selected (-1,8)")
Button("Show selected (-1,8)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(-1,8)
this.controller.setTextSelection(-1,8)
})
})
.key('
SR000HTP21
_Button_7')
.key('
TextAreaSelect
_Button_7')
Button("Show selected (0,8)")
Button("Show selected (0,8)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(0,8)
this.controller.setTextSelection(0,8)
})
})
.key('
SR000HTP21
_Button_8')
.key('
TextAreaSelect
_Button_8')
Button("Show selected (null,null)")
Button("Show selected (null,null)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(null,null)
this.controller.setTextSelection(null,null)
})
})
.key('
SR000HTP21
_Button_9')
.key('
TextAreaSelect
_Button_9')
Button("Show selected (null,undefined)")
Button("Show selected (null,undefined)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(null,undefined)
this.controller.setTextSelection(null,undefined)
})
})
.key('
SR000HTP21
_Button_10')
.key('
TextAreaSelect
_Button_10')
Button("Show selected (undefined,null)")
Button("Show selected (undefined,null)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(undefined,null)
this.controller.setTextSelection(undefined,null)
})
})
.key('
SR000HTP21
_Button_11')
.key('
TextAreaSelect
_Button_11')
Button("Show selected (undefined,undefined)")
Button("Show selected (undefined,undefined)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller.setTextSelection(undefined,undefined)
this.controller.setTextSelection(undefined,undefined)
})
})
.key('
SR000HTP21
_Button_12')
.key('
TextAreaSelect
_Button_12')
TextArea({ text: '', placeholder: 'input your word', controller: this.controller2 })
TextArea({ text: '', placeholder: 'input your word', controller: this.controller2 })
.placeholderColor("rgb(0,0,225)")
.placeholderColor("rgb(0,0,225)")
.placeholderFont({ size: 20, weight: 100, family: 'cursive', style: FontStyle.Italic })
.placeholderFont({ size: 20, weight: 100, family: 'cursive', style: FontStyle.Italic })
...
@@ -117,13 +117,13 @@ struct SR000HTP21 {
...
@@ -117,13 +117,13 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.fontColor(Color.Red)
.tabIndex(2)
.tabIndex(2)
.key('
SR000HTP21
_TextArea_2')
.key('
TextAreaSelect
_TextArea_2')
Button("Show selected (1,3)")
Button("Show selected (1,3)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller2.setTextSelection(1,3)
this.controller2.setTextSelection(1,3)
})
})
.key('
SR000HTP21
_Button_13')
.key('
TextAreaSelect
_Button_13')
TextArea({ text: '北京aaaaa上海tianjin深圳', placeholder: 'input your word', controller: this.controller3 })
TextArea({ text: '北京aaaaa上海tianjin深圳', placeholder: 'input your word', controller: this.controller3 })
.width(200)
.width(200)
.height(50)
.height(50)
...
@@ -137,13 +137,13 @@ struct SR000HTP21 {
...
@@ -137,13 +137,13 @@ struct SR000HTP21 {
.fontStyle(FontStyle.Normal)
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.fontColor(Color.Red)
.tabIndex(3)
.tabIndex(3)
.key('
SR000HTP21
_TextArea_3')
.key('
TextAreaSelect
_TextArea_3')
Button("Show selected (6,10)")
Button("Show selected (6,10)")
.margin(30)
.margin(30)
.onClick(() => {
.onClick(() => {
this.controller3.setTextSelection(6,10)
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'
...
@@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
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;
const waitUiReadyMs = 500;
function sleep(time) {
function sleep(time) {
let date = new Date()
let date = new Date()
...
@@ -30,16 +30,16 @@ export default function SR000HTP1UTest() {
...
@@ -30,16 +30,16 @@ export default function SR000HTP1UTest() {
}
}
}
}
describe('
SR000HTP1U
Test', function () {
describe('
CounterEnable
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HTP1U
",
url: "TestAbility/pages/
CounterEnable
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HTP1U
" == pages.name)) {
if (pages == null || !("
CounterEnable
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -61,8 +61,8 @@ export default function SR000HTP1UTest() {
...
@@ -61,8 +61,8 @@ export default function SR000HTP1UTest() {
let CASE = 'ArkUI_Counter_0100'
let CASE = 'ArkUI_Counter_0100'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
sendEventByKey('
SR000HTP1U
_Button_1', 10, "")
sendEventByKey('
CounterEnable
_Button_1', 10, "")
let strJson = getInspectorByKey('
SR000HTP1U
_Counter_1');
let strJson = getInspectorByKey('
CounterEnable
_Counter_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual("Counter");
expect(obj.$type).assertEqual("Counter");
...
@@ -78,8 +78,8 @@ export default function SR000HTP1UTest() {
...
@@ -78,8 +78,8 @@ export default function SR000HTP1UTest() {
it('ArkUI_Counter_0200', 0, async function (done) {
it('ArkUI_Counter_0200', 0, async function (done) {
let CASE = 'ArkUI_Counter_0200'
let CASE = 'ArkUI_Counter_0200'
console.info(`${SUITE} ${CASE} START`);
console.info(`${SUITE} ${CASE} START`);
sendEventByKey('
SR000HTP1U
_Button_2', 10, "")
sendEventByKey('
CounterEnable
_Button_2', 10, "")
let strJson = getInspectorByKey('
SR000HTP1U
_Counter_1');
let strJson = getInspectorByKey('
CounterEnable
_Counter_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual("Counter");
expect(obj.$type).assertEqual("Counter");
...
...
arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
@@ -12,10 +12,10 @@
...
@@ -12,10 +12,10 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
SR000HTP1UTest from './SR000HTP1U
.test'
import
CounterEnableTest from './CounterEnable
.test'
import
SR000HTP21Test from './SR000HTP21
.test'
import
TextAreaSelectTest from './TextAreaSelect
.test'
export default function testsuite() {
export default function testsuite() {
SR000HTP1U
Test()
CounterEnable
Test()
SR000HTP21
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'
...
@@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium'
import router from '@ohos.router'
import router from '@ohos.router'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
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;
const waitUiReadyMs = 500;
describe('
SR000HTP21
Test', function () {
describe('
TextAreaSelect
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/
SR000HTP21
",
url: "TestAbility/pages/
TextAreaSelect
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("
SR000HTP21
" == pages.name)) {
if (pages == null || !("
TextAreaSelect
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
@@ -54,9 +54,9 @@ export default function SR000HTP21Test() {
...
@@ -54,9 +54,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_1', 10, "")
sendEventByKey('
TextAreaSelect
_Button_1', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
...
@@ -75,9 +75,9 @@ export default function SR000HTP21Test() {
...
@@ -75,9 +75,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_2', 10, "")
sendEventByKey('
TextAreaSelect
_Button_2', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -97,9 +97,9 @@ export default function SR000HTP21Test() {
...
@@ -97,9 +97,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_3', 10, "")
sendEventByKey('
TextAreaSelect
_Button_3', 10, "")
await driver.delayMs(waitUiReadyMs*5)
await driver.delayMs(waitUiReadyMs*5)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("3");
expect(obj.$attrs.caretPosition).assertEqual("3");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -119,9 +119,9 @@ export default function SR000HTP21Test() {
...
@@ -119,9 +119,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_4', 10, "")
sendEventByKey('
TextAreaSelect
_Button_4', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("3");
expect(obj.$attrs.caretPosition).assertEqual("3");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -141,9 +141,9 @@ export default function SR000HTP21Test() {
...
@@ -141,9 +141,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_5', 10, "")
sendEventByKey('
TextAreaSelect
_Button_5', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -163,9 +163,9 @@ export default function SR000HTP21Test() {
...
@@ -163,9 +163,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_6', 10, "")
sendEventByKey('
TextAreaSelect
_Button_6', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -185,9 +185,9 @@ export default function SR000HTP21Test() {
...
@@ -185,9 +185,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_7', 10, "")
sendEventByKey('
TextAreaSelect
_Button_7', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -207,9 +207,9 @@ export default function SR000HTP21Test() {
...
@@ -207,9 +207,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_8', 10, "")
sendEventByKey('
TextAreaSelect
_Button_8', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("6");
expect(obj.$attrs.caretPosition).assertEqual("6");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -229,9 +229,9 @@ export default function SR000HTP21Test() {
...
@@ -229,9 +229,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_9', 10, "")
sendEventByKey('
TextAreaSelect
_Button_9', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -251,9 +251,9 @@ export default function SR000HTP21Test() {
...
@@ -251,9 +251,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_10', 10, "")
sendEventByKey('
TextAreaSelect
_Button_10', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -273,9 +273,9 @@ export default function SR000HTP21Test() {
...
@@ -273,9 +273,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_11', 10, "")
sendEventByKey('
TextAreaSelect
_Button_11', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -295,9 +295,9 @@ export default function SR000HTP21Test() {
...
@@ -295,9 +295,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_12', 10, "")
sendEventByKey('
TextAreaSelect
_Button_12', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_1');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -317,9 +317,9 @@ export default function SR000HTP21Test() {
...
@@ -317,9 +317,9 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_13', 10, "")
sendEventByKey('
TextAreaSelect
_Button_13', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_2');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_2');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
@@ -339,11 +339,11 @@ export default function SR000HTP21Test() {
...
@@ -339,11 +339,11 @@ export default function SR000HTP21Test() {
let driver = Driver.create()
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_TextArea_3', 10, "")
sendEventByKey('
TextAreaSelect
_TextArea_3', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
sendEventByKey('
SR000HTP21
_Button_14', 10, "")
sendEventByKey('
TextAreaSelect
_Button_14', 10, "")
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
let strJson = getInspectorByKey('
SR000HTP21
_TextArea_3');
let strJson = getInspectorByKey('
TextAreaSelect
_TextArea_3');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.caretPosition).assertEqual("10");
expect(obj.$attrs.caretPosition).assertEqual("10");
await driver.delayMs(waitUiReadyMs)
await driver.delayMs(waitUiReadyMs)
...
...
arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
{
"src"
:
[
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/Index"
,
"TestAbility/pages/
SR000HTP1U
"
,
"TestAbility/pages/
CounterEnable
"
,
"TestAbility/pages/
SR000HTP21
"
"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';
...
@@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter';
@Entry
@Entry
@Component
@Component
struct S
R000HQURK
{
struct S
hortcutKey
{
private arr: string[] = ['0', '1','2', '3', '4', '5', '6', '7', '8', '9',
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']
'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 {
...
@@ -48,7 +48,7 @@ struct SR000HQURK {
.onClick(() => {
.onClick(() => {
this.sendEvent('Ctrl_' + item, this.baseEvent + index)
this.sendEvent('Ctrl_' + item, this.baseEvent + index)
})
})
.key('S
R000HQURK
_Button_' + index)
.key('S
hortcutKey
_Button_' + index)
}, item => item)
}, item => item)
ForEach(this.functionKey, (item, index) => {
ForEach(this.functionKey, (item, index) => {
...
@@ -58,7 +58,7 @@ struct SR000HQURK {
...
@@ -58,7 +58,7 @@ struct SR000HQURK {
this.sendEvent('Ctrl_' + item, this.baseEvent2 + index)
this.sendEvent('Ctrl_' + item, this.baseEvent2 + index)
})
})
.width("80%")
.width("80%")
.key('S
R000HQURK
2_Ctrl_' + item)
.key('S
hortcutKey
2_Ctrl_' + item)
}, item => item)
}, item => item)
Button("Shift+1")
Button("Shift+1")
...
...
arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets
浏览文件 @
d6a87ef3
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import S
R000HQURKTest from './SR000HQURK
.test'
import S
hortcutKeyTest from './ShortcutKey
.test'
export default function testsuite() {
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'
...
@@ -18,9 +18,9 @@ import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest'
import events_emitter from '@ohos.events.emitter';
import events_emitter from '@ohos.events.emitter';
import input from '@ohos.multimodalInput.keyCode';
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) {
function sleep(time) {
let date = new Date()
let date = new Date()
let start = date.getSeconds()
let start = date.getSeconds()
...
@@ -99,16 +99,16 @@ export default function SR000HQURKTest() {
...
@@ -99,16 +99,16 @@ export default function SR000HQURKTest() {
const baseEvent = 62000
const baseEvent = 62000
const baseEvent2 = 73000
const baseEvent2 = 73000
describe('S
R000HQURK
Test', function () {
describe('S
hortcutKey
Test', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
let options = {
let options = {
url: "TestAbility/pages/S
R000HQURK
",
url: "TestAbility/pages/S
hortcutKey
",
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
if (pages == null || !("S
R000HQURK
" == pages.name)) {
if (pages == null || !("S
hortcutKey
" == pages.name)) {
await router.pushUrl(options).then(()=>{
await router.pushUrl(options).then(()=>{
console.info(`${SUITE} router.pushUrl success`);
console.info(`${SUITE} router.pushUrl success`);
}).catch(err => {
}).catch(err => {
...
...
arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json
浏览文件 @
d6a87ef3
{
{
"src"
:
[
"src"
:
[
"TestAbility/pages/Index"
,
"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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录