diff --git a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0e0b88c40c074e3e7e35d0d07de9429985b3cca --- /dev/null +++ b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct RichEditorExample { + @State text1: string = ''; + @State text2: string = ''; + @State current: number = 5 + @State Richdelete: Boolean = false; + controller1:RichEditorController = new RichEditorController(); + controller: RichEditorController = new RichEditorController() + build() { + Column() { + Column(){ + Flex({wrap: FlexWrap.Wrap}){ + Button('添加文本') + .borderRadius(8) + .backgroundColor(0x317aff) + .fontColor(Color.White) + .width(90) + .margin({bottom: 5,right:5}) + .onClick(() => { + this.controller.addTextSpan("实例文字", { + offset: 0, + style: { + fontColor: Color.Red, + fontSize: 8, + fontStyle: FontStyle.Italic, + fontWeight: FontWeight.Lighter, + fontFamily: "sans-serif", + decoration: { type: TextDecorationType.None, color: Color.Brown } + } + }) + }) + .key("addSpan") + Button('添加图片') + .borderRadius(8) + .backgroundColor(0x317aff) + .fontColor(Color.White) + .width(90) + .margin({bottom: 5,right:5}) + .onClick(() => { + this.controller.addImageSpan($r('app.media.icon'), { + offset: 0, + imageStyle: { + size: ["114px", "114px"], + verticalAlign: ImageSpanAlignment.CENTER, + objectFit: ImageFit.Cover + } + }) + }) + Button('修改样式') + .borderRadius(8) + .backgroundColor(0x317aff) + .fontColor(Color.White) + .width(90) + .margin({bottom: 5,right:5}) + .onClick(() => { + this.controller.updateSpanStyle({ + textStyle: { + fontColor:Color.Blue, + fontSize:12, + fontStyle:FontStyle.Italic, + fontWeight:FontWeight.Bolder, + fontFamily:"sans-serif", + decoration: { type: TextDecorationType.Underline, color: Color.Red } + } + }) + }) + Button('删除') + .borderRadius(8) + .backgroundColor(0x317aff) + .fontColor(Color.White) + .width(90) + .margin({bottom: 5,right:5}) + .onClick(() => { + this.controller.deleteSpans({ + start: 22, + end: 25 + }) + }) + Button('getSpans') + .borderRadius(8) + .backgroundColor(0x317aff) + .fontColor(Color.White) + .width(90) + .margin({bottom: 5,right:5}) + .onClick(() => { + let range: RichEditorRange = { start: 0, end: 5, }; + let value = this.controller.getSpans(range) + console.log("11111111"+ value) + }) + } + + + }.width('100%').height('20%').borderWidth(2).borderStyle(BorderStyle.Solid).padding(5) + + Column() { + RichEditor({ controller: this.controller }) + .aboutToIMEInput((RichEditorInsertValue) => { + console.log("wxh test app aboutToIMEInput") + return true + }) + .onIMEInputComplete((RichEditorTextSpanResult) => { + console.log("wxh test app onIMEInputComplete") + }) + .aboutToDelete((RichEditorDeleteValue) => { + console.log("wxh test app aboutToDelete") + return true + }) + .onDeleteComplete(() => { + let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)} + let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)} + this.Richdelete = true; + console.log("wxh test app onDeleteComplete") + }).key('Stage_RichEditor_Test_2100') + .onReady(() => { + for (let i = 0; i < 10; i++) { + this.controller.addTextSpan("实例文字", { + offset: 6, + style: { + fontColor: Color.Black, + fontSize: "30", + fontStyle: FontStyle.Italic, + fontWeight: FontWeight.Bolder, + fontFamily: "sans-serif", + decoration: { type: TextDecorationType.Underline, color: Color.Red } + } + }) + + this.controller.addImageSpan($r('app.media.icon'), { + offset: 0, + imageStyle: { + size: ["114fp", "114fp"], + } + }) + } + }) + .borderWidth(1).borderColor(Color.Green) + } + + Column(){ + RichEditor({ controller: this.controller }) + .onReady(() => { + this.controller.addTextSpan("我是一段文字1", { + style: { + fontColor: Color.Black, + } + }) + this.controller.addImageSpan($r('app.media.icon'), { + imageStyle: { + size: ["50fp", "50fp"], + objectFit: ImageFit.Auto + } + }) + this.controller.addTextSpan("我是一段文字2", { + style: { + fontColor: Color.Black, + } + }) + }) + }.width('100%').height('80%').borderWidth(2).borderStyle(BorderStyle.Solid).padding(5) + }.width('100%').height("100%").padding(10) + } +} \ No newline at end of file diff --git a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/List.test.ets index 2db61e3b8200c914a772928d58872659da74cadf..2e3c951d4a3f057f315a849cc50fc3d1d6f7bf9b 100644 --- a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/List.test.ets @@ -38,6 +38,7 @@ import assemblyCallbackTest from './assemblyCallback.test'; import ActsGridTest from './Grid.test'; import ActsListTest from './Listitem.test'; import ActsSwiperTest from './Swiper.test'; +import ActsRichEditorTest from './richeditor.test' export default function testsuite() { @@ -66,4 +67,5 @@ export default function testsuite() { ActsGridTest() ActsListTest() ActsSwiperTest() + ActsRichEditorTest() } \ No newline at end of file diff --git a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..50611f434658ef97e08486aa019d9e4b605491dc --- /dev/null +++ b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets @@ -0,0 +1,453 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import router from '@system.router'; + +export default function ActsRichEditorTest() { + describe('ActsRichEditorTest', function () { + beforeEach(async function (done) { + console.info("flex beforeEach start"); + let options = { + uri: 'TestAbility/pages/richeditor', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get richeditor state success " + JSON.stringify(pages)); + if (!("richeditor" == pages.name)) { + console.info("get richeditor state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + console.info("push richeditor page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push richeditor page error: " + err); + } + done() + }); + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + it('Stage_RichEditor_Test_0100', 0, async function (done) { + console.info('Stage_RichEditor_Test_0100 START'); + try{ + let controller = new RichEditorController() + let res = controller.addTextSpan("实例文字0", { + offset: 5, + style: { + fontColor: Color.Red, + fontSize: 8, + fontStyle: FontStyle.Italic, + fontWeight: FontWeight.Lighter, + fontFamily: "sans-serif", + decoration: { type: TextDecorationType.None, color: Color.Brown } + } + }) + console.info('Stage_Font_0100 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(0) + console.info('Stage_RichEditor_Test_0100 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0100 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0200', 0, async function (done) { + console.info('Stage_RichEditor_Test_0200 START'); + try{ + let controller = new RichEditorController() + let res = controller.addTextSpan("实例文字0") + console.info('Stage_Font_0200 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(0) + console.info('Stage_RichEditor_Test_0200 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0200 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0300', 0, async function (done) { + console.info('Stage_RichEditor_Test_0300 START'); + try{ + let controller = new RichEditorController() + let res = controller.addTextSpan('') + console.info('Stage_Font_0300 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(-1) + console.info('Stage_RichEditor_Test_0300 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0300 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0400', 0, async function (done) { + console.info('Stage_RichEditor_Test_0400 START'); + try{ + let controller = new RichEditorController() + let res = controller.addTextSpan(null) + console.info('Stage_Font_0400 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(-1) + console.info('Stage_RichEditor_Test_0400 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0400 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0500', 0, async function (done) { + console.info('Stage_RichEditor_Test_0500 START'); + try{ + let controller = new RichEditorController() + let res = controller.addImageSpan($r('app.media.icon'), { + offset: 0, + imageStyle: { + size: ["114px", "114px"], + verticalAlign: ImageSpanAlignment.CENTER, + objectFit: ImageFit.Cover + } + }) + console.info('Stage_Font_0500 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(0) + console.info('Stage_RichEditor_Test_0500 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0500 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0600', 0, async function (done) { + console.info('Stage_RichEditor_Test_0600 START'); + try{ + let controller = new RichEditorController() + let res = controller.addImageSpan($r('app.media.icon')) + console.info('Stage_Font_0600 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(0) + console.info('Stage_RichEditor_Test_0600 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0600 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0700', 0, async function (done) { + console.info('Stage_RichEditor_Test_0700 START'); + try{ + let controller = new RichEditorController() + let res = controller.addImageSpan('') + console.info('Stage_Font_0600 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(-1) + console.info('Stage_RichEditor_Test_0700 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0700 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0800', 0, async function (done) { + console.info('Stage_RichEditor_Test_0800 START'); + try{ + let controller = new RichEditorController() + let res = controller.addImageSpan(null) + console.info('Stage_Font_0800 START :'+ JSON.stringify(res)); + expect(typeof(res)).assertEqual('number') + expect(res).assertEqual(-1) + console.info('Stage_RichEditor_Test_0800 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0800 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_0900', 0, async function (done) { + console.info('Stage_RichEditor_Test_0900 START'); + try{ + let controller = new RichEditorController() + let res = controller.updateSpanStyle({ + start: 22, + end: 25, + textStyle: { + fontColor:Color.Blue, + fontSize:12, + fontStyle:FontStyle.Italic, + fontWeight:FontWeight.Bolder, + fontFamily:"sans-serif", + decoration: { type: TextDecorationType.Underline, color: Color.Red } + } + }) + console.info('Stage_Font_0900 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_0900 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_0900 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1000', 0, async function (done) { + console.info('Stage_RichEditor_Test_1000 START'); + try{ + let controller = new RichEditorController() + let res = controller.updateSpanStyle({ + start: 22, + end: 25, + imageStyle: { + size: [ 277, 177 ], + verticalAlign:ImageSpanAlignment.CENTER, + objectFit:ImageFit.Fill + } + }) + console.info('Stage_Font_1000 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1000 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1000 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1100', 0, async function (done) { + console.info('Stage_RichEditor_Test_1100 START'); + try{ + let controller = new RichEditorController() + let res = controller.updateSpanStyle(null) + console.info('Stage_Font_1100 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1100 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1100 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1200', 0, async function (done) { + console.info('Stage_RichEditor_Test_1200 START'); + try{ + let controller = new RichEditorController() + let res = controller.deleteSpans({ + start: 22, + end: 25 + }) + console.info('Stage_Font_1200 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1200 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1200 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1300', 0, async function (done) { + console.info('Stage_RichEditor_Test_1300 START'); + try{ + let controller = new RichEditorController() + let res = controller.deleteSpans() + console.info('Stage_Font_1300 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1300 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1300 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1400', 0, async function (done) { + console.info('Stage_RichEditor_Test_1400 START'); + try{ + let controller = new RichEditorController() + let res = controller.deleteSpans(null) + console.info('Stage_Font_1400 START :'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1400 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1400 ERR '+ JSON.stringify(err)); + } + done(); + }); + it('Stage_RichEditor_Test_1500', 0, async function (done) { + console.info('Stage_RichEditor_Test_1500 START'); + try{ + let controller = new RichEditorController(); + let res = controller.getSpans({ start: 0, end: 10 }) + console.info('Stage_RichEditor_Test_1500'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1500 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1500 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1600', 0, async function (done) { + console.info('Stage_RichEditor_Test_1600 START'); + try{ + let controller = new RichEditorController(); + let res = controller.getSpans() + console.info('Stage_RichEditor_Test_1600'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1600 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1600 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1700', 0, async function (done) { + console.info('Stage_RichEditor_Test_1700 START'); + try{ + let controller = new RichEditorController(); + let res = controller.getSpans(null) + console.info('Stage_RichEditor_Test_1700'+ JSON.stringify(res)); + expect(res).assertUndefined() + console.info('Stage_RichEditor_Test_1700 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1700 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1800', 0, async function (done) { + console.info('Stage_RichEditor_Test_1800 START'); + try{ + let controller = new RichEditorController(); + let res = controller.setCaretOffset(5) + let get = controller.getCaretOffset() + console.info('Stage_RichEditor_Test_1800'+ JSON.stringify(res)); + console.info('Stage_RichEditor_Test_1800'+ JSON.stringify(get)); + expect(res).assertEqual(false) + expect(get).assertEqual(-1) + console.info('Stage_RichEditor_Test_1800 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1800 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_1900', 0, async function (done) { + console.info('Stage_RichEditor_Test_1900 START'); + try{ + let controller = new RichEditorController(); + let res = controller.setCaretOffset(null) + let get = controller.getCaretOffset() + console.info('Stage_RichEditor_Test_1900'+ JSON.stringify(res)); + console.info('Stage_RichEditor_Test_1900'+ JSON.stringify(get)); + expect(res).assertEqual(false) + expect(get).assertEqual(-1) + console.info('Stage_RichEditor_Test_1900 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_1900 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_2000', 0, async function (done) { + console.info('Stage_RichEditor_Test_2000 START'); + try{ + let controller = new RichEditorController(); + let res = controller.setCaretOffset(101010101010101010101010101010101) + let get = controller.getCaretOffset() + console.info('Stage_RichEditor_Test_2000'+ JSON.stringify(res)); + console.info('Stage_RichEditor_Test_2000'+ JSON.stringify(get)); + expect(res).assertEqual(false) + expect(get).assertEqual(-1) + console.info('Stage_RichEditor_Test_2000 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_2000 ERR '+ JSON.stringify(err)); + } + done(); + }); + + it('Stage_RichEditor_Test_2100', 0, async function (done) { + console.info('Stage_RichEditor_Test_2100 START'); + setTimeout(()=>{ + try{ + let InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" } + let SpanPosition: RichEditorSpanPosition = { spanIndex:10, spanRange:[10,10]} + let TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }} + let ImageSpanStyle: RichEditorImageSpanStyle = { size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)} + let TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]} + let ImageSpanStyleResult: RichEditorImageSpanStyleResult = { size:[10,10],verticalAlign:(ImageSpanAlignment.BASELINE),objectFit:(ImageFit.Cover)} + let ImageSpanResult: RichEditorImageSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},valuePixelMap:(null),valueResourceStr:("aaa"),imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.TOP),objectFit:(ImageFit.Auto)},offsetInSpan:[10,100]} + let ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}} + let ImageSpanOptions: RichEditorImageSpanOptions = { offset:10,imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}} + let ImageSpanStyleOptions: RichEditorUpdateImageSpanStyleOptions = { imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}} + let Selection: RichEditorSelection = { selection:[10,10],spans:(null)} + let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)} + let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)} + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(InsertValue)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(SpanPosition)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(TextSpan)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpanStyle)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(TextSpanResult)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpanStyleResult)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpanResult)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpan)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpanOptions)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(ImageSpanStyleOptions)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(Selection)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(DeleteValue)) + console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(DeleteValue1)) + expect(typeof InsertValue).assertEqual("object") + expect(typeof SpanPosition).assertEqual("object") + expect(typeof TextSpan).assertEqual("object") + expect(typeof ImageSpanStyle).assertEqual("object") + expect(typeof TextSpanResult).assertEqual("object") + expect(typeof ImageSpanStyleResult).assertEqual("object") + expect(typeof ImageSpanResult).assertEqual("object") + expect(typeof ImageSpan).assertEqual("object") + expect(typeof ImageSpanOptions).assertEqual("object") + expect(typeof ImageSpanStyleOptions).assertEqual("object") + expect(typeof Selection).assertEqual("object") + expect(typeof DeleteValue).assertEqual("object") + expect(typeof DeleteValue1).assertEqual("object") + + console.info('Stage_RichEditor_Test_2100 END '); + } catch(err) { + expect().assertFail() + console.info('Stage_RichEditor_Test_2100 ERR '+ JSON.stringify(err)); + } + done(); + },500) + }); + + + }) +} + diff --git a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/resources/base/profile/test_pages.json b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/resources/base/profile/test_pages.json index 12827892723c9f80e7e94a1dd20aceff13192e58..5ab5f5dbf0fe6a9c29681665954c95bb2d040021 100644 --- a/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/resources/base/profile/test_pages.json +++ b/arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/resources/base/profile/test_pages.json @@ -26,6 +26,7 @@ "TestAbility/pages/assemblyCallback", "TestAbility/pages/list", "TestAbility/pages/grid", - "TestAbility/pages/swiper" + "TestAbility/pages/swiper", + "TestAbility/pages/richeditor" ] } \ No newline at end of file