Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ab1e4cd5
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ab1e4cd5
编写于
5月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8799 【ACE子系统】适配UI测试套
Merge pull request !8799 from 王旭鹏/master
上级
910b913d
d60ed37b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
25 addition
and
32 deletion
+25
-32
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/NavigationPage.ets
...i/entry/src/main/ets/MainAbility/pages/NavigationPage.ets
+2
-1
arkui/ace_ets_component_ui/entry/src/main/ets/test/NavigationJsunit.test.ets
...nent_ui/entry/src/main/ets/test/NavigationJsunit.test.ets
+20
-28
arkui/ace_ets_component_ui/entry/src/main/ets/test/dividerJsunit.test.ets
...mponent_ui/entry/src/main/ets/test/dividerJsunit.test.ets
+3
-3
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/NavigationPage.ets
浏览文件 @
ab1e4cd5
...
...
@@ -147,7 +147,7 @@ struct NavigationPage {
Column() {
Navigation() {
TextInput({ placeholder: 'search...' })
.width(
336
)
.width(
'90%'
)
.height(40)
.backgroundColor('#FFFFFF')
.margin({ top: 8, left: 12 })
...
...
@@ -156,6 +156,7 @@ struct NavigationPage {
ForEach(this.arr, (item) => {
ListItem() {
Text('' + item)
.width('90%')
.height(72)
.backgroundColor('#FFFFFF')
.borderRadius(24)
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/NavigationJsunit.test.ets
浏览文件 @
ab1e4cd5
...
...
@@ -65,11 +65,11 @@ export default function NavigationJsunit() {
expect(obj.$attrs.hideToolBar).assertEqual(false);
expect(obj.$attrs.hideTitleBar).assertEqual(false);
expect(obj.$attrs.hideBackButton).assertEqual(false);
//expect(obj.$attrs.navBarWidth).assertEqual('700
');
//
expect(obj.$attrs.navBarPosition).assertEqual('NavBarPosition.Start');
//expect(obj.$attrs.mode).assertEqual('NavigationMode.Split
');
//
expect(obj.$attrs.backButtonIcon).assertEqual('resources/base/media/icon.png');
//expect(obj.$attrs.hideNavBar).assertEqual('false'
);
expect(obj.$attrs.navBarWidth).assertEqual('700.00vp
');
expect(obj.$attrs.navBarPosition).assertEqual('NavBarPosition.Start');
expect(obj.$attrs.mode).assertEqual('NavigationMode.SPLIT
');
expect(obj.$attrs.backButtonIcon).assertEqual('resources/base/media/icon.png');
expect(obj.$attrs.hideNavBar).assertEqual(false
);
console.info('[NavigationJsunit_0100] END');
done();
});
...
...
@@ -78,18 +78,10 @@ export default function NavigationJsunit() {
// Verify onTitleModeChange event of Navigation component
console.info('[NavigationJsunit_0300] START');
await CommonFunc.sleep(1000);
let driver = await UiDriver.create();
let component = await driver.findComponent(BY.key('titleModeChange'));
let text = await component.getText();
expect(text).assertEqual('TitleModeChange:');
let driver1 = await Driver.create();
let scrollBar = await driver1.findComponent(ON.id('list'));
await scrollBar.scrollSearch(ON.text('9'));
await CommonFunc.sleep(1000);
let component1 = await driver.findComponent(BY.key('titleModeChange'));
let text1 = await component1.getText();
//expect(text1).assertEqual('TitleModeChange:succ');
let strJson = getInspectorByKey('titleModeChange');
let obj = JSON.parse(strJson);
console.info("[NavigationJsunit_0300] content is: " + obj.$attrs.content);
expect(obj.$attrs.content).assertEqual('TitleModeChange:');
console.info('[NavigationJsunit_0300] END');
done();
});
...
...
@@ -100,10 +92,10 @@ export default function NavigationJsunit() {
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'hideNavBar',value:'true'})
await CommonFunc.sleep(3000);
let
driver = await UiDriver.create(
);
let
component1 = await driver.findComponent(BY.key('navBarStateChange')
);
let text1 = await component1.getText(
);
expect(
text1
).assertEqual('NavBarStateChange:succ');
let
strJson = getInspectorByKey('navBarStateChange'
);
let
obj = JSON.parse(strJson
);
console.info("[NavigationJsunit_0400] content is: " + obj.$attrs.content
);
expect(
obj.$attrs.content
).assertEqual('NavBarStateChange:succ');
console.info('[NavigationJsunit_0400] END');
done();
});
...
...
@@ -140,10 +132,10 @@ export default function NavigationJsunit() {
expect(obj.$attrs.hideToolBar).assertEqual(true);
expect(obj.$attrs.hideTitleBar).assertEqual(true);
expect(obj.$attrs.hideBackButton).assertEqual(true);
//expect(obj.$attrs.navBarWidth).assertEqual('710
');
//
expect(obj.$attrs.navBarPosition).assertEqual('NavBarPosition.End');
//
expect(obj.$attrs.backButtonIcon).assertEqual('resources/base/media/image.png');
//expect(obj.$attrs.hideNavBar).assertEqual('false'
);
expect(obj.$attrs.navBarWidth).assertEqual('710.00vp
');
expect(obj.$attrs.navBarPosition).assertEqual('NavBarPosition.End');
expect(obj.$attrs.backButtonIcon).assertEqual('resources/base/media/image.png');
expect(obj.$attrs.hideNavBar).assertEqual(true
);
console.info('[NavigationJsunit_0600] END');
done();
});
...
...
@@ -159,11 +151,11 @@ export default function NavigationJsunit() {
expect(obj.$attrs.titleMode).assertEqual('NavigationTitleMode.Mini');
globalThis.value.message.notify({name:'titleMode',value:NavigationTitleMode.Full})
await CommonFunc.sleep(
5
000);
await CommonFunc.sleep(
2
000);
let strJson1 = getInspectorByKey('navigation');
let obj1 = JSON.parse(strJson1);
console.info("[NavigationJsunit_0700] titleMode1 is: " + obj1.$attrs.titleMode);
//
expect(obj1.$attrs.titleMode).assertEqual('NavigationTitleMode.Full');
expect(obj1.$attrs.titleMode).assertEqual('NavigationTitleMode.Full');
console.info('[NavigationJsunit_0700] END');
done();
});
...
...
@@ -183,7 +175,7 @@ export default function NavigationJsunit() {
let strJson1 = getInspectorByKey('navigation');
let obj1 = JSON.parse(strJson1);
console.info("[NavigationJsunit_0800] mode1 is: " + obj1.$attrs.mode);
//expect(obj1.$attrs.mode).assertEqual('NavigationMode.Stack
');
expect(obj1.$attrs.mode).assertEqual('NavigationMode.STACK
');
console.info('[NavigationJsunit_0800] END');
done();
});
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/dividerJsunit.test.ets
浏览文件 @
ab1e4cd5
...
...
@@ -50,7 +50,7 @@ export default function dividerJsunit() {
let obj = JSON.parse(strJson);
console.info("dividerJsunit_0100'] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.vertical).assertEqual('false');
expect(obj.$attrs.strokeWidth).assertEqual('20.00
0000
');
expect(obj.$attrs.strokeWidth).assertEqual('20.00
vp
');
// to confirm
//expect(obj.$attrs.lineCap).assertEqual('LineCapStyle.Butt');
expect(obj.$attrs.lineCap).assertEqual('BUTT');
...
...
@@ -72,7 +72,7 @@ export default function dividerJsunit() {
let strJson = getInspectorByKey('divider');
let obj = JSON.parse(strJson);
console.info("[dividerJsunit_0200'] component obj is: " + JSON.stringify(obj.$attrs.lineCap));
expect(obj.$attrs.strokeWidth).assertEqual('30.00
0000
');
expect(obj.$attrs.strokeWidth).assertEqual('30.00
vp
');
expect(obj.$attrs.lineCap).assertEqual('ROUND');
expect(obj.$attrs.color).assertEqual('#FFFFFFFF');
done();
...
...
@@ -105,7 +105,7 @@ export default function dividerJsunit() {
// check the value of changed attribute
let strJson = getInspectorByKey('divider');
let obj = JSON.parse(strJson);
expect(obj.$attrs.strokeWidth).assertEqual('-30.00
0000
');
expect(obj.$attrs.strokeWidth).assertEqual('-30.00
vp
');
expect(obj.$attrs.lineCap).assertEqual('BUTT');
// to confirm
expect(obj.$attrs.color).assertEqual('#33182431');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录