Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1b251275
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看板
提交
1b251275
编写于
4月 01, 2023
作者:
W
wang-xupeng2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update marquee and textTwo
Signed-off-by:
N
wang-xupeng2
<
wangxupeng2@huawei.com
>
上级
c49867d6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
57 addition
and
54 deletion
+57
-54
arkui/ace_ets_component_ui/entry/src/main/ets/test/marqueeJsunit.test.ets
...mponent_ui/entry/src/main/ets/test/marqueeJsunit.test.ets
+30
-29
arkui/ace_ets_component_ui/entry/src/main/ets/test/textTwoJsunit.test.ets
...mponent_ui/entry/src/main/ets/test/textTwoJsunit.test.ets
+27
-25
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/test/marqueeJsunit.test.ets
浏览文件 @
1b251275
...
...
@@ -72,31 +72,6 @@ export default function marqueeJsunit() {
});
it('marqueeJsunit_0300', 0, async function (done) {
console.info('marqueeJsunit_0300 START');
await CommonFunc.sleep(100);
// modify the values partly attribute illegal value of marguee dynamically
globalThis.value.message.notify({name:'loop',value:-30})
await CommonFunc.sleep(1000);
// check the value of changed attribute
let strJson = getInspectorByKey('marquee');
let obj = JSON.parse(strJson);
expect(obj.$attrs.loop).assertEqual('2');
done();
});
it('marqueeJsunit_0400', 0, async function (done) {
console.info('marqueeJsunit_0400 START');
// modify the type attribute normal value of marquee dynamically
globalThis.value.message.notify({name:'step',value:50})
await CommonFunc.sleep(200);
// check the value of changed parameter
let strJson = getInspectorByKey('marquee');
let obj = JSON.parse(strJson);
expect(obj.$attrs.step).assertEqual('50.000000');
done();
});
it('marqueeJsunit_0500', 0, async function (done) {
console.info('marqueeJsunit_0400 START');
await CommonFunc.sleep(1000);
// test event
...
...
@@ -109,18 +84,44 @@ export default function marqueeJsunit() {
// check the test event
let ttx = await driver.findComponent(ON.id('text1'));
let txt = await ttx.getText();
console.info("[marqueeJsunit_0
5
00'] component obj is: " + txt);
console.info("[marqueeJsunit_0
3
00'] component obj is: " + txt);
expect(txt == 'onStart').assertTrue();
let ttxx = await driver.findComponent(ON.id('text2'));
let txtt = await ttxx.getText();
console.info("[marqueeJsunit_0
5
00'] component obj2 is: " + txtt);
console.info("[marqueeJsunit_0
3
00'] component obj2 is: " + txtt);
expect(txtt == 'onBounce').assertTrue();
await driver.delayMs(1000);
let ttxxx = await driver.findComponent(ON.id('text3'));
let txttt = await ttxxx.getText();
console.info("[marqueeJsunit_0
5
00'] component obj3 is: " + txttt);
console.info("[marqueeJsunit_0
3
00'] component obj3 is: " + txttt);
expect(txttt == 'onFinish').assertTrue();
done();
});
it('marqueeJsunit_0400', 0, async function (done) {
console.info('marqueeJsunit_0300 START');
await CommonFunc.sleep(100);
// modify the values partly attribute illegal value of marguee dynamically
globalThis.value.message.notify({name:'loop',value:-30})
await CommonFunc.sleep(1000);
// check the value of changed attribute
let strJson = getInspectorByKey('marquee');
let obj = JSON.parse(strJson);
expect(obj.$attrs.loop).assertEqual('-30');
done();
});
it('marqueeJsunit_0500', 0, async function (done) {
console.info('marqueeJsunit_0400 START');
// modify the type attribute normal value of marquee dynamically
globalThis.value.message.notify({name:'step',value:50})
await CommonFunc.sleep(200);
// check the value of changed parameter
let strJson = getInspectorByKey('marquee');
let obj = JSON.parse(strJson);
expect(obj.$attrs.step).assertEqual('50.000000');
done();
});
it('marqueeJsunit_0600', 0, async function (done) {
console.info('marqueeJsunit_0600 START');
...
...
@@ -130,7 +131,7 @@ export default function marqueeJsunit() {
let strJson = getInspectorByKey('marquee');
let obj = JSON.parse(strJson);
// to confirm
expect(obj.$attrs.step).assertEqual('
5
0.000000');
expect(obj.$attrs.step).assertEqual('
-3
0.000000');
done();
});
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/textTwoJsunit.test.ets
浏览文件 @
1b251275
...
...
@@ -43,60 +43,62 @@ export default function textTwoJsunit() {
});
it('textTwoJsunit_0100', 0, async function (done) {
console.info('imageOneJsunit_0100 START');
console.info('textTwoJsunit_0200 START');
// test the illegal value of decoration
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'type',value:undefined})
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'color',value:undefined})
await CommonFunc.sleep(1000);
// get the image component and test attribute
let strJson = getInspectorByKey('text1');
let obj = JSON.parse(strJson);
console.info('textTwoJsunit_0100 component obj is: ' + obj.$attrs.decoration);
expect(obj.$attrs.decoration).assertEqual('{"type":"TextDecorationType.None","color":"#FF000000"}');
done();
});
it('textTwoJsunit_0200', 0, async function (done) {
console.info('imageOneJsunit_0200 START');
await CommonFunc.sleep(500);
// get the image component and test attribute
let strJson = getInspectorByKey('text1');
let obj = JSON.parse(strJson);
console.info('textTwoJsunit_0200 component obj is: ' + obj.$attrs.decoration);
expect(obj.$attrs.decoration).assertEqual('{"type":"TextDecorationType.LineThrough","color":"#FFFFEEAF"}');
await CommonFunc.sleep(1000);
// to modify the atrribute
globalThis.value.message.notify({name:'type',value:TextDecorationType.Overline})
await CommonFunc.sleep(200);
globalThis.value.message.notify({name:'color',value:Color.Green})
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'color',value:Color.Green})
await CommonFunc.sleep(200);
let strJson2 = getInspectorByKey('text1');
let obj2 = JSON.parse(strJson2);
console.info('textTwoJsunit_0
1
00 component obj2 is: ' + obj2.$attrs.decoration);
console.info('textTwoJsunit_0
2
00 component obj2 is: ' + obj2.$attrs.decoration);
expect(obj2.$attrs.decoration).assertEqual('{"type":"TextDecorationType.Overline","color":"#FF008000"}');
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'type',value:TextDecorationType.Underline})
await CommonFunc.sleep(200);
globalThis.value.message.notify({name:'color',value:'rgb(238, 130, 238)'})
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'color',value:'rgb(238, 130, 238)'})
await CommonFunc.sleep(200);
let strJson3 = getInspectorByKey('text1');
let obj3 = JSON.parse(strJson3);
console.info('textTwoJsunit_0
1
00 component obj3 is: ' + obj3.$attrs.decoration);
console.info('textTwoJsunit_0
2
00 component obj3 is: ' + obj3.$attrs.decoration);
expect(obj3.$attrs.decoration).assertEqual('{"type":"TextDecorationType.Underline","color":"#FFEE82EE"}');
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'type',value:TextDecorationType.None})
await CommonFunc.sleep(200);
globalThis.value.message.notify({name:'color',value:'#FFACEEEE'})
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'color',value:'#FFACEEEE'})
await CommonFunc.sleep(200);
let strJson4 = getInspectorByKey('text1');
let obj4 = JSON.parse(strJson4);
console.info('textTwoJsunit_0
1
00 component obj4 is: ' + obj4.$attrs.decoration);
console.info('textTwoJsunit_0
2
00 component obj4 is: ' + obj4.$attrs.decoration);
expect(obj4.$attrs.decoration).assertEqual('{"type":"TextDecorationType.None","color":"#FFACEEEE"}');
done();
});
it('textTwoJsunit_0200', 0, async function (done) {
console.info('textTwoJsunit_0200 START');
// test the illegal value of decoration
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'type',value:undefined})
await CommonFunc.sleep(500);
globalThis.value.message.notify({name:'color',value:undefined})
await CommonFunc.sleep(1000);
let strJson2 = getInspectorByKey('text1');
let obj2 = JSON.parse(strJson2);
console.info('textTwoJsunit_0200 component obj2 is: ' + obj2.$attrs.decoration);
expect(obj2.$attrs.decoration).assertEqual('{"type":"TextDecorationType.None","color":"#FFACEEEE"}');
done();
});
it('textTwoJsunit_0300', 0, async function (done) {
console.info('textTwoJsunit_0300 START');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录