Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
65a49e01
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看板
提交
65a49e01
编写于
5月 17, 2023
作者:
W
wmlih
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test:add config file
Signed-off-by:
N
wmlih
<
wmlih@isoftstone.com
>
上级
35d3c412
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
720 addition
and
367 deletion
+720
-367
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/MainAbility.ts
...layout_test/entry/src/main/ets/MainAbility/MainAbility.ts
+4
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Stretch/FlexPadding.ets
...y/pages/Flex/alignItems/ItemAlign_Stretch/FlexPadding.ets
+11
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetVisibility_SubChange.test.ets
...ubComponentChanged/ColumnSetVisibility_SubChange.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets
...x/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridItemChange/Grid_RowCol_ItemRowStartEnd.test.ets
...llSet/GridItemChange/Grid_RowCol_ItemRowStartEnd.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridItemChange/Grid_RowCol_ItemVisibility.test.ets
...AllSet/GridItemChange/Grid_RowCol_ItemVisibility.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/List.test.ets
...ace_ets_layout_test/entry/src/main/ets/test/List.test.ets
+362
-38
arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_ListSize.test.ets
...ts/test/List/List_Space/ListChange/List_ListSize.test.ets
+0
-52
arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_Padding.test.ets
...ets/test/List/List_Space/ListChange/List_Padding.test.ets
+0
-49
arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/subComponentChanged/Row_TextVisibility.test.ets
.../test/Row/subComponentChanged/Row_TextVisibility.test.ets
+2
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets
...ain/ets/test/Stack/StackItem_change/stack_zIndex.test.ets
+3
-98
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barMode.test.ets
...main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barMode.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barPosition.test.ets
.../ets/test/Tabs/Tabs_ParmsChange/Tabs_barPosition.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barWidHei.test.ets
...in/ets/test/Tabs/Tabs_ParmsChange/Tabs_barWidHei.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_scrollable.test.ets
...n/ets/test/Tabs/Tabs_ParmsChange/Tabs_scrollable.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/module.json
arkui/ace_ets_layout_test/entry/src/main/module.json
+24
-8
arkui/ace_ets_layout_test/entry/src/main/resources/base/profile/main_pages.json
...est/entry/src/main/resources/base/profile/main_pages.json
+300
-104
arkui/ace_ets_layout_test/signature/openharmony_sx.p7b
arkui/ace_ets_layout_test/signature/openharmony_sx.p7b
+0
-0
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
65a49e01
import
Ability
from
'
@ohos.app.ability.UIAbility
'
import
abilityAccessCtrl
from
'
@ohos.abilityAccessCtrl
'
export
default
class
MainAbility
extends
Ability
{
onCreate
(
want
,
launchParam
){
// Ability is creating, initialize resources for this ability
...
...
@@ -15,6 +15,9 @@ export default class MainAbility extends Ability {
onWindowStageCreate
(
windowStage
)
{
// Main window is created, set main page for this ability
console
.
log
(
"
[Demo] MainAbility onWindowStageCreate windowStage=
"
+
windowStage
)
let
AtManager
=
abilityAccessCtrl
.
createAtManager
()
AtManager
.
requestPermissionsFromUser
(
this
.
context
,[
"
ohos.permission.CAPTURE_SCREEN
"
]).
then
(()
=>
{})
globalThis
.
windowStage
=
windowStage
globalThis
.
abilityContext
=
this
.
context
windowStage
.
setUIContent
(
this
.
context
,
"
MainAbility/pages/index/index
"
,
null
)
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Stretch/FlexPadding.ets
浏览文件 @
65a49e01
...
...
@@ -20,7 +20,17 @@ struct FlexPadding_Stretch {
messageManager:MessageManager = new MessageManager()
private content: string = "FlexPadding_Stretch Page";
onPageShow() {
console.info('FlexPadding_Stretch page show called');
console.info('FlexPadding_Stretch onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.testPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetVisibility_SubChange.test.ets
浏览文件 @
65a49e01
...
...
@@ -19,7 +19,7 @@ import CommonFunc from "../../../MainAbility/common/Common";
import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager';
export default function ColumnSetVisibility_SubChange() {
describe('ColumnSetVisibilityTest', function () {
before
Each
(async function (done) {
before
All
(async function (done) {
let options = {
uri: 'MainAbility/pages/Column/subcomponentChanged/ColumnSetVisibility_SubChange',
}
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets
浏览文件 @
65a49e01
...
...
@@ -70,9 +70,9 @@ export default function flexPadding_StretchJsunit() {
expect(flexPadding01.right).assertLarger(textFlexPadding03.right)
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(10))
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(1
8
0))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(1
8
0))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(1
8
0))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(150))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(150))
...
...
@@ -105,13 +105,13 @@ export default function flexPadding_StretchJsunit() {
expect(textFlexPadding01.bottom).assertEqual(textFlexPadding02.bottom)
expect(textFlexPadding02.bottom).assertEqual(textFlexPadding03.bottom)
expect(Math.round(flexPadding01.bottom - textFlexPadding01.bottom)).assertEqual(vp2px(
2
0))
expect(Math.round(flexPadding01.bottom - textFlexPadding01.bottom)).assertEqual(vp2px(
3
0))
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30))
expect(textFlexPadding03.right).assertLess(flexPadding01.right)
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(1
5
0))
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(1
4
0))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(1
4
0))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(1
4
0))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(440/3))
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridItemChange/Grid_RowCol_ItemRowStartEnd.test.ets
浏览文件 @
65a49e01
...
...
@@ -214,7 +214,7 @@ export default function grid_RowCol_ItemRowStartEndTest() {
expect(twelfthGridItem.bottom).assertEqual(gridContainer.bottom);
expect(thirteenthGridItem.left).assertEqual(twelfthGridItem.right);
expect(thirteenthGridItem.top).assertEqual(twelfthGridItem.top);
expect(Math.round((gridContainer.right - thirteenthGridItem.
lef
t)*10)/10).assertEqual(Math.round(vp2px(75)*10)/10);
expect(Math.round((gridContainer.right - thirteenthGridItem.
righ
t)*10)/10).assertEqual(Math.round(vp2px(75)*10)/10);
expect(thirteenthGridItem.bottom).assertEqual(gridContainer.bottom); // fourth row
console.info('[testGridRowColItemRowStartToOneEndToThree] END');
done();
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridItemChange/Grid_RowCol_ItemVisibility.test.ets
浏览文件 @
65a49e01
...
...
@@ -18,7 +18,7 @@ import router from '@ohos.router';
import CommonFunc from '../../../../MainAbility/common/Common';
export default function grid_RowCol_ItemVisibilityTest() {
describe('Grid_RowCol_ItemVisibilityTest', function () {
before
Each
(async function (done) {
before
All
(async function (done) {
console.info("Grid_RowCol_ItemVisibilityTest beforeEach start");
let options = {
url: 'MainAbility/pages/Grid/GridTemplatesAllSet/GridItemChange/Grid_RowCol_ItemVisibility',
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/List.test.ets
浏览文件 @
65a49e01
此差异已折叠。
点击以展开。
arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_ListSize.test.ets
浏览文件 @
65a49e01
...
...
@@ -100,57 +100,5 @@ export default function List_ListSize() {
console.info('testListListSizeMeet END');
done();
});
/**
* @tc.number SUB_ACE_LIST_LIST_LISTSIZE_TEST_0200
* @tc.name testListListSizeOverflow
* @tc.desc The List parent component sets the width and height to not meet the layout of the child component
*/
it('testListListSizeOverflow', 0, async function (done) {
console.info('testListListSizeOverflow START');
globalThis.value.message.notify({name:'changeWidth', value:280})
globalThis.value.message.notify({name:'changeHeight', value:400})
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('List_ListSize_01');
let obj = JSON.parse(strJson);
await CommonFunc.sleep(1000);
expect(obj.$type).assertEqual('List');
let List_ListSize_011 = CommonFunc.getComponentRect('List_ListSize_011');
let List_ListSize_012 = CommonFunc.getComponentRect('List_ListSize_012');
let List_ListSize_013 = CommonFunc.getComponentRect('List_ListSize_013');
let List_ListSize_014 = CommonFunc.getComponentRect('List_ListSize_014');
let List_ListSize_01 = CommonFunc.getComponentRect('List_ListSize_01');
expect(List_ListSize_011.left).assertEqual(List_ListSize_01.left);
expect(List_ListSize_012.left).assertEqual(List_ListSize_01.left);
expect(List_ListSize_013.left).assertEqual(List_ListSize_01.left);
expect(List_ListSize_014.left).assertEqual(List_ListSize_01.left);
expect(List_ListSize_011.top).assertEqual(List_ListSize_01.top);
expect(Math.round(List_ListSize_012.top - List_ListSize_011.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_ListSize_013.top - List_ListSize_012.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_ListSize_014.top - List_ListSize_013.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_ListSize_014.bottom - List_ListSize_01.bottom)).assertEqual(vp2px(60))
expect(Math.round(List_ListSize_011.right - List_ListSize_011.left)).assertEqual(vp2px(280));
expect(Math.round(List_ListSize_012.right - List_ListSize_012.left)).assertEqual(vp2px(280));
expect(Math.round(List_ListSize_013.right - List_ListSize_013.left)).assertEqual(vp2px(280));
expect(Math.round(List_ListSize_014.right - List_ListSize_014.left)).assertEqual(vp2px(280));
expect(Math.round(List_ListSize_011.bottom - List_ListSize_011.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListSize_012.bottom - List_ListSize_012.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListSize_013.bottom - List_ListSize_013.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListSize_014.bottom - List_ListSize_014.top)).assertEqual(vp2px(100));
let driver = await Driver.create();
await driver.swipe(
Math.round(List_ListSize_013.left + ((List_ListSize_013.right - List_ListSize_013.left) / 2)),
Math.round(List_ListSize_013.bottom),
Math.round(List_ListSize_012.left + ((List_ListSize_012.right - List_ListSize_012.left) / 2)),
Math.round(List_ListSize_012.bottom));
await CommonFunc.sleep(1000);
let List_ListSize_024 = CommonFunc.getComponentRect('List_ListSize_014');
expect(List_ListSize_024.bottom).assertEqual(List_ListSize_01.bottom);
console.info('testListListSizeOverflow END');
done();
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_Padding.test.ets
浏览文件 @
65a49e01
...
...
@@ -98,54 +98,5 @@ export default function List_Padding() {
console.info('testListPaddingToTwenty END');
done();
});
/**
* @tc.number SUB_ACE_LIST_LIST_PADDING_TEST_0200
* @tc.name testListPaddingToThirty
* @tc.desc List parent component binding padding property and value set to 30
*/
it('testListPaddingToThirty', 0, async function (done) {
console.info('testListPaddingToThirty START');
globalThis.value.message.notify({name:'addPadding', value:30})
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('List_Padding_01');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('List');
let List_Padding_011 = CommonFunc.getComponentRect('List_Padding_011');
let List_Padding_012 = CommonFunc.getComponentRect('List_Padding_012');
let List_Padding_013 = CommonFunc.getComponentRect('List_Padding_013');
let List_Padding_014 = CommonFunc.getComponentRect('List_Padding_014');
let List_Padding_01 = CommonFunc.getComponentRect('List_Padding_01');
expect(Math.round(List_Padding_011.left - List_Padding_01.left)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_012.left - List_Padding_01.left)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_013.left - List_Padding_01.left)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_014.left - List_Padding_01.left)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_011.top - List_Padding_01.top)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_01.bottom - List_Padding_014.bottom)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_01.right - List_Padding_011.right)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_01.right - List_Padding_012.right)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_01.right - List_Padding_013.right)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_01.right - List_Padding_014.right)).assertEqual(vp2px(30));
expect(Math.round(List_Padding_012.top - List_Padding_011.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_Padding_013.top - List_Padding_012.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_Padding_014.top - List_Padding_013.bottom)).assertEqual(vp2px(20));
expect(Math.round(List_Padding_011.right - List_Padding_011.left)).assertEqual(vp2px(290));
expect(Math.round(List_Padding_012.right - List_Padding_012.left)).assertEqual(vp2px(290));
expect(Math.round(List_Padding_013.right - List_Padding_013.left)).assertEqual(vp2px(290));
expect(Math.round(List_Padding_014.right - List_Padding_014.left)).assertEqual(vp2px(290));
expect(Math.round(List_Padding_011.bottom - List_Padding_011.top)).assertEqual(vp2px(100));
expect(Math.round(List_Padding_012.bottom - List_Padding_012.top)).assertEqual(vp2px(100));
expect(Math.round(List_Padding_013.bottom - List_Padding_013.top)).assertEqual(vp2px(100));
expect(Math.round(List_Padding_014.bottom - List_Padding_014.top)).assertEqual(vp2px(100));
let driver = await Driver.create();
await driver.swipe(360, Math.round(List_Padding_014.top), 360, Math.round(List_Padding_013.top));
await CommonFunc.sleep(3000);
let List_Padding_014Again = CommonFunc.getComponentRect('List_Padding_014');
expect(List_Padding_01.top - List_Padding_014Again.top).assertFalse(vp2px(30));
console.info('testListPaddingToThirty END');
done();
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/subComponentChanged/Row_TextVisibility.test.ets
浏览文件 @
65a49e01
...
...
@@ -18,7 +18,7 @@ import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
export default function row_TextVisibilityTest() {
describe('Row_TextVisibilityTest', function () {
before
Each
(async function (done) {
before
All
(async function (done) {
console.info("Row_TextVisibilityTest beforeEach start");
let options = {
url: 'MainAbility/pages/Row/subComponentChanged/Row_TextVisibility',
...
...
@@ -149,7 +149,7 @@ export default function row_TextVisibilityTest() {
let secondTextStrJson = getInspectorByKey('Row_TextVisibility2');
let secondTextObj = JSON.parse(secondTextStrJson);
expect(secondTextObj.$attrs.visibility).assertEqual("Visibility.
v
isible");
expect(secondTextObj.$attrs.visibility).assertEqual("Visibility.
V
isible");
expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50));
expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100));
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets
浏览文件 @
65a49e01
...
...
@@ -59,6 +59,7 @@ export default function Stack_ZIndex() {
if
(
err
)
{
console
.
log
(
'Failed to save screenshot. Code: '
+
JSON
.
stringify
(
err
));
isTrue
=
false
;
return
isTrue
;
}
console
.
log
(
'Succeeded in saving sreenshot. Pixel bytes number: '
+
pixelMap
.
getPixelBytesNumber
());
let
PixelBytesNumber
=
pixelMap
.
getPixelBytesNumber
();
...
...
@@ -72,7 +73,7 @@ export default function Stack_ZIndex() {
for
(
var
i
=
0
;
i
<
bufferArr
.
length
;
i
+=
40
)
{
if
(
bufferArr
[
i
]
!=
255
||
bufferArr
[
i
+
1
]
!=
0
||
bufferArr
[
i
+
2
]
!=
0
){
isTrue
=
false
;
return
break
;
}
}
}
...
...
@@ -84,7 +85,7 @@ export default function Stack_ZIndex() {
isTrue
=
false
;
};
await
CommonFunc
.
sleep
(
5000
);
return
isTrue
return
isTrue
;
}
beforeEach
(
async
function
(
done
)
{
console
.
info
(
"Stack_ZIndex beforeEach start"
);
...
...
@@ -112,102 +113,6 @@ export default function Stack_ZIndex() {
await
CommonFunc
.
sleep
(
2000
);
console
.
info
(
"Stack_ZIndex after each called"
);
});
/**
* @tc.number SUB_ACE_STACK_ZINDEX_TEST_0100
* @tc.name testStackZIndexWithAlignmentTopStart
* @tc.desc The stack component sets alignContent to Alignment.TopStart and sets the zIndex of
* the first subcomponent
*/
it
(
'testStackZIndexWithAlignmentTopStart'
,
0
,
async
function
(
done
)
{
console
.
info
(
'[testStackZIndexWithAlignmentTopStart] START'
);
await
CommonFunc
.
sleep
(
1000
);
let
strJson
=
getInspectorByKey
(
'Stack_ZIndex_01'
);
let
obj
=
JSON
.
parse
(
strJson
);
expect
(
obj
.
$type
)
.
assertEqual
(
'Stack'
);
expect
(
obj
.
$attrs
.
alignContent
)
.
assertEqual
(
'Alignment.TopStart'
);
let
Stack_ZIndex_011
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_011'
);
let
Stack_ZIndex_012
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_012'
);
let
Stack_ZIndex_01
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_01'
);
let
num
=
await
imageComparisonAssert
(
0
,
0
);
await
CommonFunc
.
sleep
(
1000
);
expect
(
num
)
.
assertEqual
(
true
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_011
.
top
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_012
.
top
);
expect
(
Stack_ZIndex_01
.
left
)
.
assertEqual
(
Stack_ZIndex_011
.
left
);
expect
(
Stack_ZIndex_01
.
left
)
.
assertEqual
(
Stack_ZIndex_012
.
left
);
expect
(
Math
.
round
(
Stack_ZIndex_011
.
bottom
-
Stack_ZIndex_011
.
top
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
bottom
-
Stack_ZIndex_012
.
top
))
.
assertEqual
(
vp2px
(
100
));
expect
(
Math
.
round
(
Stack_ZIndex_011
.
right
-
Stack_ZIndex_011
.
left
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
right
-
Stack_ZIndex_012
.
left
))
.
assertEqual
(
vp2px
(
100
));
console
.
info
(
'[testStackZIndexWithAlignmentTopStart] END'
);
done
();
});
/**
* @tc.number SUB_ACE_STACK_ZINDEX_TEST_0200
* @tc.name testStackZIndexWithAlignmentTop
* @tc.desc The stack component sets alignContent to Alignment.Top and sets the zIndex of
* the first subcomponent
*/
it
(
'testStackZIndexWithAlignmentTop'
,
0
,
async
function
(
done
)
{
console
.
info
(
'[testStackZIndexWithAlignmentTop] START'
);
globalThis
.
value
.
message
.
notify
({
name
:
'addAlignContent'
,
value
:
Alignment
.
Top
});
await
CommonFunc
.
sleep
(
1000
);
let
strJson
=
getInspectorByKey
(
'Stack_ZIndex_01'
);
let
obj
=
JSON
.
parse
(
strJson
);
expect
(
obj
.
$type
)
.
assertEqual
(
'Stack'
);
expect
(
obj
.
$attrs
.
alignContent
)
.
assertEqual
(
'Alignment.Top'
);
let
Stack_ZIndex_011
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_011'
);
let
Stack_ZIndex_012
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_012'
);
let
Stack_ZIndex_01
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_01'
);
let
theLeft
=
Stack_ZIndex_012
.
left
;
let
num
=
await
imageComparisonAssert
(
theLeft
,
0
);
await
CommonFunc
.
sleep
(
1000
);
expect
(
num
)
.
assertEqual
(
true
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_011
.
top
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_012
.
top
);
expect
(
Math
.
round
(
Stack_ZIndex_011
.
left
-
Stack_ZIndex_01
.
left
))
.
assertEqual
(
Math
.
round
(
Stack_ZIndex_01
.
right
-
Stack_ZIndex_011
.
right
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
left
-
Stack_ZIndex_01
.
left
))
.
assertEqual
(
Math
.
round
(
Stack_ZIndex_01
.
right
-
Stack_ZIndex_012
.
right
));
expect
(
Math
.
round
(
Stack_ZIndex_011
.
bottom
-
Stack_ZIndex_011
.
top
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
bottom
-
Stack_ZIndex_012
.
top
))
.
assertEqual
(
vp2px
(
100
));
expect
(
Math
.
round
(
Stack_ZIndex_011
.
right
-
Stack_ZIndex_011
.
left
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
right
-
Stack_ZIndex_012
.
left
))
.
assertEqual
(
vp2px
(
100
));
console
.
info
(
'[testStackZIndexWithAlignmentTop] END'
);
done
();
});
/**
* @tc.number SUB_ACE_STACK_ZINDEX_TEST_0300
* @tc.name testStackZIndexWithAlignmentTopEnd
* @tc.desc The stack component sets alignContent to Alignment.TopEnd and sets the zIndex of
* the first subcomponent
*/
it
(
'testStackZIndexWithAlignmentTopEnd'
,
0
,
async
function
(
done
)
{
console
.
info
(
'[testStackZIndexWithAlignmentTopEnd] START'
);
globalThis
.
value
.
message
.
notify
({
name
:
'addAlignContent'
,
value
:
Alignment
.
TopEnd
});
await
CommonFunc
.
sleep
(
1000
);
let
strJson
=
getInspectorByKey
(
'Stack_ZIndex_01'
);
let
obj
=
JSON
.
parse
(
strJson
);
expect
(
obj
.
$type
)
.
assertEqual
(
'Stack'
);
expect
(
obj
.
$attrs
.
alignContent
)
.
assertEqual
(
'Alignment.TopEnd'
);
let
Stack_ZIndex_011
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_011'
);
let
Stack_ZIndex_012
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_012'
);
let
Stack_ZIndex_01
=
CommonFunc
.
getComponentRect
(
'Stack_ZIndex_01'
);
let
theLeft
=
Stack_ZIndex_012
.
left
;
let
num
=
await
imageComparisonAssert
(
theLeft
,
0
);
await
CommonFunc
.
sleep
(
1000
);
expect
(
num
)
.
assertEqual
(
true
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_011
.
top
);
expect
(
Stack_ZIndex_01
.
top
)
.
assertEqual
(
Stack_ZIndex_012
.
top
);
expect
(
Stack_ZIndex_01
.
right
)
.
assertEqual
(
Stack_ZIndex_011
.
right
);
expect
(
Stack_ZIndex_01
.
right
)
.
assertEqual
(
Stack_ZIndex_012
.
right
);
expect
(
Math
.
round
(
Stack_ZIndex_011
.
bottom
-
Stack_ZIndex_011
.
top
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
bottom
-
Stack_ZIndex_012
.
top
))
.
assertEqual
(
vp2px
(
100
));
expect
(
Math
.
round
(
Stack_ZIndex_011
.
right
-
Stack_ZIndex_011
.
left
))
.
assertEqual
(
vp2px
(
200
));
expect
(
Math
.
round
(
Stack_ZIndex_012
.
right
-
Stack_ZIndex_012
.
left
))
.
assertEqual
(
vp2px
(
100
));
console
.
info
(
'[testStackZIndexWithAlignmentTopEnd] END'
);
done
();
});
/**
* @tc.number SUB_ACE_STACK_ZINDEX_TEST_0400
* @tc.name testStackZIndexWithAlignmentStart
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barMode.test.ets
浏览文件 @
65a49e01
...
...
@@ -17,7 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
WindowMode, PointerMatrix
} from '@ohos.uit
est';
WindowMode, PointerMatrix
, UiDirection, MouseButton } from '@ohos.UiT
est';
export default function Tabs_barMode() {
describe('Tabs_barMode', function () {
beforeEach(async function (done) {
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barPosition.test.ets
浏览文件 @
65a49e01
...
...
@@ -17,7 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
WindowMode, PointerMatrix
} from '@ohos.uit
est';
WindowMode, PointerMatrix
, UiDirection, MouseButton } from '@ohos.UiT
est';
export default function Tabs_barPosition() {
describe('Tabs_barPosition', function () {
beforeEach(async function (done) {
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barWidHei.test.ets
浏览文件 @
65a49e01
...
...
@@ -17,7 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
WindowMode, PointerMatrix
} from '@ohos.uit
est';
WindowMode, PointerMatrix
, UiDirection, MouseButton } from '@ohos.UiT
est';
export default function Tabs_barWidHei() {
describe('Tabs_barWidHei', function () {
beforeEach(async function (done) {
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_scrollable.test.ets
浏览文件 @
65a49e01
...
...
@@ -17,7 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
WindowMode, PointerMatrix
} from '@ohos.uit
est';
WindowMode, PointerMatrix
, UiDirection, MouseButton } from '@ohos.UiT
est';
export default function Tabs_scrollable() {
describe('Tabs_scrollable', function () {
beforeEach(async function (done) {
...
...
arkui/ace_ets_layout_test/entry/src/main/module.json
浏览文件 @
65a49e01
...
...
@@ -29,15 +29,31 @@
"entities"
:
[
"entity.system.home"
]
}],
"metadata"
:[{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"true"
}]
}],
"metadata"
:[{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"true"
}]
"metadata"
:
[{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"true"
}],
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.CAPTURE_SCREEN"
},
{
"name"
:
"ohos.permission.WRITE_MEDIA"
},
{
"name"
:
"ohos.permission.READ_MEDIA"
},
{
"name"
:
"ohos.permission.INTERNET"
},
{
"name"
:
"ohos.permission.MEDIA_LOCATION"
},
{
"name"
:
"ohos.permission.CAMERA"
}
]
}
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/resources/base/profile/main_pages.json
浏览文件 @
65a49e01
此差异已折叠。
点击以展开。
arkui/ace_ets_layout_test/signature/openharmony_sx.p7b
浏览文件 @
65a49e01
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录