From d6a87ef3fe86bc54d73182d5244e032659dd9693 Mon Sep 17 00:00:00 2001 From: limeng Date: Sat, 1 Jul 2023 18:41:19 +0800 Subject: [PATCH] =?UTF-8?q?xts=E6=96=87=E4=BB=B6=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limeng --- .../pages/{SR000HTP2K.ets => BindMenu.ets} | 8 +-- .../{SR000HUESG_SI.ets => CanvasAPI.ets} | 4 +- ...000HUET2.ets => CanvasAPICanvasRender.ets} | 4 +- .../{SR000HUESL.ets => CanvasAPIUnit.ets} | 4 +- .../pages/{SR000HUES3.ets => CanvasColor.ets} | 4 +- .../{SR000HUES7.ets => CanvasShader.ets} | 6 +- .../pages/{SR000HR4C4.ets => ImageText.ets} | 48 ++++++------- .../pages/{SR000HTP23.ets => ListDelete.ets} | 2 +- .../pages/{SR000HTP2C.ets => ListRebound.ets} | 2 +- .../{SR000HTP2O.ets => NavigationParam.ets} | 6 +- .../{SR000HUESC.ets => OffScreenCanvas.ets} | 4 +- .../{SR000HTP2G.ets => TextAreaCallback.ets} | 6 +- ...{SR000HTP2K.test.ets => BindMenu.test.ets} | 16 ++--- ...00HUESG_SI.test.ets => CanvasAPI.test.ets} | 12 ++-- ...est.ets => CanvasAPICanvasRender.test.ets} | 12 ++-- ...0HUESL.test.ets => CanvasAPIUnit.test.ets} | 12 ++-- ...000HUES3.test.ets => CanvasColor.test.ets} | 12 ++-- ...00HUES7.test.ets => CanvasShader.test.ets} | 14 ++-- ...SR000HR4C4.test.ets => ImageText.test.ets} | 54 +++++++-------- .../src/main/ets/test/List.test.ets | 48 ++++++------- ...R000HTP23.test.ets => ListDelete.test.ets} | 10 +-- ...000HTP2C.test.ets => ListRebound.test.ets} | 10 +-- ...TP2O.test.ets => NavigationParam.test.ets} | 14 ++-- ...UESC.test.ets => OffScreenCanvas.test.ets} | 12 ++-- ...P2G.test.ets => TextAreaCallback.test.ets} | 14 ++-- .../resources/base/profile/test_pages.json | 24 +++---- .../{SR000HRF74.ets => CustomDialogMask.ets} | 14 ++-- .../pages/{SR000HV334.ets => ListScroll.ets} | 12 ++-- ...F74.test.ets => CustomDialogMask.test.ets} | 40 +++++------ .../src/main/ets/test/List.test.ets | 8 +-- ...R000HV334.test.ets => ListScroll.test.ets} | 18 ++--- .../resources/base/profile/test_pages.json | 4 +- .../{SR000HTP1U.ets => CounterEnable.ets} | 8 +-- .../{SR000HTP21.ets => TextAreaSelect.ets} | 36 +++++----- ...0HTP1U.test.ets => CounterEnable.test.ets} | 18 ++--- .../src/main/ets/test/List.test.ets | 8 +-- ...HTP21.test.ets => TextAreaSelect.test.ets} | 68 +++++++++---------- .../resources/base/profile/test_pages.json | 4 +- .../pages/{SR000HQURK.ets => ShortcutKey.ets} | 6 +- .../src/main/ets/test/List.test.ets | 4 +- ...000HQURK.test.ets => ShortcutKey.test.ets} | 10 +-- .../resources/base/profile/test_pages.json | 2 +- 42 files changed, 311 insertions(+), 311 deletions(-) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HTP2K.ets => BindMenu.ets} (93%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUESG_SI.ets => CanvasAPI.ets} (96%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUET2.ets => CanvasAPICanvasRender.ets} (96%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUESL.ets => CanvasAPIUnit.ets} (96%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUES3.ets => CanvasColor.ets} (94%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUES7.ets => CanvasShader.ets} (95%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HR4C4.ets => ImageText.ets} (83%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HTP23.ets => ListDelete.ets} (96%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HTP2C.ets => ListRebound.ets} (96%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HTP2O.ets => NavigationParam.ets} (92%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HUESC.ets => OffScreenCanvas.ets} (94%) rename arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/{SR000HTP2G.ets => TextAreaCallback.ets} (93%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HTP2K.test.ets => BindMenu.test.ets} (87%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUESG_SI.test.ets => CanvasAPI.test.ets} (84%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUET2.test.ets => CanvasAPICanvasRender.test.ets} (82%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUESL.test.ets => CanvasAPIUnit.test.ets} (84%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUES3.test.ets => CanvasColor.test.ets} (84%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUES7.test.ets => CanvasShader.test.ets} (84%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HR4C4.test.ets => ImageText.test.ets} (78%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HTP23.test.ets => ListDelete.test.ets} (95%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HTP2C.test.ets => ListRebound.test.ets} (91%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HTP2O.test.ets => NavigationParam.test.ets} (84%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HUESC.test.ets => OffScreenCanvas.test.ets} (83%) rename arkui/ace_ets_component_api/src/main/ets/test/{SR000HTP2G.test.ets => TextAreaCallback.test.ets} (84%) rename arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/{SR000HRF74.ets => CustomDialogMask.ets} (88%) rename arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/{SR000HV334.ets => ListScroll.ets} (90%) rename arkui/ace_ets_component_api_four/src/main/ets/test/{SR000HRF74.test.ets => CustomDialogMask.test.ets} (77%) rename arkui/ace_ets_component_api_four/src/main/ets/test/{SR000HV334.test.ets => ListScroll.test.ets} (87%) rename arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/{SR000HTP1U.ets => CounterEnable.ets} (86%) rename arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/{SR000HTP21.ets => TextAreaSelect.ets} (83%) rename arkui/ace_ets_component_api_three/src/main/ets/test/{SR000HTP1U.test.ets => CounterEnable.test.ets} (81%) rename arkui/ace_ets_component_api_three/src/main/ets/test/{SR000HTP21.test.ets => TextAreaSelect.test.ets} (82%) rename arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/{SR000HQURK.ets => ShortcutKey.ets} (92%) rename arkui/ace_ets_component_api_two/src/main/ets/test/{SR000HQURK.test.ets => ShortcutKey.test.ets} (94%) diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2K.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/BindMenu.ets similarity index 93% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2K.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/BindMenu.ets index ecb6217ec..ca5e4cbbc 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2K.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/BindMenu.ets @@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter'; @Entry @Component -struct SR000HTP2K { +struct BindMenu { @Builder MenuBuilder() { Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { Text('Test menu item 1') @@ -38,7 +38,7 @@ struct SR000HTP2K { Row() { Text('placeholder') .width("40%").height('100%') - .key('SR000HTP2K_placeholder') + .key('BindMenu_placeholder') Text('click for Menu') .width("60%").height('100%') .borderWidth(1).borderColor(Color.Green).textAlign(TextAlign.Center) @@ -82,7 +82,7 @@ struct SR000HTP2K { events_emitter.emit(event, eventData) } }) - .key('SR000HTP2K_bindMenu1') + .key('BindMenu_bindMenu1') } .width("90%").height(50).margin(10) @@ -120,7 +120,7 @@ struct SR000HTP2K { events_emitter.emit(event, eventData) } }) - .key('SR000HTP2K_bindContextMenu1') + .key('BindMenu_bindContextMenu1') } .width("90%").height(50).margin(10) } diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESG_SI.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPI.ets similarity index 96% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESG_SI.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPI.ets index 3824b58be..344303665 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESG_SI.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPI.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUESG_SI { +struct CanvasAPI { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) @@ -46,7 +46,7 @@ struct SR000HUESG_SI { .height('500px') .backgroundColor('#ff83835d') .margin({ top: 5 }) - .key('SR000HUESG_SI_Canvas1') + .key('CanvasAPI_Canvas1') .onReady(() => { this.noTransform() this.transformByField1() diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUET2.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPICanvasRender.ets similarity index 96% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUET2.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPICanvasRender.ets index 30e51bc36..fc0f7a9ad 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUET2.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPICanvasRender.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUET2 { +struct CanvasAPICanvasRender { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) @@ -27,7 +27,7 @@ struct SR000HUET2 { .width('100%') .height('30%') .backgroundColor('#ffff00') - .key('SR000HUET2_Canvas1') + .key('CanvasAPICanvasRender_Canvas1') .onReady(() => { this.context_fillText1() this.context_fillText2() diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESL.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPIUnit.ets similarity index 96% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESL.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPIUnit.ets index 6883694e0..d575e9454 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESL.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasAPIUnit.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUESL { +struct CanvasAPIUnit { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) @@ -27,7 +27,7 @@ struct SR000HUESL { .width('100%') .height('30%') .backgroundColor('#ffff00') - .key('SR000HUESL_Canvas1') + .key('CanvasAPIUnit_Canvas1') .onReady(() => { this.context_font1() this.context_font2() diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES3.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasColor.ets similarity index 94% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES3.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasColor.ets index c52d54e3f..c6e2dfa1a 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES3.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasColor.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUES3 { +struct CanvasColor { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private img: ImageBitmap = new ImageBitmap('/pages/images/test1.jpg') @@ -35,7 +35,7 @@ struct SR000HUES3 { this.strokeStyle_CanvasGradient() this.strokeStyle_CanvasPattern() }) - .id('SR000HUES3_Canvas1') + .id('CanvasColor_Canvas1') } } } diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES7.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasShader.ets similarity index 95% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES7.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasShader.ets index d586e361a..345970596 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUES7.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/CanvasShader.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUES7 { +struct CanvasShader { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) @@ -28,7 +28,7 @@ struct SR000HUES7 { .height('20%') .backgroundColor('#ff83835d') .margin({ top: 5 }) - .key('SR000HUES7_Canvas1') + .key('CanvasShader_Canvas1') .onReady(() => { this.createConicGradient1() this.createConicGradient2() @@ -54,7 +54,7 @@ struct SR000HUES7 { .height('20%') .backgroundColor('#ff83835d') .margin({ top: 5 }) - .key('SR000HUES7_Canvas2') + .key('CanvasShader_Canvas2') .onReady(() => { this.clamp1() this.clamp2() diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HR4C4.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ImageText.ets similarity index 83% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HR4C4.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ImageText.ets index 116ba7c77..a0695fe6a 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HR4C4.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ImageText.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HR4C4 { +struct ImageText { @State align1: ImageSpanAlignment = ImageSpanAlignment.BASELINE @State align2: ImageSpanAlignment = ImageSpanAlignment.CENTER @State align3: ImageSpanAlignment = ImageSpanAlignment.TOP @@ -33,19 +33,19 @@ struct SR000HR4C4 { Text() { ImageSpan($r('app.media.icon')).width('114px').height("114px") .verticalAlign(this.align1) - .key('SR000HR4C4_ImageSpan1') + .key('ImageText_ImageSpan1') Span('Span').fontSize(this.fontSize1) ImageSpan('/pages/images/img1.png').width('150px').height("150px") .verticalAlign(this.align2) - .key('SR000HR4C4_ImageSpan2') + .key('ImageText_ImageSpan2') Span('Span').fontSize(this.fontSize2) ImageSpan($r('app.media.icon')).width('114px').height("114px") .verticalAlign(this.align3) - .key('SR000HR4C4_ImageSpan3') + .key('ImageText_ImageSpan3') Span('Span').fontSize(this.fontSize3) ImageSpan('/pages/images/img1.png').width('150px').height("150px") .verticalAlign(this.align4) - .key('SR000HR4C4_ImageSpan4') + .key('ImageText_ImageSpan4') Span('Span Text4').fontSize(this.fontSize4) } .borderWidth(1).borderColor(Color.Green) @@ -55,7 +55,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.Contain) - .key('SR000HR4C4_ImageSpan5') + .key('ImageText_ImageSpan5') } .borderWidth(1) .borderColor(Color.Green) @@ -65,7 +65,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.Cover) - .key('SR000HR4C4_ImageSpan6') + .key('ImageText_ImageSpan6') } .borderWidth(1) .borderColor(Color.Green) @@ -75,7 +75,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.Auto) - .key('SR000HR4C4_ImageSpan7') + .key('ImageText_ImageSpan7') } .borderWidth(1) .borderColor(Color.Green) @@ -85,7 +85,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.Fill) - .key('SR000HR4C4_ImageSpan8') + .key('ImageText_ImageSpan8') } .borderWidth(1) .borderColor(Color.Green) @@ -95,7 +95,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.ScaleDown) - .key('SR000HR4C4_ImageSpan9') + .key('ImageText_ImageSpan9') } .borderWidth(1) .borderColor(Color.Green) @@ -105,7 +105,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width(this.w+'px').height(this.h+'px') .objectFit(ImageFit.None) - .key('SR000HR4C4_ImageSpan10') + .key('ImageText_ImageSpan10') } .borderWidth(1) .borderColor(Color.Green) @@ -114,16 +114,16 @@ struct SR000HR4C4 { Text() { Span('Span Text1 ').fontSize(20) - .key('SR000HR4C4_Span1') + .key('ImageText_Span1') ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") - .key('SR000HR4C4_ImageSpan11') + .key('ImageText_ImageSpan11') Span('Span Text2 ').fontSize(20) } .borderWidth(1).borderColor(Color.Green) .margin({top: 15}) .width('90%') .textIndent(this.indent) - .key('SR000HR4C4_Text1') + .key('ImageText_Text1') Button("indent+50") .margin(10) .width('30%') @@ -135,11 +135,11 @@ struct SR000HR4C4 { .onClick(() => { this.indent += 50; }) - .key('SR000HR4C4_Button1') + .key('ImageText_Button1') Text() { ImageSpan(null).width('276px').height("183px") - .key('SR000HR4C4_ImageSpan12') + .key('ImageText_ImageSpan12') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -147,7 +147,7 @@ struct SR000HR4C4 { Text() { ImageSpan(undefined).width('276px').height("183px") - .key('SR000HR4C4_ImageSpan13') + .key('ImageText_ImageSpan13') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -155,7 +155,7 @@ struct SR000HR4C4 { Text() { ImageSpan('').width('276px').height("183px") - .key('SR000HR4C4_ImageSpan14') + .key('ImageText_ImageSpan14') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -165,7 +165,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") .verticalAlign(null) - .key('SR000HR4C4_ImageSpan15') + .key('ImageText_ImageSpan15') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -174,7 +174,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") .verticalAlign(undefined) - .key('SR000HR4C4_ImageSpan16') + .key('ImageText_ImageSpan16') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -183,7 +183,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") .objectFit(null) - .key('SR000HR4C4_ImageSpan17') + .key('ImageText_ImageSpan17') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -192,7 +192,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") .objectFit(undefined) - .key('SR000HR4C4_ImageSpan18') + .key('ImageText_ImageSpan18') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -200,7 +200,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") - .key('SR000HR4C4_ImageSpan19') + .key('ImageText_ImageSpan19') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) @@ -209,7 +209,7 @@ struct SR000HR4C4 { Text() { ImageSpan('/pages/images/test1.jpg').width('276px').height("183px") - .key('SR000HR4C4_ImageSpan20') + .key('ImageText_ImageSpan20') } .borderWidth(1).borderColor(Color.Green) .margin({ top: 5 }) diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP23.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListDelete.ets similarity index 96% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP23.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListDelete.ets index e513d29ea..c59e94370 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP23.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListDelete.ets @@ -16,7 +16,7 @@ import MyUtils from '../common/MyUtils'; @Entry @Component -struct SR000HTP23 { +struct ListDelete { @State arr: number[] = [0, 1, 2] @State arr2: number[] = [0, 1, 2] diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2C.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListRebound.ets similarity index 96% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2C.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListRebound.ets index a74e3f44d..6e0e72dd1 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2C.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/ListRebound.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HTP2C { +struct ListRebound { @State Number: String[] = ['0', '1', '2', '3'] scroller: Scroller = new Scroller() @State isRefreshing: boolean = false diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2O.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/NavigationParam.ets similarity index 92% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2O.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/NavigationParam.ets index 3025a69e8..2dd9d575a 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2O.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/NavigationParam.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HTP2O { +struct NavigationParam { private arr: number[] = [0, 1, 2] @Builder NavigationTitle() { @@ -62,7 +62,7 @@ struct SR000HTP2O { } .title($r("app.string.test_title")) .titleMode(NavigationTitleMode.Free) - .key('SR000HTP2O_Navigation1') + .key('NavigationParam_Navigation1') Navigation() { List({ space: 5, initialIndex: 0 }) { @@ -85,7 +85,7 @@ struct SR000HTP2O { } .title("test_string_title") .titleMode(NavigationTitleMode.Free) - .key('SR000HTP2O_Navigation2') + .key('NavigationParam_Navigation2') } diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESC.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/OffScreenCanvas.ets similarity index 94% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESC.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/OffScreenCanvas.ets index a9314056a..34349dcf2 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HUESC.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/OffScreenCanvas.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HUESC { +struct OffScreenCanvas { private settings: RenderingContextSettings = new RenderingContextSettings(true) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private settings_false: RenderingContextSettings = new RenderingContextSettings(false) @@ -26,7 +26,7 @@ struct SR000HUESC { Canvas(this.context) .width('100%') .height('100%') - .key('SR000HUESC_Canvas1') + .key('OffScreenCanvas_Canvas1') .onReady(() => { this.offscreenCanvas.getContext(null) this.offscreenCanvas.getContext(undefined) diff --git a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2G.ets b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/TextAreaCallback.ets similarity index 93% rename from arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2G.ets rename to arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/TextAreaCallback.ets index 41cab2756..7d924f8af 100644 --- a/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/SR000HTP2G.ets +++ b/arkui/ace_ets_component_api/src/main/ets/TestAbility/pages/TextAreaCallback.ets @@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter'; @Entry @Component -struct SR000HTP2G { +struct TextAreaCallback { controller: TextAreaController = new TextAreaController() build() { @@ -59,7 +59,7 @@ struct SR000HTP2G { .width('80%') .tabIndex(2) .margin({ top: 5, bottom: 5 }) - .key('SR000HTP2G_TextArea1') + .key('TextAreaCallback_TextArea1') TextArea({ placeholder: 'input your word', controller: this.controller }) .placeholderColor("rgb(0,0,225)") @@ -82,7 +82,7 @@ struct SR000HTP2G { .width('80%') .tabIndex(3) .margin({ top: 5, bottom: 5 }) - .key('SR000HTP2G_TextArea2') + .key('TextAreaCallback_TextArea2') }.width('100%') } diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2K.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/BindMenu.test.ets similarity index 87% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2K.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/BindMenu.test.ets index 2abbeb8a6..472faddad 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2K.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/BindMenu.test.ets @@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP2KTest() { +export default function BindMenuTest() { - const SUITE = 'SR000HTP2K' + const SUITE = 'BindMenu' const waitUiReadyMs = 500; - describe('SR000HTP2KTest', function () { + describe('BindMenuTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP2K", + url: "TestAbility/pages/BindMenu", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP2K" == pages.name)) { + if (pages == null || !("BindMenu" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -65,7 +65,7 @@ export default function SR000HTP2KTest() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP2K_placeholder', 10, "") + sendEventByKey('BindMenu_placeholder', 10, "") } let callback = (event) => { @@ -79,7 +79,7 @@ export default function SR000HTP2KTest() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP2K_bindMenu1', 10, "") + sendEventByKey('BindMenu_bindMenu1', 10, "") console.info(`${SUITE} ${CASE} END`); }); @@ -120,7 +120,7 @@ export default function SR000HTP2KTest() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP2K_bindContextMenu1', 11, "") + sendEventByKey('BindMenu_bindContextMenu1', 11, "") console.info(`${SUITE} ${CASE} END`); }); diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESG_SI.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPI.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUESG_SI.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/CanvasAPI.test.ets index 12c2a0072..de3750d9b 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESG_SI.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPI.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUESG_SITest() { +export default function CanvasAPITest() { - const SUITE = 'SR000HUESG_SI' - describe('SR000HUESG_SITest', function () { + const SUITE = 'CanvasAPI' + describe('CanvasAPITest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUESG_SI", + url: "TestAbility/pages/CanvasAPI", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUESG_SI" == pages.name)) { + if (pages == null || !("CanvasAPI" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUESG_SITest() { it('ArkUI_Canvas_API_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_API_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUESG_SI_Canvas1') + let strJson = getInspectorByKey('CanvasAPI_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUET2.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPICanvasRender.test.ets similarity index 82% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUET2.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/CanvasAPICanvasRender.test.ets index 2bac0dc8a..501318800 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUET2.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPICanvasRender.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUET2Test() { +export default function CanvasAPICanvasRenderTest() { - const SUITE = 'SR000HUET2' - describe('SR000HUET2Test', function () { + const SUITE = 'CanvasAPICanvasRender' + describe('CanvasAPICanvasRenderTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUET2", + url: "TestAbility/pages/CanvasAPICanvasRender", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUET2" == pages.name)) { + if (pages == null || !("CanvasAPICanvasRender" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUET2Test() { it('ArkUI_Canvas_API_CanvasRender_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_API_CanvasRender_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUET2_Canvas1') + let strJson = getInspectorByKey('CanvasAPICanvasRender_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESL.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPIUnit.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUESL.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/CanvasAPIUnit.test.ets index af6530ce7..7b3c61bfd 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESL.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/CanvasAPIUnit.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUESLTest() { +export default function CanvasAPIUnitTest() { - const SUITE = 'SR000HUESL' - describe('SR000HUESLTest', function () { + const SUITE = 'CanvasAPIUnit' + describe('CanvasAPIUnitTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUESL", + url: "TestAbility/pages/CanvasAPIUnit", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUESL" == pages.name)) { + if (pages == null || !("CanvasAPIUnit" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUESLTest() { it('ArkUI_Canvas_API_Unit_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_API_Unit_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUESL_Canvas1') + let strJson = getInspectorByKey('CanvasAPIUnit_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUES3.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/CanvasColor.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUES3.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/CanvasColor.test.ets index 34fb2a041..b22d8a345 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUES3.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/CanvasColor.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUES3Test() { +export default function CanvasColorTest() { - const SUITE = 'SR000HUES3' - describe('SR000HUES3Test', function () { + const SUITE = 'CanvasColor' + describe('CanvasColorTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUES3", + url: "TestAbility/pages/CanvasColor", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUES3" == pages.name)) { + if (pages == null || !("CanvasColor" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUES3Test() { it('ArkUI_Canvas_Color_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_Color_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUES3_Canvas1') + let strJson = getInspectorByKey('CanvasColor_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUES7.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/CanvasShader.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUES7.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/CanvasShader.test.ets index 3e1f47ee2..631ef157e 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUES7.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/CanvasShader.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUES7Test() { +export default function CanvasShaderTest() { - const SUITE = 'SR000HUES7' - describe('SR000HUES7Test', function () { + const SUITE = 'CanvasShader' + describe('CanvasShaderTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUES7", + url: "TestAbility/pages/CanvasShader", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUES7" == pages.name)) { + if (pages == null || !("CanvasShader" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUES7Test() { it('ArkUI_Canvas_Shader_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_Shader_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUES7_Canvas1') + let strJson = getInspectorByKey('CanvasShader_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) @@ -64,7 +64,7 @@ export default function SR000HUES7Test() { it('ArkUI_Canvas_Shader_0200', 0, async function (done) { let CASE = 'ArkUI_Canvas_Shader_0200' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUES7_Canvas2') + let strJson = getInspectorByKey('CanvasShader_Canvas2') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HR4C4.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/ImageText.test.ets similarity index 78% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HR4C4.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/ImageText.test.ets index 197149db8..719ed7c3d 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HR4C4.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/ImageText.test.ets @@ -14,19 +14,19 @@ */ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' -export default function SR000HR4C4Test() { +export default function ImageTextTest() { - const SUITE = 'SR000HR4C4' - describe('SR000HR4C4Test', function () { + const SUITE = 'ImageText' + describe('ImageTextTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HR4C4", + url: "TestAbility/pages/ImageText", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HR4C4" == pages.name)) { + if (pages == null || !("ImageText" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -48,19 +48,19 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0100' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan1'); + let strJson = getInspectorByKey('ImageText_ImageSpan1'); let obj = JSON.parse(strJson); expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BASELINE') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan2'); + strJson = getInspectorByKey('ImageText_ImageSpan2'); obj = JSON.parse(strJson); expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('CENTER') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan3'); + strJson = getInspectorByKey('ImageText_ImageSpan3'); obj = JSON.parse(strJson); expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('TOP') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan4'); + strJson = getInspectorByKey('ImageText_ImageSpan4'); obj = JSON.parse(strJson); expect(obj.$attrs.verticalAlign.split('.')[1]).assertEqual('BOTTOM') @@ -77,27 +77,27 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0200' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan5'); + let strJson = getInspectorByKey('ImageText_ImageSpan5'); let obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.Contain') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan6'); + strJson = getInspectorByKey('ImageText_ImageSpan6'); obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.Cover') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan7'); + strJson = getInspectorByKey('ImageText_ImageSpan7'); obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.Auto') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan8'); + strJson = getInspectorByKey('ImageText_ImageSpan8'); obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.Fill') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan9'); + strJson = getInspectorByKey('ImageText_ImageSpan9'); obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.ScaleDown') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan10'); + strJson = getInspectorByKey('ImageText_ImageSpan10'); obj = JSON.parse(strJson); expect(obj.$attrs.objectFit).assertEqual('ImageFit.None') @@ -114,11 +114,11 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0300' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_Text1'); + let strJson = getInspectorByKey('ImageText_Text1'); let obj = JSON.parse(strJson); expect(obj.$attrs.textIndent).assertEqual(undefined) - if ( sendEventByKey('SR000HR4C4_Button1', 10, null) ) { - let strJson = getInspectorByKey('SR000HR4C4_Text1'); + if ( sendEventByKey('ImageText_Button1', 10, null) ) { + let strJson = getInspectorByKey('ImageText_Text1'); let obj = JSON.parse(strJson); expect(obj.$attrs.textIndent).assertEqual(undefined) } @@ -135,15 +135,15 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0400' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan12'); + let strJson = getInspectorByKey('ImageText_ImageSpan12'); let obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan13'); + strJson = getInspectorByKey('ImageText_ImageSpan13'); obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan14'); + strJson = getInspectorByKey('ImageText_ImageSpan14'); obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') @@ -161,11 +161,11 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0500' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan15'); + let strJson = getInspectorByKey('ImageText_ImageSpan15'); let obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan16'); + strJson = getInspectorByKey('ImageText_ImageSpan16'); obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') @@ -183,11 +183,11 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0600' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan17'); + let strJson = getInspectorByKey('ImageText_ImageSpan17'); let obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan18'); + strJson = getInspectorByKey('ImageText_ImageSpan18'); obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') @@ -205,11 +205,11 @@ export default function SR000HR4C4Test() { let CASE = 'ArkUI_Image_Text_0700' console.info(`${SUITE} ${CASE} START`); - let strJson = getInspectorByKey('SR000HR4C4_ImageSpan19'); + let strJson = getInspectorByKey('ImageText_ImageSpan19'); let obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') - strJson = getInspectorByKey('SR000HR4C4_ImageSpan20'); + strJson = getInspectorByKey('ImageText_ImageSpan20'); obj = JSON.parse(strJson); expect(obj.$attrs.height).assertEqual('183.00px') expect(obj.$attrs.width).assertEqual('276.00px') diff --git a/arkui/ace_ets_component_api/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/List.test.ets index e5659f4a4..cedf9f20e 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/List.test.ets @@ -12,30 +12,30 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import SR000HTP23Test from './SR000HTP23.test' -import SR000HTP2CTest from './SR000HTP2C.test' -import SR000HTP2GTest from './SR000HTP2G.test' -import SR000HTP2KTest from './SR000HTP2K.test' -import SR000HTP2OTest from './SR000HTP2O.test' -import SR000HR4C4Test from './SR000HR4C4.test' -import SR000HUES3Test from './SR000HUES3.test' -import SR000HUESCTest from './SR000HUESC.test' -import SR000HUESLTest from './SR000HUESL.test' -import SR000HUET2Test from './SR000HUET2.test' -import SR000HUESG_SITest from './SR000HUESG_SI.test' -import SR000HUES7Test from './SR000HUES7.test' +import ListDeleteTest from './ListDelete.test' +import ListReboundTest from './ListRebound.test' +import TextAreaCallbackTest from './TextAreaCallback.test' +import BindMenuTest from './BindMenu.test' +import NavigationParamTest from './NavigationParam.test' +import ImageTextTest from './ImageText.test' +import CanvasColorTest from './CanvasColor.test' +import OffScreenCanvasTest from './OffScreenCanvas.test' +import CanvasAPIUnitTest from './CanvasAPIUnit.test' +import CanvasAPICanvasRenderTest from './CanvasAPICanvasRender.test' +import CanvasAPITest from './CanvasAPI.test' +import CanvasShaderTest from './CanvasShader.test' export default function testsuite() { - SR000HTP23Test() - SR000HTP2CTest() - SR000HTP2GTest() - SR000HTP2KTest() - SR000HTP2OTest() - SR000HR4C4Test() - SR000HUES3Test() - SR000HUESCTest() - SR000HUESLTest() - SR000HUET2Test() - SR000HUESG_SITest() - SR000HUES7Test() + ListDeleteTest() + ListReboundTest() + TextAreaCallbackTest() + BindMenuTest() + NavigationParamTest() + ImageTextTest() + CanvasColorTest() + OffScreenCanvasTest() + CanvasAPIUnitTest() + CanvasAPICanvasRenderTest() + CanvasAPITest() + CanvasShaderTest() } \ No newline at end of file diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP23.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets similarity index 95% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HTP23.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets index f6af6ea79..bb295f96d 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP23.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets @@ -17,9 +17,9 @@ import router from '@ohos.router' import {Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP23Test() { +export default function ListDeleteTest() { - const SUITE = 'SR000HTP23' + const SUITE = 'ListDelete' function getRectCenter(rect: string) { let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',') return [ @@ -35,16 +35,16 @@ export default function SR000HTP23Test() { ] } - describe('SR000HTP23Test', function () { + describe('ListDeleteTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP23", + url: "TestAbility/pages/ListDelete", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP23" == pages.name)) { + if (pages == null || !("ListDelete" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2C.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/ListRebound.test.ets similarity index 91% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2C.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/ListRebound.test.ets index 0444a1d76..d83b86e67 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2C.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/ListRebound.test.ets @@ -15,9 +15,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {Driver, Component, ON} from '@ohos.UiTest' -export default function SR000HTP2CTest() { +export default function ListReboundTest() { - const SUITE = 'SR000HTP2C' + const SUITE = 'ListRebound' function getRectCenter(rect: string) { let rtn = rect.replace(/\[/g, '').replace(/\]/g, ',').split(',') return [ @@ -25,16 +25,16 @@ export default function SR000HTP2CTest() { px2vp(parseFloat(rtn[1].trim()) + (parseFloat(rtn[3].trim()) - parseFloat(rtn[1].trim())) / 2), ] } - describe('SR000HTP2CTest', function () { + describe('ListReboundTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP2C", + url: "TestAbility/pages/ListRebound", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP2C" == pages.name)) { + if (pages == null || !("ListRebound" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2O.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/NavigationParam.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2O.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/NavigationParam.test.ets index b8f642efa..45d1c0e4f 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2O.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/NavigationParam.test.ets @@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP2OTest() { +export default function NavigationParamTest() { - const SUITE = 'SR000HTP2O' + const SUITE = 'NavigationParam' const waitUiReadyMs = 500; function sleep(time) { let date = new Date() @@ -30,16 +30,16 @@ export default function SR000HTP2OTest() { } } - describe('SR000HTP2OTest', function () { + describe('NavigationParamTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP2O", + url: "TestAbility/pages/NavigationParam", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP2O" == pages.name)) { + if (pages == null || !("NavigationParam" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -60,7 +60,7 @@ export default function SR000HTP2OTest() { it('ArkUI_Navigation_0100', 0, async function (done) { let CASE = 'ArkUI_Navigation_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HTP2O_Navigation1') + let strJson = getInspectorByKey('NavigationParam_Navigation1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Navigation') console.info(`${SUITE} ${CASE} END`) @@ -75,7 +75,7 @@ export default function SR000HTP2OTest() { it('ArkUI_Navigation_0200', 0, async function (done) { let CASE = 'ArkUI_Navigation_0200' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HTP2O_Navigation2') + let strJson = getInspectorByKey('NavigationParam_Navigation2') let obj = JSON.parse(strJson); expect(obj.$attrs.title).assertEqual('test_string_title') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESC.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/OffScreenCanvas.test.ets similarity index 83% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HUESC.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/OffScreenCanvas.test.ets index f8337c803..f3ba299b5 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HUESC.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/OffScreenCanvas.test.ets @@ -16,19 +16,19 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HUESCTest() { +export default function OffScreenCanvasTest() { - const SUITE = 'SR000HUESC' - describe('SR000HUESCTest', function () { + const SUITE = 'OffScreenCanvas' + describe('OffScreenCanvasTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HUESC", + url: "TestAbility/pages/OffScreenCanvas", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HUESC" == pages.name)) { + if (pages == null || !("OffScreenCanvas" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -49,7 +49,7 @@ export default function SR000HUESCTest() { it('ArkUI_Canvas_API_OffScreenCanvas_0100', 0, async function (done) { let CASE = 'ArkUI_Canvas_API_OffScreenCanvas_0100' console.info(`${SUITE} ${CASE} START`) - let strJson = getInspectorByKey('SR000HUESC_Canvas1') + let strJson = getInspectorByKey('OffScreenCanvas_Canvas1') let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Canvas') console.info(`${SUITE} ${CASE} END`) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2G.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/TextAreaCallback.test.ets similarity index 84% rename from arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2G.test.ets rename to arkui/ace_ets_component_api/src/main/ets/test/TextAreaCallback.test.ets index 39801b901..1b00ca14c 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/SR000HTP2G.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/TextAreaCallback.test.ets @@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP2GTest() { +export default function TextAreaCallbackTest() { - const SUITE = 'SR000HTP2G' + const SUITE = 'TextAreaCallback' const waitUiReadyMs = 500; - describe('SR000HTP2GTest', function () { + describe('TextAreaCallbackTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP2G", + url: "TestAbility/pages/TextAreaCallback", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP2G" == pages.name)) { + if (pages == null || !("TextAreaCallback" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -64,7 +64,7 @@ export default function SR000HTP2GTest() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP2G_TextArea2', 10, "") + sendEventByKey('TextAreaCallback_TextArea2', 10, "") } let callback = (event) => { @@ -78,7 +78,7 @@ export default function SR000HTP2GTest() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP2G_TextArea1', 10, "") + sendEventByKey('TextAreaCallback_TextArea1', 10, "") console.info(`${SUITE} ${CASE} END`); }); diff --git a/arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json b/arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json index c5b283ca6..e810380b2 100644 --- a/arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json +++ b/arkui/ace_ets_component_api/src/main/resources/base/profile/test_pages.json @@ -1,17 +1,17 @@ { "src": [ "TestAbility/pages/Index", - "TestAbility/pages/SR000HTP23", - "TestAbility/pages/SR000HTP2C", - "TestAbility/pages/SR000HTP2G", - "TestAbility/pages/SR000HTP2K", - "TestAbility/pages/SR000HTP2O", - "TestAbility/pages/SR000HR4C4", - "TestAbility/pages/SR000HUES3", - "TestAbility/pages/SR000HUESC", - "TestAbility/pages/SR000HUESL", - "TestAbility/pages/SR000HUET2", - "TestAbility/pages/SR000HUESG_SI", - "TestAbility/pages/SR000HUES7" + "TestAbility/pages/ListDelete", + "TestAbility/pages/ListRebound", + "TestAbility/pages/TextAreaCallback", + "TestAbility/pages/BindMenu", + "TestAbility/pages/NavigationParam", + "TestAbility/pages/ImageText", + "TestAbility/pages/CanvasColor", + "TestAbility/pages/OffScreenCanvas", + "TestAbility/pages/CanvasAPIUnit", + "TestAbility/pages/CanvasAPICanvasRender", + "TestAbility/pages/CanvasAPI", + "TestAbility/pages/CanvasShader" ] } diff --git a/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HRF74.ets b/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/CustomDialogMask.ets similarity index 88% rename from arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HRF74.ets rename to arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/CustomDialogMask.ets index 1dd3c5ad5..8bd340d14 100644 --- a/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HRF74.ets +++ b/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/CustomDialogMask.ets @@ -24,14 +24,14 @@ struct UserDialog0100 { this.controller.close() this.action() }) - .key('SR000HRF74_Button_Close_1') + .key('CustomDialogMask_Button_Close_1') }.padding(20) } } @Entry @Component -struct SR000HRF74 { +struct CustomDialogMask { dialogController: CustomDialogController = new CustomDialogController({ builder: UserDialog0100({ action: this.afterClose }), cancel: this.onCancel @@ -74,7 +74,7 @@ struct SR000HRF74 { .onClick(() => { this.dialogController.open() }) - .key('SR000HRF74_Button_Open_1') + .key('CustomDialogMask_Button_Open_1') Button('maskColor set by Color') .margin(10) .width('90%') @@ -86,7 +86,7 @@ struct SR000HRF74 { .onClick(() => { this.dialogController2.open() }) - .key('SR000HRF74_Button_Open_2') + .key('CustomDialogMask_Button_Open_2') Button('maskColor set by string') .margin(10) .width('90%') @@ -98,7 +98,7 @@ struct SR000HRF74 { .onClick(() => { this.dialogController3.open() }) - .key('SR000HRF74_Button_Open_3') + .key('CustomDialogMask_Button_Open_3') Button('maskColor set by Resource') .margin(10) .width('90%') @@ -110,7 +110,7 @@ struct SR000HRF74 { .onClick(() => { this.dialogController4.open() }) - .key('SR000HRF74_Button_Open_4') + .key('CustomDialogMask_Button_Open_4') Button('maskColor set by number') .margin(10) .width('90%') @@ -122,7 +122,7 @@ struct SR000HRF74 { .onClick(() => { this.dialogController5.open() }) - .key('SR000HRF74_Button_Open_5') + .key('CustomDialogMask_Button_Open_5') } } } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HV334.ets b/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/ListScroll.ets similarity index 90% rename from arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HV334.ets rename to arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/ListScroll.ets index 83ffd74d2..3473fa3ab 100644 --- a/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/SR000HV334.ets +++ b/arkui/ace_ets_component_api_four/src/main/ets/TestAbility/pages/ListScroll.ets @@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter'; @Entry @Component -struct SR000HV334 { +struct ListScroll { @State listPosition: number = 0; private arr: number[] = Array.apply(this, {length: 60}).map((item, i) => i) private scrollerForList: Scroller = new Scroller() @@ -28,24 +28,24 @@ struct SR000HV334 { .onClick(() => { this.scrollerForList.scrollToIndex(14, false) }).height(45) - .key('SR000HV334_Button_To_14') + .key('ListScroll_Button_To_14') Button("To(15)") .onClick(() => { this.scrollerForList.scrollToIndex(15, true) }).height(45) - .key('SR000HV334_Button_To_15') + .key('ListScroll_Button_To_15') }.margin({top: 10}) Row() { Button("To(0)") .onClick(() => { this.scrollerForList.scrollToIndex(0, false) }).height(45) - .key('SR000HV334_Button_To_0') + .key('ListScroll_Button_To_0') Button("To(max)") .onClick(() => { this.scrollerForList.scrollToIndex(this.arr.length - 1, true) }).height(45) - .key('SR000HV334_Button_To_max') + .key('ListScroll_Button_To_max') }.margin({top: 10}) List({ space: 5,initialIndex:23, scroller: this.scrollerForList }) { @@ -92,7 +92,7 @@ struct SR000HV334 { events_emitter.emit(event, eventData) } }) - .key('SR000HV334_List1') + .key('ListScroll_List1') }.width('100%').height('100%') } } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_four/src/main/ets/test/SR000HRF74.test.ets b/arkui/ace_ets_component_api_four/src/main/ets/test/CustomDialogMask.test.ets similarity index 77% rename from arkui/ace_ets_component_api_four/src/main/ets/test/SR000HRF74.test.ets rename to arkui/ace_ets_component_api_four/src/main/ets/test/CustomDialogMask.test.ets index 2fae13635..10b22b3de 100644 --- a/arkui/ace_ets_component_api_four/src/main/ets/test/SR000HRF74.test.ets +++ b/arkui/ace_ets_component_api_four/src/main/ets/test/CustomDialogMask.test.ets @@ -15,9 +15,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' -export default function SR000HRF74Test() { +export default function CustomDialogMaskTest() { - const SUITE = 'SR000HRF74' + const SUITE = 'CustomDialogMask' const waitUiReadyMs = 500; function sleep(time) { let date = new Date() @@ -29,16 +29,16 @@ export default function SR000HRF74Test() { } } - describe('SR000HRF74Test', function () { + describe('CustomDialogMaskTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HRF74", + url: "TestAbility/pages/CustomDialogMask", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HRF74" == pages.name)) { + if (pages == null || !("CustomDialogMask" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -63,12 +63,12 @@ export default function SR000HRF74Test() { sleep(2) let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HRF74_Button_Open_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Open_1', 10, "") await driver.delayMs(waitUiReadyMs) - let strObj = getInspectorByKey('SR000HRF74_Button_Close_1'); + let strObj = getInspectorByKey('CustomDialogMask_Button_Close_1'); let obj = JSON.parse(strObj); expect(obj.$attrs.visibility).assertEqual("Visibility.Visible"); - sendEventByKey('SR000HRF74_Button_Close_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Close_1', 10, "") console.info(`${SUITE} ${CASE} END`); sleep(1) @@ -87,13 +87,13 @@ export default function SR000HRF74Test() { sleep(1) let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HRF74_Button_Open_2', 10, "") + sendEventByKey('CustomDialogMask_Button_Open_2', 10, "") await driver.delayMs(waitUiReadyMs) - let strObj = getInspectorByKey('SR000HRF74_Button_Close_1'); + let strObj = getInspectorByKey('CustomDialogMask_Button_Close_1'); let obj = JSON.parse(strObj); expect(obj.$attrs.visibility).assertEqual("Visibility.Visible"); - sendEventByKey('SR000HRF74_Button_Close_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Close_1', 10, "") console.info(`${SUITE} ${CASE} END`); sleep(1) @@ -111,13 +111,13 @@ export default function SR000HRF74Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HRF74_Button_Open_3', 10, "") + sendEventByKey('CustomDialogMask_Button_Open_3', 10, "") await driver.delayMs(waitUiReadyMs) - let strObj = getInspectorByKey('SR000HRF74_Button_Close_1'); + let strObj = getInspectorByKey('CustomDialogMask_Button_Close_1'); let obj = JSON.parse(strObj); expect(obj.$attrs.visibility).assertEqual("Visibility.Visible"); - sendEventByKey('SR000HRF74_Button_Close_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Close_1', 10, "") console.info(`${SUITE} ${CASE} END`); sleep(1) @@ -135,13 +135,13 @@ export default function SR000HRF74Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HRF74_Button_Open_4', 10, "") + sendEventByKey('CustomDialogMask_Button_Open_4', 10, "") await driver.delayMs(waitUiReadyMs) - let strObj = getInspectorByKey('SR000HRF74_Button_Close_1'); + let strObj = getInspectorByKey('CustomDialogMask_Button_Close_1'); let obj = JSON.parse(strObj); expect(obj.$attrs.visibility).assertEqual("Visibility.Visible"); - sendEventByKey('SR000HRF74_Button_Close_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Close_1', 10, "") console.info(`${SUITE} ${CASE} END`); sleep(1) @@ -159,13 +159,13 @@ export default function SR000HRF74Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HRF74_Button_Open_5', 10, "") + sendEventByKey('CustomDialogMask_Button_Open_5', 10, "") await driver.delayMs(waitUiReadyMs) - let strObj = getInspectorByKey('SR000HRF74_Button_Close_1'); + let strObj = getInspectorByKey('CustomDialogMask_Button_Close_1'); let obj = JSON.parse(strObj); expect(obj.$attrs.visibility).assertEqual("Visibility.Visible"); - sendEventByKey('SR000HRF74_Button_Close_1', 10, "") + sendEventByKey('CustomDialogMask_Button_Close_1', 10, "") console.info(`${SUITE} ${CASE} END`); sleep(1) diff --git a/arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets index 2839fb7d2..da977f4e7 100644 --- a/arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_api_four/src/main/ets/test/List.test.ets @@ -12,10 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import SR000HV334Test from './SR000HV334.test' -import SR000HRF74Test from './SR000HRF74.test' +import ListScrollTest from './ListScroll.test' +import CustomDialogMaskTest from './CustomDialogMask.test' export default function testsuite() { - SR000HRF74Test() - SR000HV334Test() + CustomDialogMaskTest() + ListScrollTest() } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_four/src/main/ets/test/SR000HV334.test.ets b/arkui/ace_ets_component_api_four/src/main/ets/test/ListScroll.test.ets similarity index 87% rename from arkui/ace_ets_component_api_four/src/main/ets/test/SR000HV334.test.ets rename to arkui/ace_ets_component_api_four/src/main/ets/test/ListScroll.test.ets index 0ca86ce11..676921bb8 100644 --- a/arkui/ace_ets_component_api_four/src/main/ets/test/SR000HV334.test.ets +++ b/arkui/ace_ets_component_api_four/src/main/ets/test/ListScroll.test.ets @@ -16,20 +16,20 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HV334Test() { +export default function ListScrollTest() { - const SUITE = 'SR000HV334' + const SUITE = 'ListScroll' const waitUiReadyMs = 500; - describe('SR000HV334Test', function () { + describe('ListScrollTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HV334", + url: "TestAbility/pages/ListScroll", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HV334" == pages.name)) { + if (pages == null || !("ListScroll" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -61,7 +61,7 @@ export default function SR000HV334Test() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HV334_Button_To_14', 10, "") + sendEventByKey('ListScroll_Button_To_14', 10, "") console.info(`${SUITE} ${CASE} END`) }); @@ -85,7 +85,7 @@ export default function SR000HV334Test() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HV334_Button_To_15', 10, "") + sendEventByKey('ListScroll_Button_To_15', 10, "") console.info(`${SUITE} ${CASE} END`) }); @@ -109,7 +109,7 @@ export default function SR000HV334Test() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HV334_Button_To_0', 10, "") + sendEventByKey('ListScroll_Button_To_0', 10, "") console.info(`${SUITE} ${CASE} END`) }); @@ -133,7 +133,7 @@ export default function SR000HV334Test() { events_emitter.on(event, callback); let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HV334_Button_To_max', 10, "") + sendEventByKey('ListScroll_Button_To_max', 10, "") console.info(`${SUITE} ${CASE} END`) }); diff --git a/arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json b/arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json index b4a7fa779..934eec383 100644 --- a/arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json +++ b/arkui/ace_ets_component_api_four/src/main/resources/base/profile/test_pages.json @@ -1,7 +1,7 @@ { "src": [ "TestAbility/pages/Index", - "TestAbility/pages/SR000HV334", - "TestAbility/pages/SR000HRF74" + "TestAbility/pages/ListScroll", + "TestAbility/pages/CustomDialogMask" ] } diff --git a/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP1U.ets b/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/CounterEnable.ets similarity index 86% rename from arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP1U.ets rename to arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/CounterEnable.ets index 91b9fed38..2a7d23200 100644 --- a/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP1U.ets +++ b/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/CounterEnable.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HTP1U { +struct CounterEnable { @State value: number = 0 @State enable_inc: boolean = false @State enable_dec: boolean = false @@ -33,17 +33,17 @@ struct SR000HTP1U { }) .enableInc(this.enable_inc) .enableDec(this.enable_dec) - .key('SR000HTP1U_Counter_1') + .key('CounterEnable_Counter_1') Button("enable_inc_true") .onClick(() => { this.enable_inc = true; }).height(45) - .key('SR000HTP1U_Button_1') + .key('CounterEnable_Button_1') Button("enable_dec_true") .onClick(() => { this.enable_dec = true; }).height(45) - .key('SR000HTP1U_Button_2') + .key('CounterEnable_Button_2') }.width("100%") } } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP21.ets b/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/TextAreaSelect.ets similarity index 83% rename from arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP21.ets rename to arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/TextAreaSelect.ets index e90df261a..298163649 100644 --- a/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/SR000HTP21.ets +++ b/arkui/ace_ets_component_api_three/src/main/ets/TestAbility/pages/TextAreaSelect.ets @@ -14,7 +14,7 @@ */ @Entry @Component -struct SR000HTP21 { +struct TextAreaSelect { controller: TextAreaController = new TextAreaController() controller2: TextAreaController = new TextAreaController() controller3: TextAreaController = new TextAreaController() @@ -33,79 +33,79 @@ struct SR000HTP21 { .fontStyle(FontStyle.Normal) .fontColor(Color.Red) .tabIndex(1) - .key('SR000HTP21_TextArea_1') + .key('TextAreaSelect_TextArea_1') Button("Show selected (-2,-1)") .margin(30) .onClick(() => { this.controller.setTextSelection(-2,-1) }) - .key('SR000HTP21_Button_1') + .key('TextAreaSelect_Button_1') Button("Show selected (-1,0)") .margin(30) .onClick(() => { this.controller.setTextSelection(-1,0) }) - .key('SR000HTP21_Button_2') + .key('TextAreaSelect_Button_2') Button("Show selected (0,3)") .margin(30) .onClick(() => { this.controller.setTextSelection(0,3) }) - .key('SR000HTP21_Button_3') + .key('TextAreaSelect_Button_3') Button("Show selected (1,3)") .margin(30) .onClick(() => { this.controller.setTextSelection(1,3) }) - .key('SR000HTP21_Button_4') + .key('TextAreaSelect_Button_4') Button("Show selected (-1,6)") .margin(30) .onClick(() => { this.controller.setTextSelection(-1,6) }) - .key('SR000HTP21_Button_5') + .key('TextAreaSelect_Button_5') Button("Show selected (0,6)") .margin(30) .onClick(() => { this.controller.setTextSelection(0,6) }) - .key('SR000HTP21_Button_6') + .key('TextAreaSelect_Button_6') Button("Show selected (-1,8)") .margin(30) .onClick(() => { this.controller.setTextSelection(-1,8) }) - .key('SR000HTP21_Button_7') + .key('TextAreaSelect_Button_7') Button("Show selected (0,8)") .margin(30) .onClick(() => { this.controller.setTextSelection(0,8) }) - .key('SR000HTP21_Button_8') + .key('TextAreaSelect_Button_8') Button("Show selected (null,null)") .margin(30) .onClick(() => { this.controller.setTextSelection(null,null) }) - .key('SR000HTP21_Button_9') + .key('TextAreaSelect_Button_9') Button("Show selected (null,undefined)") .margin(30) .onClick(() => { this.controller.setTextSelection(null,undefined) }) - .key('SR000HTP21_Button_10') + .key('TextAreaSelect_Button_10') Button("Show selected (undefined,null)") .margin(30) .onClick(() => { this.controller.setTextSelection(undefined,null) }) - .key('SR000HTP21_Button_11') + .key('TextAreaSelect_Button_11') Button("Show selected (undefined,undefined)") .margin(30) .onClick(() => { this.controller.setTextSelection(undefined,undefined) }) - .key('SR000HTP21_Button_12') + .key('TextAreaSelect_Button_12') TextArea({ text: '', placeholder: 'input your word', controller: this.controller2 }) .placeholderColor("rgb(0,0,225)") .placeholderFont({ size: 20, weight: 100, family: 'cursive', style: FontStyle.Italic }) @@ -117,13 +117,13 @@ struct SR000HTP21 { .fontStyle(FontStyle.Normal) .fontColor(Color.Red) .tabIndex(2) - .key('SR000HTP21_TextArea_2') + .key('TextAreaSelect_TextArea_2') Button("Show selected (1,3)") .margin(30) .onClick(() => { this.controller2.setTextSelection(1,3) }) - .key('SR000HTP21_Button_13') + .key('TextAreaSelect_Button_13') TextArea({ text: '北京aaaaa上海tianjin深圳', placeholder: 'input your word', controller: this.controller3 }) .width(200) .height(50) @@ -137,13 +137,13 @@ struct SR000HTP21 { .fontStyle(FontStyle.Normal) .fontColor(Color.Red) .tabIndex(3) - .key('SR000HTP21_TextArea_3') + .key('TextAreaSelect_TextArea_3') Button("Show selected (6,10)") .margin(30) .onClick(() => { this.controller3.setTextSelection(6,10) }) - .key('SR000HTP21_Button_14') + .key('TextAreaSelect_Button_14') } } } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP1U.test.ets b/arkui/ace_ets_component_api_three/src/main/ets/test/CounterEnable.test.ets similarity index 81% rename from arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP1U.test.ets rename to arkui/ace_ets_component_api_three/src/main/ets/test/CounterEnable.test.ets index 3f115517f..77993163a 100644 --- a/arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP1U.test.ets +++ b/arkui/ace_ets_component_api_three/src/main/ets/test/CounterEnable.test.ets @@ -16,9 +16,9 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP1UTest() { +export default function CounterEnableTest() { - const SUITE = 'SR000HTP1U' + const SUITE = 'CounterEnable' const waitUiReadyMs = 500; function sleep(time) { let date = new Date() @@ -30,16 +30,16 @@ export default function SR000HTP1UTest() { } } - describe('SR000HTP1UTest', function () { + describe('CounterEnableTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP1U", + url: "TestAbility/pages/CounterEnable", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP1U" == pages.name)) { + if (pages == null || !("CounterEnable" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -61,8 +61,8 @@ export default function SR000HTP1UTest() { let CASE = 'ArkUI_Counter_0100' console.info(`${SUITE} ${CASE} START`); - sendEventByKey('SR000HTP1U_Button_1', 10, "") - let strJson = getInspectorByKey('SR000HTP1U_Counter_1'); + sendEventByKey('CounterEnable_Button_1', 10, "") + let strJson = getInspectorByKey('CounterEnable_Counter_1'); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual("Counter"); @@ -78,8 +78,8 @@ export default function SR000HTP1UTest() { it('ArkUI_Counter_0200', 0, async function (done) { let CASE = 'ArkUI_Counter_0200' console.info(`${SUITE} ${CASE} START`); - sendEventByKey('SR000HTP1U_Button_2', 10, "") - let strJson = getInspectorByKey('SR000HTP1U_Counter_1'); + sendEventByKey('CounterEnable_Button_2', 10, "") + let strJson = getInspectorByKey('CounterEnable_Counter_1'); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual("Counter"); diff --git a/arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets index 57aa544bb..95d2acfc4 100644 --- a/arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_api_three/src/main/ets/test/List.test.ets @@ -12,10 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import SR000HTP1UTest from './SR000HTP1U.test' -import SR000HTP21Test from './SR000HTP21.test' +import CounterEnableTest from './CounterEnable.test' +import TextAreaSelectTest from './TextAreaSelect.test' export default function testsuite() { - SR000HTP1UTest() - SR000HTP21Test() + CounterEnableTest() + TextAreaSelectTest() } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP21.test.ets b/arkui/ace_ets_component_api_three/src/main/ets/test/TextAreaSelect.test.ets similarity index 82% rename from arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP21.test.ets rename to arkui/ace_ets_component_api_three/src/main/ets/test/TextAreaSelect.test.ets index 0d971e150..da60d2c2e 100644 --- a/arkui/ace_ets_component_api_three/src/main/ets/test/SR000HTP21.test.ets +++ b/arkui/ace_ets_component_api_three/src/main/ets/test/TextAreaSelect.test.ets @@ -16,21 +16,21 @@ import { describe, beforeEach, afterEach, it, expect } from '@ohos/hypium' import router from '@ohos.router' import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; -export default function SR000HTP21Test() { +export default function TextAreaSelectTest() { - const SUITE = 'SR000HTP21' + const SUITE = 'TextAreaSelect' const waitUiReadyMs = 500; - describe('SR000HTP21Test', function () { + describe('TextAreaSelectTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HTP21", + url: "TestAbility/pages/TextAreaSelect", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HTP21" == pages.name)) { + if (pages == null || !("TextAreaSelect" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { @@ -54,9 +54,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_1', 10, "") + sendEventByKey('TextAreaSelect_Button_1', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); @@ -75,9 +75,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_2', 10, "") + sendEventByKey('TextAreaSelect_Button_2', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -97,9 +97,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_3', 10, "") + sendEventByKey('TextAreaSelect_Button_3', 10, "") await driver.delayMs(waitUiReadyMs*5) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("3"); await driver.delayMs(waitUiReadyMs) @@ -119,9 +119,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_4', 10, "") + sendEventByKey('TextAreaSelect_Button_4', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("3"); await driver.delayMs(waitUiReadyMs) @@ -141,9 +141,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_5', 10, "") + sendEventByKey('TextAreaSelect_Button_5', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("6"); await driver.delayMs(waitUiReadyMs) @@ -163,9 +163,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_6', 10, "") + sendEventByKey('TextAreaSelect_Button_6', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("6"); await driver.delayMs(waitUiReadyMs) @@ -185,9 +185,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_7', 10, "") + sendEventByKey('TextAreaSelect_Button_7', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("6"); await driver.delayMs(waitUiReadyMs) @@ -207,9 +207,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_8', 10, "") + sendEventByKey('TextAreaSelect_Button_8', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("6"); await driver.delayMs(waitUiReadyMs) @@ -229,9 +229,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_9', 10, "") + sendEventByKey('TextAreaSelect_Button_9', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -251,9 +251,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_10', 10, "") + sendEventByKey('TextAreaSelect_Button_10', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -273,9 +273,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_11', 10, "") + sendEventByKey('TextAreaSelect_Button_11', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -295,9 +295,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_12', 10, "") + sendEventByKey('TextAreaSelect_Button_12', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_1'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_1'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -317,9 +317,9 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_13', 10, "") + sendEventByKey('TextAreaSelect_Button_13', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_2'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_2'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("0"); await driver.delayMs(waitUiReadyMs) @@ -339,11 +339,11 @@ export default function SR000HTP21Test() { let driver = Driver.create() await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_TextArea_3', 10, "") + sendEventByKey('TextAreaSelect_TextArea_3', 10, "") await driver.delayMs(waitUiReadyMs) - sendEventByKey('SR000HTP21_Button_14', 10, "") + sendEventByKey('TextAreaSelect_Button_14', 10, "") await driver.delayMs(waitUiReadyMs) - let strJson = getInspectorByKey('SR000HTP21_TextArea_3'); + let strJson = getInspectorByKey('TextAreaSelect_TextArea_3'); let obj = JSON.parse(strJson); expect(obj.$attrs.caretPosition).assertEqual("10"); await driver.delayMs(waitUiReadyMs) diff --git a/arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json b/arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json index 2e33561bf..2892e6495 100644 --- a/arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json +++ b/arkui/ace_ets_component_api_three/src/main/resources/base/profile/test_pages.json @@ -1,7 +1,7 @@ { "src": [ "TestAbility/pages/Index", - "TestAbility/pages/SR000HTP1U", - "TestAbility/pages/SR000HTP21" + "TestAbility/pages/CounterEnable", + "TestAbility/pages/TextAreaSelect" ] } diff --git a/arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/SR000HQURK.ets b/arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/ShortcutKey.ets similarity index 92% rename from arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/SR000HQURK.ets rename to arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/ShortcutKey.ets index aace066bf..495d97e99 100644 --- a/arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/SR000HQURK.ets +++ b/arkui/ace_ets_component_api_two/src/main/ets/TestAbility/pages/ShortcutKey.ets @@ -16,7 +16,7 @@ import events_emitter from '@ohos.events.emitter'; @Entry @Component -struct SR000HQURK { +struct ShortcutKey { private arr: string[] = ['0', '1','2', '3', '4', '5', '6', '7', '8', '9', '-', '=', '`', '[', ']', ';', '\'', ',', '.', '/', ' ', '*', '+', 'B','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','W'] @@ -48,7 +48,7 @@ struct SR000HQURK { .onClick(() => { this.sendEvent('Ctrl_' + item, this.baseEvent + index) }) - .key('SR000HQURK_Button_' + index) + .key('ShortcutKey_Button_' + index) }, item => item) ForEach(this.functionKey, (item, index) => { @@ -58,7 +58,7 @@ struct SR000HQURK { this.sendEvent('Ctrl_' + item, this.baseEvent2 + index) }) .width("80%") - .key('SR000HQURK2_Ctrl_' + item) + .key('ShortcutKey2_Ctrl_' + item) }, item => item) Button("Shift+1") diff --git a/arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets index 50ed562a0..94aa55005 100644 --- a/arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_api_two/src/main/ets/test/List.test.ets @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import SR000HQURKTest from './SR000HQURK.test' +import ShortcutKeyTest from './ShortcutKey.test' export default function testsuite() { - SR000HQURKTest() + ShortcutKeyTest() } \ No newline at end of file diff --git a/arkui/ace_ets_component_api_two/src/main/ets/test/SR000HQURK.test.ets b/arkui/ace_ets_component_api_two/src/main/ets/test/ShortcutKey.test.ets similarity index 94% rename from arkui/ace_ets_component_api_two/src/main/ets/test/SR000HQURK.test.ets rename to arkui/ace_ets_component_api_two/src/main/ets/test/ShortcutKey.test.ets index 6e3d2b73a..f1bd47978 100644 --- a/arkui/ace_ets_component_api_two/src/main/ets/test/SR000HQURK.test.ets +++ b/arkui/ace_ets_component_api_two/src/main/ets/test/ShortcutKey.test.ets @@ -18,9 +18,9 @@ import {UiDriver, UiComponent, BY, Driver, Component, ON} from '@ohos.UiTest' import events_emitter from '@ohos.events.emitter'; import input from '@ohos.multimodalInput.keyCode'; -export default function SR000HQURKTest() { +export default function ShortcutKeyTest() { - const SUITE = 'SR000HQURK' + const SUITE = 'ShortcutKey' function sleep(time) { let date = new Date() let start = date.getSeconds() @@ -99,16 +99,16 @@ export default function SR000HQURKTest() { const baseEvent = 62000 const baseEvent2 = 73000 - describe('SR000HQURKTest', function () { + describe('ShortcutKeyTest', function () { beforeEach(async function (done) { let options = { - url: "TestAbility/pages/SR000HQURK", + url: "TestAbility/pages/ShortcutKey", } try { router.clear(); let pages = router.getState(); - if (pages == null || !("SR000HQURK" == pages.name)) { + if (pages == null || !("ShortcutKey" == pages.name)) { await router.pushUrl(options).then(()=>{ console.info(`${SUITE} router.pushUrl success`); }).catch(err => { diff --git a/arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json b/arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json index a0c3adcda..1a8eb5073 100644 --- a/arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json +++ b/arkui/ace_ets_component_api_two/src/main/resources/base/profile/test_pages.json @@ -1,6 +1,6 @@ { "src": [ "TestAbility/pages/Index", - "TestAbility/pages/SR000HQURK" + "TestAbility/pages/ShortcutKey" ] } -- GitLab