Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fbc3e374
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看板
提交
fbc3e374
编写于
12月 30, 2021
作者:
O
openharmony_ci
提交者:
Gitee
12月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
!1460 ACE2.0修改失败用例
Merge pull request !1460 from jiyong/master
上级
a7f8cd98
3eb39e94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
61 addition
and
105 deletion
+61
-105
ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Flex.ets
...ts_standard/entry/src/main/ets/MainAbility/pages/Flex.ets
+36
-88
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/TabJsunit.test.ets
...st/entry/src/main/ets/MainAbility/test/TabJsunit.test.ets
+6
-4
ace/ace_standard/src/main/js/default/test/basicabilityapi.test.js
...standard/src/main/js/default/test/basicabilityapi.test.js
+19
-13
未找到文件。
ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Flex.ets
浏览文件 @
fbc3e374
...
...
@@ -27,26 +27,18 @@ struct flex {
}
build() {
Scroll
() {
Column() {
Text(
"Flex").fontSize(16
)
Column
() {
Column(
{ space : 2 }
) {
Text(
'direction:Column').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.Column,
wrap: FlexWrap.NoWrap,
justifyContent: FlexAlign.Center,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Auto
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex01').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex02').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex03').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex04').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('100%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('100%').height(20).backgroundColor(0xD2B48C)
Text('3').width('100%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex')
.height(70)
...
...
@@ -54,24 +46,16 @@ struct flex {
.padding(10)
.backgroundColor(0xAFEEEE)
Text(
"Flex1").fontSize(16
)
Text(
'direction:Row').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
justifyContent: FlexAlign.Start,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Center
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex10').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex12').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex13').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex14').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('20%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('20%').height(20).backgroundColor(0xD2B48C)
Text('3').width('20%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex1')
.height(70)
...
...
@@ -79,106 +63,70 @@ struct flex {
.padding(10)
.backgroundColor(0xAFEEEE)
Text(
"Flex2").fontSize(16
)
Text(
'direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.RowReverse,
wrap: FlexWrap.Wrap
Reverse
,
wrap: FlexWrap.Wrap,
justifyContent: FlexAlign.End,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex21').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex22').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex23').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex24').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('50%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('50%').height(20).backgroundColor(0xD2B48C)
Text('3').width('50%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex2')
.height(
7
0)
.height(
9
0)
.width('90%')
.padding(10)
.backgroundColor(0xAFEEEE)
Text(
"Flex3").fontSize(16
)
Text(
'justifyContent:SpaceBetween').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.ColumnReverse,
wrap: FlexWrap.WrapReverse,
justifyContent: FlexAlign.SpaceBetween,
alignContent: FlexAlign.SpaceBetween,
alignItems: ItemAlign.Stretch
wrap: FlexWrap.Wrap,
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex31').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex32').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex33').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex34').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('100%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('100%').height(20).backgroundColor(0xD2B48C)
Text('3').width('100%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex3')
.height(
7
0)
.height(
10
0)
.width('90%')
.padding(10)
.backgroundColor(0xAFEEEE)
Text(
"Flex4").fontSize(16
)
Text(
'justifyContent AND alignContent').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.ColumnReverse,
wrap: FlexWrap.WrapReverse,
justifyContent: FlexAlign.SpaceEvenly,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.End
wrap: FlexWrap.Wrap,
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex41').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex42').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex43').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex44').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('50%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('50%').height(20).backgroundColor(0xD2B48C)
Text('3').width('50%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex4')
.height(
7
0)
.height(
9
0)
.width('90%')
.padding(10)
.backgroundColor(0xAFEEEE)
Text(
"Flex5").fontSize(16
)
Text(
'justifyContent AND alignContent').fontSize(9).fontColor(0xCCCCCC).width('90%'
)
Flex({
direction: FlexDirection.ColumnReverse,
wrap: FlexWrap.WrapReverse,
justifyContent: FlexAlign.SpaceAround,
alignContent: FlexAlign.SpaceAround,
alignItems: ItemAlign.Baseline
wrap: FlexWrap.Wrap,
}) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Column({ space: 5 }) {
Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%')
Text('Flex51').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex52').width('20%').height(50).backgroundColor(0xD2B48C)
Text('Flex53').width('20%').height(50).backgroundColor(0xF5DEB3)
Text('Flex54').width('20%').height(50).backgroundColor(0xD2B48C)
}.width('100%').margin({ top: 5 })
Text('1').width('50%').height(20).backgroundColor(0xF5DEB3)
Text('2').width('50%').height(20).backgroundColor(0xD2B48C)
Text('3').width('50%').height(20).backgroundColor(0xF5DEB3)
}
.key('flex5')
.height(
7
0)
.height(
9
0)
.width('90%')
.padding(10)
.backgroundColor(0xAFEEEE)
}
}
}
.width('100%').margin({ top: 5 })
}
.width('100%')
}
}
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/TabJsunit.test.ets
浏览文件 @
fbc3e374
...
...
@@ -55,8 +55,10 @@ export default function tabJsunit() {
expect(obj.$type).assertEqual('Tabs')
expect(obj.$attrs.barPosition).assertEqual('BarPosition.Start')
expect(obj.$attrs.index).assertEqual('1')
expect(obj.$attrs.vertical).assertEqual("true")
expect(obj.$attrs.scrollable).assertEqual("true")
console.info('obj.$attrs.scrollable———>' + typeof(obj.$attrs.scrollable))
console.info('obj.$attrs.vertical———>' + typeof(obj.$attrs.vertical))
expect(obj.$attrs.scrollable).assertTrue()
expect(obj.$attrs.vertical).assertEqual('true')
expect(obj.$attrs.barMode).assertEqual('BarMode.Fixed')
expect(obj.$attrs.barWidth).assertEqual(70.000000.toFixed(6))
expect(obj.$attrs.barHeight).assertEqual(150.000000.toFixed(6))
...
...
@@ -107,8 +109,8 @@ export default function tabJsunit() {
expect(obj.$type).assertEqual('Tabs')
expect(obj.$attrs.barPosition).assertEqual('BarPosition.End')
expect(obj.$attrs.barMode).assertEqual('BarMode.Scrollable')
expect(obj.$attrs.
vertical).assertEqual("false"
)
expect(obj.$attrs.
scrollable).assertEqual("false"
)
expect(obj.$attrs.
scrollable).assertFalse(
)
expect(obj.$attrs.
vertical).assertEqual('false'
)
console.info('++++++++++++++++ Tab TestCase 3 End ++++++++++++++++');
done();
});
...
...
ace/ace_standard/src/main/js/default/test/basicabilityapi.test.js
浏览文件 @
fbc3e374
...
...
@@ -110,10 +110,11 @@ describe('basicabilityapi', function () {
*/
it
(
'
testRouterPush
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testRouterPush START
'
);
let
options
=
{
uri
:
'
pages/routerPush/index
'
}
let
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
router
.
push
({
uri
:
'
pages/routerPush/index
'
});
router
.
push
(
options
);
resolve
();
});
let
promise2
=
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -172,21 +173,25 @@ describe('basicabilityapi', function () {
* @tc.desc Replace the current page with a page in the application, and destroy the replaced page.
*/
it
(
'
testRouterReplace
'
,
0
,
async
function
(
done
)
{
//测试框架不允许index页面直接替换,需要先跳转到其他页面再替换
console
.
info
(
'
testRouterReplace START
'
);
let
options
=
{
uri
:
'
pages/routerPush/index
'
}
let
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
router
.
push
({
uri
:
'
pages/routerPush/index
'
});
router
.
push
(
options
);
resolve
();
});
let
repleasePage
=
{
uri
:
'
pages/routerReplace/index
'
}
let
promise2
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
router
.
replace
({
uri
:
'
pages/routerReplace/index
'
});
router
.
replace
(
repleasePage
);
resolve
();
},
500
);
});
//替换堆栈数量不会变
let
promise3
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
let
pages
=
router
.
getState
();
...
...
@@ -295,10 +300,11 @@ describe('basicabilityapi', function () {
let
size
=
router
.
getLength
();
console
.
info
(
'
[router.getLength] pages stack size =
'
+
size
);
expect
(
size
).
assertEqual
(
'
1
'
);
let
options
=
{
uri
:
'
pages/routerPush/index
'
}
let
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
router
.
push
({
uri
:
'
pages/routerPush/index
'
});
router
.
push
(
options
);
resolve
();
});
let
promise2
=
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -422,7 +428,7 @@ describe('basicabilityapi', function () {
console
.
info
(
'
[settimeout] v2:
'
+
v2
);
expect
(
'
test
'
).
assertEqual
(
v1
);
expect
(
'
message
'
).
assertEqual
(
v2
);
expect
(
).
assertTrue
(
end_time
-
start_time
>=
delay
);
expect
(
end_time
-
start_time
>=
delay
).
assertTrue
(
);
console
.
info
(
'
testSetTimeout END
'
);
done
();
},
delay
,
'
test
'
,
'
message
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录