Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
04f6abae
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
04f6abae
编写于
8月 24, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9653 富文本xts修改
Merge pull request !9653 from huangdong/richeditorfix
上级
8152a732
fa2653b6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
258 addition
and
67 deletion
+258
-67
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets
...eCompletion/src/main/ets/TestAbility/pages/richeditor.ets
+55
-3
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets
...ent_wholeCompletion/src/main/ets/test/richeditor.test.ets
+203
-64
未找到文件。
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets
浏览文件 @
04f6abae
...
@@ -15,11 +15,15 @@
...
@@ -15,11 +15,15 @@
@Entry
@Entry
@Component
@Component
struct RichEditorExample {
struct RichEditorExample {
@State spanStart: number = -1;
@State spanEnd: number = -1;
@State spanNum: number = -1;
@State text1: string = '';
@State text1: string = '';
@State text2: string = '';
@State text2: string = '';
@State current: number = 5
@State current: number = 5
@State Richdelete: Boolean = false;
@State Richdelete: Boolean = false;
controller1:RichEditorController = new RichEditorController();
controller1:RichEditorController = new RichEditorController();
RichEditorInsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
controller: RichEditorController = new RichEditorController()
controller: RichEditorController = new RichEditorController()
build() {
build() {
Column() {
Column() {
...
@@ -109,24 +113,60 @@ struct RichEditorExample {
...
@@ -109,24 +113,60 @@ struct RichEditorExample {
Column() {
Column() {
RichEditor({ controller: this.controller })
RichEditor({ controller: this.controller })
.key('Stage_RichEditor_Test_2100')
.key('Stage_RichEditor_Test_2200')
.aboutToIMEInput((RichEditorInsertValue) => {
.aboutToIMEInput((RichEditorInsertValue) => {
let InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
InsertValue.insertValue.toString()
RichEditorInsertValue.insertValue.toString()
InsertValue.insertOffset.toString()
RichEditorInsertValue.insertOffset.toString()
console.log("wxh test app aboutToIMEInput")
console.log("wxh test app aboutToIMEInput")
return true
return true
})
})
.key('Stage_RichEditor_Test_2300')
.onIMEInputComplete((RichEditorTextSpanResult) => {
.onIMEInputComplete((RichEditorTextSpanResult) => {
let TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let SpanPosition: RichEditorSpanPosition = { spanIndex:20, spanRange:[20,20]}
SpanPosition.spanRange.toString()
SpanPosition.spanIndex.toString()
TextSpanResult.spanPosition.toString()
RichEditorTextSpanResult.spanPosition.toString()
TextSpanResult.offsetInSpan.toString()
RichEditorTextSpanResult.offsetInSpan.toString()
console.log("wxh test app onIMEInputComplete")
console.log("wxh test app onIMEInputComplete")
return ({ spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]})
})
})
.key('Stage_RichEditor_Test_2400')
.aboutToDelete((RichEditorDeleteValue) => {
.aboutToDelete((RichEditorDeleteValue) => {
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)}
DeleteValue.richEditorDeleteSpans.toString()
DeleteValue1.richEditorDeleteSpans.toString()
RichEditorDeleteValue.richEditorDeleteSpans.toString()
console.log("wxh test app aboutToDelete")
console.log("wxh test app aboutToDelete")
return true
return true
})
})
.key('Stage_RichEditor_Test_2600')
.onDeleteComplete(() => {
.onDeleteComplete(() => {
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)}
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]}
ImageSpanResult.offsetInSpan.toString()
ImageSpanResult.spanPosition.spanIndex.toString()
ImageSpanResult.spanPosition.spanRange.toString()
ImageSpanResult.valuePixelMap.isEditable.valueOf()
ImageSpanResult.valueResourceStr.toString()
ImageSpanResult.imageStyle.size.toString()
ImageSpanResult.imageStyle.verticalAlign.toString()
ImageSpanResult.imageStyle.objectFit.toString()
this.Richdelete = true;
this.Richdelete = true;
console.log("wxh test app onDeleteComplete")
console.log("wxh test app onDeleteComplete")
}).key('Stage_RichEditor_Test_2
1
00')
}).key('Stage_RichEditor_Test_2
7
00')
.onReady(() => {
.onReady(() => {
let TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
TextSpan.spanPosition.spanRange.toString()
TextSpan.spanPosition.spanIndex.toString()
for (let i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
this.controller.addTextSpan("实例文字", {
this.controller.addTextSpan("实例文字", {
offset: 6,
offset: 6,
...
@@ -139,7 +179,6 @@ struct RichEditorExample {
...
@@ -139,7 +179,6 @@ struct RichEditorExample {
decoration: { type: TextDecorationType.Underline, color: Color.Red }
decoration: { type: TextDecorationType.Underline, color: Color.Red }
}
}
})
})
this.controller.addImageSpan($r('app.media.icon'), {
this.controller.addImageSpan($r('app.media.icon'), {
offset: 0,
offset: 0,
imageStyle: {
imageStyle: {
...
@@ -148,6 +187,19 @@ struct RichEditorExample {
...
@@ -148,6 +187,19 @@ struct RichEditorExample {
})
})
}
}
})
})
.key('Stage_RichEditor_Test_2500')
.onSelect((value: RichEditorSelection) => {
let Selection: RichEditorSelection = { selection:[10,10],spans:(null)}
Selection.selection.toString()
Selection.spans.toString()
this.spanStart = value.selection[0]
this.spanEnd = value.selection[1]
this.spanNum = value.spans.length
console.log("mim_log: onSelect selection start: " + value.selection[0])
console.log("mim_log: onSelect selection end: " + value.selection[1])
console.log("mim_log: onSelect spans length: " + value.spans.length);
return { selection:[10,10],spans:(null)}
})
.borderWidth(1).borderColor(Color.Green)
.borderWidth(1).borderColor(Color.Green)
}
}
...
...
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets
浏览文件 @
04f6abae
...
@@ -41,28 +41,28 @@ export default function ActsRichEditorTest() {
...
@@ -41,28 +41,28 @@ export default function ActsRichEditorTest() {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
it('Stage_RichEditor_Test_0100', 0, async function (done) {
it('Stage_RichEditor_Test_0100', 0, async function (done) {
console.info('Stage_RichEditor_Test_0100 START');
console.info('Stage_RichEditor_Test_0100 START');
try{
try{
let controller = new RichEditorController()
let controller = new RichEditorController()
let res = controller.addTextSpan("实例文字0", {
let res = controller.addTextSpan("实例文字0", {
offset: 5,
offset: 5,
style: {
style: {
fontColor: Color.Red,
fontColor: Color.Red,
fontSize: 8,
fontSize: 8,
fontStyle: FontStyle.Italic,
fontStyle: FontStyle.Italic,
fontWeight: FontWeight.Lighter,
fontWeight: FontWeight.Lighter,
fontFamily: "sans-serif",
fontFamily: "sans-serif",
decoration: { type: TextDecorationType.None, color: Color.Brown }
decoration: { type: TextDecorationType.None, color: Color.Brown }
}
}
})
})
console.info('Stage_Font_0100 START :'+ JSON.stringify(res));
console.info('Stage_Font_0100 START :'+ JSON.stringify(res));
expect(typeof(res)).assertEqual('number')
expect(typeof(res)).assertEqual('number')
expect(res).assertEqual(0)
expect(res).assertEqual(0)
console.info('Stage_RichEditor_Test_0100 END ');
console.info('Stage_RichEditor_Test_0100 END ');
} catch(err) {
} catch(err) {
expect().assertFail()
expect().assertFail()
console.info('Stage_RichEditor_Test_0100 ERR '+ JSON.stringify(err));
console.info('Stage_RichEditor_Test_0100 ERR '+ JSON.stringify(err));
}
}
done();
done();
});
});
it('Stage_RichEditor_Test_0200', 0, async function (done) {
it('Stage_RichEditor_Test_0200', 0, async function (done) {
...
@@ -396,57 +396,196 @@ export default function ActsRichEditorTest() {
...
@@ -396,57 +396,196 @@ export default function ActsRichEditorTest() {
it('Stage_RichEditor_Test_2100', 0, async function (done) {
it('Stage_RichEditor_Test_2100', 0, async function (done) {
console.info('Stage_RichEditor_Test_2100 START');
console.info('Stage_RichEditor_Test_2100 START');
setTimeout(()=>{
try{
let RichEditorInsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
let RichEditorSpanPosition: RichEditorSpanPosition = { spanIndex:10, spanRange:[10,10]}
let RichEditorTextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let RichEditorImageSpanStyle: RichEditorImageSpanStyle = { size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}
let RichEditorTextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let RichEditorImageSpanStyleResult: RichEditorImageSpanStyleResult = { size:[10,10],verticalAlign:(ImageSpanAlignment.BASELINE),objectFit:(ImageFit.Cover)}
let RichEditorImageSpanResult: 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 RichEditorImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditorImageSpanOptions: RichEditorImageSpanOptions = { offset:10,imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditorUpdateImageSpanStyleOptions: RichEditorUpdateImageSpanStyleOptions = { imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditorSelection: RichEditorSelection = { selection:[10,10],spans:(null)}
let RichEditorDeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
let RichEditorDeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorInsertValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorSpanPosition))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorTextSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorImageSpanStyle))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorTextSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorImageSpanStyleResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorImageSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorImageSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorImageSpanOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorUpdateImageSpanStyleOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorSelection))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorDeleteValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorDeleteValue1))
expect(typeof RichEditorInsertValue).assertEqual("object")
expect(typeof RichEditorSpanPosition).assertEqual("object")
expect(typeof RichEditorTextSpan).assertEqual("object")
expect(typeof RichEditorImageSpanStyle).assertEqual("object")
expect(typeof RichEditorTextSpanResult).assertEqual("object")
expect(typeof RichEditorImageSpanStyleResult).assertEqual("object")
expect(typeof RichEditorImageSpanResult).assertEqual("object")
expect(typeof RichEditorImageSpan).assertEqual("object")
expect(typeof RichEditorImageSpanOptions).assertEqual("object")
expect(typeof RichEditorUpdateImageSpanStyleOptions).assertEqual("object")
expect(typeof RichEditorSelection).assertEqual("object")
expect(typeof RichEditorDeleteValue).assertEqual("object")
expect(typeof RichEditorDeleteValue1).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)
});
it('Stage_RichEditor_Test_2200', 0, async function (done) {
console.info('Stage_RichEditor_Test_2200 START');
setTimeout(()=>{
try{
let RichEditorInsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
console.info("Stage_RichEditor_Test_2200 InsertValue is: " + JSON.stringify(RichEditorInsertValue))
expect(typeof RichEditorInsertValue).assertEqual("object")
expect(RichEditorInsertValue.insertOffset).assertEqual(10)
expect(RichEditorInsertValue.insertValue).assertEqual("aaaaaa")
console.info('Stage_RichEditor_Test_2200 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2200 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2300', 0, async function (done) {
console.info('Stage_RichEditor_Test_2300 START');
setTimeout(()=>{
try{
let RichEditorTextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let RichEditorSpanPosition: RichEditorSpanPosition = { spanIndex:20, spanRange:[20,20]}
console.info("Stage_RichEditor_Test_2300 InsertValue is: " + JSON.stringify(RichEditorTextSpanResult))
console.info("Stage_RichEditor_Test_2300 InsertValue is: " + JSON.stringify(RichEditorSpanPosition))
expect(typeof RichEditorTextSpanResult).assertEqual("object")
expect(typeof RichEditorSpanPosition).assertEqual("object")
expect(RichEditorTextSpanResult.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorTextSpanResult.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorTextSpanResult.spanPosition.spanRange[1]).assertEqual(10)
expect(RichEditorSpanPosition.spanIndex).assertEqual(20)
expect(RichEditorSpanPosition.spanRange[0]).assertEqual(20)
expect(RichEditorSpanPosition.spanRange[1]).assertEqual(20)
expect(RichEditorTextSpanResult.offsetInSpan[0]).assertEqual(10)
expect(RichEditorTextSpanResult.offsetInSpan[1]).assertEqual(100)
console.info('Stage_RichEditor_Test_2300 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2300 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2400', 0, async function (done) {
console.info('Stage_RichEditor_Test_2400 START');
setTimeout(()=>{
try{
let RichEditorDeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
let RichEditorDeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
console.info("Stage_RichEditor_Test_2400 InsertValue is: " + JSON.stringify(RichEditorDeleteValue))
console.info("Stage_RichEditor_Test_2400 InsertValue is: " + JSON.stringify(RichEditorDeleteValue1))
expect(typeof RichEditorDeleteValue).assertEqual("object")
expect(typeof RichEditorDeleteValue1).assertEqual("object")
expect(RichEditorDeleteValue.richEditorDeleteSpans).assertEqual(null)
expect(RichEditorDeleteValue1.richEditorDeleteSpans).assertEqual(null)
console.info('Stage_RichEditor_Test_2400 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2400 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2500', 0, async function (done) {
console.info('Stage_RichEditor_Test_2500 START');
setTimeout(()=>{
try{
let RichEditorSelection: RichEditorSelection = { selection:[10,10],spans:(null)}
console.info("Stage_RichEditor_Test_2500 InsertValue is: " + JSON.stringify(RichEditorSelection))
expect(typeof RichEditorSelection).assertEqual("object")
expect(RichEditorSelection.selection[0]).assertEqual(10)
expect(RichEditorSelection.selection[1]).assertEqual(10)
expect(RichEditorSelection.spans).assertEqual(null)
console.info('Stage_RichEditor_Test_2500 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2500 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2600', 0, async function (done) {
console.info('Stage_RichEditor_Test_2600 START');
setTimeout(()=>{
setTimeout(()=>{
try{
try{
let InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
let RichEditorImageSpanResult: 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 SpanPosition: RichEditorSpanPosition = { spanIndex:10, spanRange:[10,10]}
console.info("Stage_RichEditor_Test_2600 InsertValue is: " + JSON.stringify(RichEditorImageSpanResult))
let TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
expect(typeof RichEditorImageSpanResult).assertEqual("object")
let ImageSpanStyle: RichEditorImageSpanStyle = { size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}
expect(RichEditorImageSpanResult.spanPosition.spanRange[0]).assertEqual(10)
let TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
expect(RichEditorImageSpanResult.spanPosition.spanRange[1]).assertEqual(10)
let ImageSpanStyleResult: RichEditorImageSpanStyleResult = { size:[10,10],verticalAlign:(ImageSpanAlignment.BASELINE),objectFit:(ImageFit.Cover)}
expect(RichEditorImageSpanResult.spanPosition.spanIndex).assertEqual(10)
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]}
expect(RichEditorImageSpanResult.valuePixelMap).assertEqual(null)
let ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
expect(RichEditorImageSpanResult.valueResourceStr).assertEqual("aaa")
let ImageSpanOptions: RichEditorImageSpanOptions = { offset:10,imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
expect(RichEditorImageSpanResult.imageStyle.size[0]).assertEqual(10)
let ImageSpanStyleOptions: RichEditorUpdateImageSpanStyleOptions = { imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
expect(RichEditorImageSpanResult.imageStyle.size[1]).assertEqual(10)
let Selection: RichEditorSelection = { selection:[10,10],spans:(null)}
expect(RichEditorImageSpanResult.imageStyle.verticalAlign).assertEqual(ImageSpanAlignment.TOP)
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
expect(RichEditorImageSpanResult.imageStyle.objectFit).assertEqual(ImageFit.Auto)
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
expect(RichEditorImageSpanResult.offsetInSpan[0]).assertEqual(10)
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(InsertValue))
expect(RichEditorImageSpanResult.offsetInSpan[1]).assertEqual(100)
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(SpanPosition))
console.info('Stage_RichEditor_Test_2600 END ');
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) {
} catch(err) {
expect().assertFail()
expect().assertFail()
console.info('Stage_RichEditor_Test_2
1
00 ERR '+ JSON.stringify(err));
console.info('Stage_RichEditor_Test_2
6
00 ERR '+ JSON.stringify(err));
}
}
done();
done();
},500)
},500)
});
});
it('Stage_RichEditor_Test_2700', 0, async function (done) {
console.info('Stage_RichEditor_Test_2700 START');
setTimeout(()=>{
try{
let RichEditorTextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let RichEditorImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
console.info("Stage_RichEditor_Test_2700 InsertValue is: " + JSON.stringify(RichEditorTextSpan))
console.info("Stage_RichEditor_Test_2700 InsertValue is: " + JSON.stringify(RichEditorImageSpan))
expect(typeof RichEditorTextSpan).assertEqual("object")
expect(typeof RichEditorImageSpan).assertEqual("object")
expect(RichEditorTextSpan.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorTextSpan.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorTextSpan.spanPosition.spanRange[1]).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanRange[1]).assertEqual(10)
console.info('Stage_RichEditor_Test_2700 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2700 ERR '+ JSON.stringify(err));
}
done();
},500)
});
})
})
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录