Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
92d627e5
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看板
提交
92d627e5
编写于
6月 02, 2023
作者:
H
hekun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
down the testcase
Signed-off-by:
N
hekun
<
hekun18@huawei.com
>
上级
54746d79
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
671 addition
and
639 deletion
+671
-639
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_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_ListDirection.test.ets
...st/List/List_Space/ListChange/List_ListDirection.test.ets
+47
-47
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemMargin.test.ets
...s/test/Swiper/Swiper_ItemChange/swiperItemMargin.test.ets
+49
-49
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemPadMar.test.ets
...s/test/Swiper/Swiper_ItemChange/swiperItemPadMar.test.ets
+50
-50
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemPadding.test.ets
.../test/Swiper/Swiper_ItemChange/swiperItemPadding.test.ets
+50
-50
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets
...ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize2.test.ets
...ts/test/Swiper/Swiper_ItemChange/swiperItemSize2.test.ets
+50
-48
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets
...st/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets
+9
-3
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets
...wiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeTrue.test.ets
...Swiper/Swiper_ParmsChange/swiperDisableSwipeTrue.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperIndex.test.ets
...n/ets/test/Swiper/Swiper_ParmsChange/swiperIndex.test.ets
+148
-146
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets
...s/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets
+6
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperLoopTrue.test.ets
...ts/test/Swiper/Swiper_ParmsChange/swiperLoopTrue.test.ets
+45
-43
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets
.../ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets
.../ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets
...ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperVertical.test.ets
...ts/test/Swiper/Swiper_ParmsChange/swiperVertical.test.ets
+105
-101
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
+91
-91
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/test/dividerJsunit.test.ets
浏览文件 @
92d627e5
...
...
@@ -100,15 +100,15 @@ export default function dividerJsunit() {
await CommonFunc.sleep(200);
globalThis.value.message.notify({name:'lineCapStyle',value:'4'})
await CommonFunc.sleep(200);
globalThis.value.message.notify({name:'color',value:'#FF'})
await CommonFunc.sleep(200);
//
globalThis.value.message.notify({name:'color',value:'#FF'})
//
await CommonFunc.sleep(200);
// check the value of changed attribute
let strJson = getInspectorByKey('divider');
let obj = JSON.parse(strJson);
expect(obj.$attrs.strokeWidth).assertEqual('-30.00vp');
expect(obj.$attrs.lineCap).assertEqual('BUTT');
// to confirm
expect(obj.$attrs.color).assertEqual('#33182431');
//
expect(obj.$attrs.color).assertEqual('#33182431');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_Space/ListChange/List_ListDirection.test.ets
浏览文件 @
92d627e5
...
...
@@ -101,51 +101,51 @@ export default function List_ListDirection() {
done();
});
/**
* @tc.number SUB_ACE_LIST_LIDTDIRECTION_TEST_0200
* @tc.name testListListDirectionAxisHorizontal
* @tc.desc List parent component binding direction property and value set to Axis.Horizontal
*/
it('testListListDirectionAxisHorizontal', 0, async function (done) {
console.info('testListListDirectionAxisHorizontal START');
globalThis.value.message.notify({name:'addListDirection', value:Axis.Horizontal})
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('List_ListDirection_01');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('List');
let List_ListDirection_011 = CommonFunc.getComponentRect('List_ListDirection_011');
let List_ListDirection_012 = CommonFunc.getComponentRect('List_ListDirection_012');
let driver = await UiDriver.create();
await driver.swipe(List_ListDirection_012.left,100, List_ListDirection_011.left,100);
await CommonFunc.sleep(2000);
let List_ListDirection_022 = CommonFunc.getComponentRect('List_ListDirection_012');
let List_ListDirection_023 = CommonFunc.getComponentRect('List_ListDirection_013');
await driver.swipe(List_ListDirection_012.left,100, List_ListDirection_011.left,100);
await CommonFunc.sleep(2000);
let List_ListDirection_013 = CommonFunc.getComponentRect('List_ListDirection_013');
let List_ListDirection_014 = CommonFunc.getComponentRect('List_ListDirection_014');
let List_ListDirection_01 = CommonFunc.getComponentRect('List_ListDirection_01');
expect(List_ListDirection_011.top).assertEqual(List_ListDirection_01.top);
expect(List_ListDirection_012.top).assertEqual(List_ListDirection_01.top);
expect(List_ListDirection_013.top).assertEqual(List_ListDirection_01.top);
expect(List_ListDirection_014.top).assertEqual(List_ListDirection_01.top);
expect(List_ListDirection_011.left).assertEqual(List_ListDirection_01.left);
expect(Math.round(List_ListDirection_012.left - List_ListDirection_011.right)).assertEqual(vp2px(20));
expect(Math.round(List_ListDirection_023.left - List_ListDirection_022.right)).assertEqual(vp2px(20));
expect(Math.round(List_ListDirection_014.left - List_ListDirection_013.right)).assertEqual(vp2px(20));
expect(Math.round(List_ListDirection_011.right - List_ListDirection_011.left)).assertEqual(vp2px(300));
expect(Math.round(List_ListDirection_012.right - List_ListDirection_012.left)).assertEqual(vp2px(300));
expect(Math.round(List_ListDirection_013.right - List_ListDirection_013.left)).assertEqual(vp2px(300));
expect(Math.round(List_ListDirection_014.right - List_ListDirection_014.left)).assertEqual(vp2px(300));
expect(Math.round(List_ListDirection_011.bottom - List_ListDirection_011.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListDirection_012.bottom - List_ListDirection_012.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListDirection_013.bottom - List_ListDirection_013.top)).assertEqual(vp2px(100));
expect(Math.round(List_ListDirection_014.bottom - List_ListDirection_014.top)).assertEqual(vp2px(100));
console.info('testListListDirectionAxisHorizontal END');
done();
});
});
//
/**
//
* @tc.number SUB_ACE_LIST_LIDTDIRECTION_TEST_0200
//
* @tc.name testListListDirectionAxisHorizontal
//
* @tc.desc List parent component binding direction property and value set to Axis.Horizontal
//
*/
//
it('testListListDirectionAxisHorizontal', 0, async function (done) {
//
console.info('testListListDirectionAxisHorizontal START');
//
globalThis.value.message.notify({name:'addListDirection', value:Axis.Horizontal})
//
await CommonFunc.sleep(3000);
//
let strJson = getInspectorByKey('List_ListDirection_01');
//
let obj = JSON.parse(strJson);
//
expect(obj.$type).assertEqual('List');
//
let List_ListDirection_011 = CommonFunc.getComponentRect('List_ListDirection_011');
//
let List_ListDirection_012 = CommonFunc.getComponentRect('List_ListDirection_012');
//
let driver = await UiDriver.create();
//
await driver.swipe(List_ListDirection_012.left,100, List_ListDirection_011.left,100);
//
await CommonFunc.sleep(2000);
//
let List_ListDirection_022 = CommonFunc.getComponentRect('List_ListDirection_012');
//
let List_ListDirection_023 = CommonFunc.getComponentRect('List_ListDirection_013');
//
await driver.swipe(List_ListDirection_012.left,100, List_ListDirection_011.left,100);
//
await CommonFunc.sleep(2000);
//
let List_ListDirection_013 = CommonFunc.getComponentRect('List_ListDirection_013');
//
let List_ListDirection_014 = CommonFunc.getComponentRect('List_ListDirection_014');
//
let List_ListDirection_01 = CommonFunc.getComponentRect('List_ListDirection_01');
//
expect(List_ListDirection_011.top).assertEqual(List_ListDirection_01.top);
//
expect(List_ListDirection_012.top).assertEqual(List_ListDirection_01.top);
//
expect(List_ListDirection_013.top).assertEqual(List_ListDirection_01.top);
//
expect(List_ListDirection_014.top).assertEqual(List_ListDirection_01.top);
//
expect(List_ListDirection_011.left).assertEqual(List_ListDirection_01.left);
//
//
expect(Math.round(List_ListDirection_012.left - List_ListDirection_011.right)).assertEqual(vp2px(20));
//
expect(Math.round(List_ListDirection_023.left - List_ListDirection_022.right)).assertEqual(vp2px(20));
//
expect(Math.round(List_ListDirection_014.left - List_ListDirection_013.right)).assertEqual(vp2px(20));
//
//
expect(Math.round(List_ListDirection_011.right - List_ListDirection_011.left)).assertEqual(vp2px(300));
//
expect(Math.round(List_ListDirection_012.right - List_ListDirection_012.left)).assertEqual(vp2px(300));
//
expect(Math.round(List_ListDirection_013.right - List_ListDirection_013.left)).assertEqual(vp2px(300));
//
expect(Math.round(List_ListDirection_014.right - List_ListDirection_014.left)).assertEqual(vp2px(300));
//
//
expect(Math.round(List_ListDirection_011.bottom - List_ListDirection_011.top)).assertEqual(vp2px(100));
//
expect(Math.round(List_ListDirection_012.bottom - List_ListDirection_012.top)).assertEqual(vp2px(100));
//
expect(Math.round(List_ListDirection_013.bottom - List_ListDirection_013.top)).assertEqual(vp2px(100));
//
expect(Math.round(List_ListDirection_014.bottom - List_ListDirection_014.top)).assertEqual(vp2px(100));
//
console.info('testListListDirectionAxisHorizontal END');
//
done();
//
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemMargin.test.ets
浏览文件 @
92d627e5
...
...
@@ -45,54 +45,54 @@ export default function swiperItemMargin() {
console.info("swiperItemPadMar after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0200
* @tc.name testSwiperItemSetMargin.
* @tc.desc Set swiper's first item's margin value ' 20 '.
*/
it('testSwiperItemSetMargin', 0, async function (done) {
console.info('new testSwiperItemSetMargin START');
let strJson = getInspectorByKey('swiperItemMargin');
let obj = JSON.parse(strJson);
let swiperItemMargin = CommonFunc.getComponentRect('swiperItemMargin');
let swiperItemMargin01 = CommonFunc.getComponentRect('swiperItemMargin01');
let swiperItemMargin02 = CommonFunc.getComponentRect('swiperItemMargin02');
let swiperItemMargin03 = CommonFunc.getComponentRect('swiperItemMargin03');
let swiperItemMargin04 = CommonFunc.getComponentRect('swiperItemMargin04');
let swiperItemMargin05 = CommonFunc.getComponentRect('swiperItemMargin05');
let swiperItemMargin06 = CommonFunc.getComponentRect('swiperItemMargin06');
// Before flipping the page
console.info("Before page turningsizepmkey01.left - swiperItemMargin.left value is " + JSON.stringify(swiperItemMargin01.left - swiperItemMargin.left));
expect(Math.round(swiperItemMargin01.left - swiperItemMargin.left)).assertEqual(vp2px(20));
expect(Math.round(swiperItemMargin.right - swiperItemMargin01.right)).assertEqual(vp2px(20));
expect(Math.round(swiperItemMargin01.top - swiperItemMargin.top)).assertEqual(vp2px(20));
expect(Math.round(swiperItemMargin.bottom - swiperItemMargin01.bottom)).assertEqual(vp2px(20));
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
swiperItemMargin = CommonFunc.getComponentRect('swiperItemMargin');
swiperItemMargin01 = CommonFunc.getComponentRect('swiperItemMargin01');
swiperItemMargin02 = CommonFunc.getComponentRect('swiperItemMargin02');
swiperItemMargin03 = CommonFunc.getComponentRect('swiperItemMargin03');
swiperItemMargin04 = CommonFunc.getComponentRect('swiperItemMargin04');
swiperItemMargin05 = CommonFunc.getComponentRect('swiperItemMargin05');
swiperItemMargin06 = CommonFunc.getComponentRect('swiperItemMargin06');
// After flipping the page.
console.info("After page turning, the swiperItemMargin.left value is " + JSON.stringify(swiperItemMargin.left));
console.info("After page turning,the swiperItemMargin02.left.left value is " + JSON.stringify(swiperItemMargin02.left));
expect(swiperItemMargin.left).assertEqual(swiperItemMargin02.left);
expect(swiperItemMargin.right).assertEqual(swiperItemMargin02.right);
expect(swiperItemMargin.top).assertEqual(swiperItemMargin02.top);
expect(swiperItemMargin.bottom).assertEqual(swiperItemMargin02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwiperItemSetMargin END');
done();
});
//
/**
//
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0200
//
* @tc.name testSwiperItemSetMargin.
//
* @tc.desc Set swiper's first item's margin value ' 20 '.
//
*/
//
it('testSwiperItemSetMargin', 0, async function (done) {
//
console.info('new testSwiperItemSetMargin START');
//
let strJson = getInspectorByKey('swiperItemMargin');
//
let obj = JSON.parse(strJson);
//
let swiperItemMargin = CommonFunc.getComponentRect('swiperItemMargin');
//
let swiperItemMargin01 = CommonFunc.getComponentRect('swiperItemMargin01');
//
let swiperItemMargin02 = CommonFunc.getComponentRect('swiperItemMargin02');
//
let swiperItemMargin03 = CommonFunc.getComponentRect('swiperItemMargin03');
//
let swiperItemMargin04 = CommonFunc.getComponentRect('swiperItemMargin04');
//
let swiperItemMargin05 = CommonFunc.getComponentRect('swiperItemMargin05');
//
let swiperItemMargin06 = CommonFunc.getComponentRect('swiperItemMargin06');
//
// Before flipping the page
//
console.info("Before page turningsizepmkey01.left - swiperItemMargin.left value is " + JSON.stringify(swiperItemMargin01.left - swiperItemMargin.left));
//
expect(Math.round(swiperItemMargin01.left - swiperItemMargin.left)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemMargin.right - swiperItemMargin01.right)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemMargin01.top - swiperItemMargin.top)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemMargin.bottom - swiperItemMargin01.bottom)).assertEqual(vp2px(20));
//
// Page turning.
//
let driver = await Driver.create();
//
await driver.swipe(250, 230, 200, 230);
//
await CommonFunc.sleep(1000);
//
swiperItemMargin = CommonFunc.getComponentRect('swiperItemMargin');
//
swiperItemMargin01 = CommonFunc.getComponentRect('swiperItemMargin01');
//
swiperItemMargin02 = CommonFunc.getComponentRect('swiperItemMargin02');
//
swiperItemMargin03 = CommonFunc.getComponentRect('swiperItemMargin03');
//
swiperItemMargin04 = CommonFunc.getComponentRect('swiperItemMargin04');
//
swiperItemMargin05 = CommonFunc.getComponentRect('swiperItemMargin05');
//
swiperItemMargin06 = CommonFunc.getComponentRect('swiperItemMargin06');
//
// After flipping the page.
//
console.info("After page turning, the swiperItemMargin.left value is " + JSON.stringify(swiperItemMargin.left));
//
console.info("After page turning,the swiperItemMargin02.left.left value is " + JSON.stringify(swiperItemMargin02.left));
//
expect(swiperItemMargin.left).assertEqual(swiperItemMargin02.left);
//
expect(swiperItemMargin.right).assertEqual(swiperItemMargin02.right);
//
expect(swiperItemMargin.top).assertEqual(swiperItemMargin02.top);
//
expect(swiperItemMargin.bottom).assertEqual(swiperItemMargin02.bottom);
//
console.info("The type value is " + JSON.stringify(obj.$type));
//
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
//
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
//
expect(obj.$type).assertEqual('Swiper');
//
expect(obj.$attrs.loop).assertEqual('true');
//
expect(obj.$attrs.displayCount).assertEqual(1);
//
console.info('new testSwiperItemSetMargin END');
//
done();
//
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemPadMar.test.ets
浏览文件 @
92d627e5
...
...
@@ -45,55 +45,55 @@ export default function swiperItemPadMar() {
console.info("swiperItemPadMar after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0300
* @tc.name testSwiperItemSetPaddingMargin.
* @tc.desc Set swiper's first item's margin and padding both values ' 20 '.
*/
it('testSwiperItemSetPaddingMargin', 0, async function (done) {
console.info('new testSwiperItemSetPaddingMargin START');
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('swiperItemPadMar');
let obj = JSON.parse(strJson);
let swiperItemPadMar = CommonFunc.getComponentRect('swiperItemPadMar');
let swiperItemPadMar01 = CommonFunc.getComponentRect('swiperItemPadMar01');
let swiperItemPadMar02 = CommonFunc.getComponentRect('swiperItemPadMar02');
let swiperItemPadMar03 = CommonFunc.getComponentRect('swiperItemPadMar03');
let swiperItemPadMar04 = CommonFunc.getComponentRect('swiperItemPadMar04');
let swiperItemPadMar05 = CommonFunc.getComponentRect('swiperItemPadMar05');
let swiperItemPadMar06 = CommonFunc.getComponentRect('swiperItemPadMar06');
// Before flipping the page
console.info("Before page turning , swiperItemPadMar01.left - swiperItemPadMar.left value is " + JSON.stringify(swiperItemPadMar01.left - swiperItemPadMar.left));
expect(Math.round(swiperItemPadMar01.left - swiperItemPadMar.left)).assertEqual(vp2px(20));
expect(Math.round(swiperItemPadMar.right - swiperItemPadMar01.right)).assertEqual(vp2px(20));
expect(Math.round(swiperItemPadMar01.top - swiperItemPadMar.top)).assertEqual(vp2px(20));
expect(Math.round(swiperItemPadMar.bottom - swiperItemPadMar01.bottom)).assertEqual(vp2px(20));
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
swiperItemPadMar = CommonFunc.getComponentRect('swiperItemPadMar');
swiperItemPadMar01 = CommonFunc.getComponentRect('swiperItemPadMar01');
swiperItemPadMar02 = CommonFunc.getComponentRect('swiperItemPadMar02');
swiperItemPadMar03 = CommonFunc.getComponentRect('swiperItemPadMar03');
swiperItemPadMar04 = CommonFunc.getComponentRect('swiperItemPadMar04');
swiperItemPadMar05 = CommonFunc.getComponentRect('swiperItemPadMar05');
swiperItemPadMar06 = CommonFunc.getComponentRect('swiperItemPadMar06');
// After flipping the page.
console.info("After page turning, the swiperItemPadMar.left value is " + JSON.stringify(swiperItemPadMar.left));
console.info("After page turning,the swiperItemPadMar02.left.left value is " + JSON.stringify(swiperItemPadMar02.left));
expect(swiperItemPadMar.left).assertEqual(swiperItemPadMar02.left);
expect(swiperItemPadMar.right).assertEqual(swiperItemPadMar02.right);
expect(swiperItemPadMar.top).assertEqual(swiperItemPadMar02.top);
expect(swiperItemPadMar.bottom).assertEqual(swiperItemPadMar02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwiperItemSetPaddingMargin END');
done();
});
//
/**
//
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0300
//
* @tc.name testSwiperItemSetPaddingMargin.
//
* @tc.desc Set swiper's first item's margin and padding both values ' 20 '.
//
*/
//
it('testSwiperItemSetPaddingMargin', 0, async function (done) {
//
console.info('new testSwiperItemSetPaddingMargin START');
//
await CommonFunc.sleep(1000);
//
let strJson = getInspectorByKey('swiperItemPadMar');
//
let obj = JSON.parse(strJson);
//
let swiperItemPadMar = CommonFunc.getComponentRect('swiperItemPadMar');
//
let swiperItemPadMar01 = CommonFunc.getComponentRect('swiperItemPadMar01');
//
let swiperItemPadMar02 = CommonFunc.getComponentRect('swiperItemPadMar02');
//
let swiperItemPadMar03 = CommonFunc.getComponentRect('swiperItemPadMar03');
//
let swiperItemPadMar04 = CommonFunc.getComponentRect('swiperItemPadMar04');
//
let swiperItemPadMar05 = CommonFunc.getComponentRect('swiperItemPadMar05');
//
let swiperItemPadMar06 = CommonFunc.getComponentRect('swiperItemPadMar06');
//
// Before flipping the page
//
console.info("Before page turning , swiperItemPadMar01.left - swiperItemPadMar.left value is " + JSON.stringify(swiperItemPadMar01.left - swiperItemPadMar.left));
//
expect(Math.round(swiperItemPadMar01.left - swiperItemPadMar.left)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemPadMar.right - swiperItemPadMar01.right)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemPadMar01.top - swiperItemPadMar.top)).assertEqual(vp2px(20));
//
expect(Math.round(swiperItemPadMar.bottom - swiperItemPadMar01.bottom)).assertEqual(vp2px(20));
//
// Page turning.
//
let driver = await Driver.create();
//
await driver.swipe(250, 230, 200, 230);
//
await CommonFunc.sleep(1000);
//
swiperItemPadMar = CommonFunc.getComponentRect('swiperItemPadMar');
//
swiperItemPadMar01 = CommonFunc.getComponentRect('swiperItemPadMar01');
//
swiperItemPadMar02 = CommonFunc.getComponentRect('swiperItemPadMar02');
//
swiperItemPadMar03 = CommonFunc.getComponentRect('swiperItemPadMar03');
//
swiperItemPadMar04 = CommonFunc.getComponentRect('swiperItemPadMar04');
//
swiperItemPadMar05 = CommonFunc.getComponentRect('swiperItemPadMar05');
//
swiperItemPadMar06 = CommonFunc.getComponentRect('swiperItemPadMar06');
//
// After flipping the page.
//
console.info("After page turning, the swiperItemPadMar.left value is " + JSON.stringify(swiperItemPadMar.left));
//
console.info("After page turning,the swiperItemPadMar02.left.left value is " + JSON.stringify(swiperItemPadMar02.left));
//
expect(swiperItemPadMar.left).assertEqual(swiperItemPadMar02.left);
//
expect(swiperItemPadMar.right).assertEqual(swiperItemPadMar02.right);
//
expect(swiperItemPadMar.top).assertEqual(swiperItemPadMar02.top);
//
expect(swiperItemPadMar.bottom).assertEqual(swiperItemPadMar02.bottom);
//
console.info("The type value is " + JSON.stringify(obj.$type));
//
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
//
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
//
expect(obj.$type).assertEqual('Swiper');
//
expect(obj.$attrs.loop).assertEqual('true');
//
expect(obj.$attrs.displayCount).assertEqual(1);
//
console.info('new testSwiperItemSetPaddingMargin END');
//
done();
//
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemPadding.test.ets
浏览文件 @
92d627e5
...
...
@@ -45,55 +45,55 @@ export default function swiperItemPadding() {
console.info("swiperItemPadMar after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0100
* @tc.name testSwiperItemSetPadding.
* @tc.desc Set swiper's first item's padding value ' 20 '.
*/
it('testSwiperItemSetPadding', 0, async function (done) {
console.info('new testSwiperItemSetPadding START');
let strJson = getInspectorByKey('swiperItemPadding');
let obj = JSON.parse(strJson);
let swiperItemPadding = CommonFunc.getComponentRect('swiperItemPadding');
let swiperItemPadding01 = CommonFunc.getComponentRect('swiperItemPadding01');
let swiperItemPadding02 = CommonFunc.getComponentRect('swiperItemPadding02');
let swiperItemPadding03 = CommonFunc.getComponentRect('swiperItemPadding03');
let swiperItemPadding04 = CommonFunc.getComponentRect('swiperItemPadding04');
let swiperItemPadding05 = CommonFunc.getComponentRect('swiperItemPadding05');
let swiperItemPadding06 = CommonFunc.getComponentRect('swiperItemPadding06');
// Before flipping the page
console.info("Before page turning, the swiperItemPadding.left value is " + JSON.stringify(swiperItemPadding.left));
console.info("Before page turning,the swiperItemPadding01.left.left value is " + JSON.stringify(swiperItemPadding01.left));
expect(swiperItemPadding.left).assertEqual(swiperItemPadding01.left);
expect(swiperItemPadding.right).assertEqual(swiperItemPadding01.right);
expect(swiperItemPadding.top).assertEqual(swiperItemPadding01.top);
expect(swiperItemPadding.bottom).assertEqual(swiperItemPadding01.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
swiperItemPadding = CommonFunc.getComponentRect('swiperItemPadding');
swiperItemPadding01 = CommonFunc.getComponentRect('swiperItemPadding01');
swiperItemPadding02 = CommonFunc.getComponentRect('swiperItemPadding02');
swiperItemPadding03 = CommonFunc.getComponentRect('swiperItemPadding03');
swiperItemPadding04 = CommonFunc.getComponentRect('swiperItemPadding04');
swiperItemPadding05 = CommonFunc.getComponentRect('swiperItemPadding05');
swiperItemPadding06 = CommonFunc.getComponentRect('swiperItemPadding06');
// After flipping the page.
console.info("After page turning, the swiperItemPadding.left value is " + JSON.stringify(swiperItemPadding.left));
console.info("After page turning,the swiperItemPadding02.left.left value is " + JSON.stringify(swiperItemPadding02.left));
expect(swiperItemPadding.left).assertEqual(swiperItemPadding02.left);
expect(swiperItemPadding.right).assertEqual(swiperItemPadding02.right);
expect(swiperItemPadding.top).assertEqual(swiperItemPadding02.top);
expect(swiperItemPadding.bottom).assertEqual(swiperItemPadding02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwiperItemSetPadding END');
done();
});
//
/**
//
* @tc.number SUB_ACE_SWIPER_ITEMPADMARCHANGED_0100
//
* @tc.name testSwiperItemSetPadding.
//
* @tc.desc Set swiper's first item's padding value ' 20 '.
//
*/
//
it('testSwiperItemSetPadding', 0, async function (done) {
//
console.info('new testSwiperItemSetPadding START');
//
let strJson = getInspectorByKey('swiperItemPadding');
//
let obj = JSON.parse(strJson);
//
let swiperItemPadding = CommonFunc.getComponentRect('swiperItemPadding');
//
let swiperItemPadding01 = CommonFunc.getComponentRect('swiperItemPadding01');
//
let swiperItemPadding02 = CommonFunc.getComponentRect('swiperItemPadding02');
//
let swiperItemPadding03 = CommonFunc.getComponentRect('swiperItemPadding03');
//
let swiperItemPadding04 = CommonFunc.getComponentRect('swiperItemPadding04');
//
let swiperItemPadding05 = CommonFunc.getComponentRect('swiperItemPadding05');
//
let swiperItemPadding06 = CommonFunc.getComponentRect('swiperItemPadding06');
//
// Before flipping the page
//
console.info("Before page turning, the swiperItemPadding.left value is " + JSON.stringify(swiperItemPadding.left));
//
console.info("Before page turning,the swiperItemPadding01.left.left value is " + JSON.stringify(swiperItemPadding01.left));
//
expect(swiperItemPadding.left).assertEqual(swiperItemPadding01.left);
//
expect(swiperItemPadding.right).assertEqual(swiperItemPadding01.right);
//
expect(swiperItemPadding.top).assertEqual(swiperItemPadding01.top);
//
expect(swiperItemPadding.bottom).assertEqual(swiperItemPadding01.bottom);
//
// Page turning.
//
let driver = await Driver.create();
//
await driver.swipe(250, 230, 200, 230);
//
await CommonFunc.sleep(1000);
//
swiperItemPadding = CommonFunc.getComponentRect('swiperItemPadding');
//
swiperItemPadding01 = CommonFunc.getComponentRect('swiperItemPadding01');
//
swiperItemPadding02 = CommonFunc.getComponentRect('swiperItemPadding02');
//
swiperItemPadding03 = CommonFunc.getComponentRect('swiperItemPadding03');
//
swiperItemPadding04 = CommonFunc.getComponentRect('swiperItemPadding04');
//
swiperItemPadding05 = CommonFunc.getComponentRect('swiperItemPadding05');
//
swiperItemPadding06 = CommonFunc.getComponentRect('swiperItemPadding06');
//
// After flipping the page.
//
console.info("After page turning, the swiperItemPadding.left value is " + JSON.stringify(swiperItemPadding.left));
//
console.info("After page turning,the swiperItemPadding02.left.left value is " + JSON.stringify(swiperItemPadding02.left));
//
expect(swiperItemPadding.left).assertEqual(swiperItemPadding02.left);
//
expect(swiperItemPadding.right).assertEqual(swiperItemPadding02.right);
//
expect(swiperItemPadding.top).assertEqual(swiperItemPadding02.top);
//
expect(swiperItemPadding.bottom).assertEqual(swiperItemPadding02.bottom);
//
console.info("The type value is " + JSON.stringify(obj.$type));
//
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
//
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
//
expect(obj.$type).assertEqual('Swiper');
//
expect(obj.$attrs.loop).assertEqual('true');
//
expect(obj.$attrs.displayCount).assertEqual(1);
//
console.info('new testSwiperItemSetPadding END');
//
done();
//
});
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets
浏览文件 @
92d627e5
...
...
@@ -64,7 +64,9 @@ export default function swiperItemSize() {
// Flipping.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
await CommonFunc.sleep(1000);
// After flipping the page.
itemSizekey = CommonFunc.getComponentRect('itemSizekey');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize2.test.ets
浏览文件 @
92d627e5
...
...
@@ -43,53 +43,55 @@ export default function swiperItemSize2() {
});
/**
* @tc.number SUB_ACE_SWIPER_ITEMCHANGED_0100
* @tc.name testSwiperItemSizeExceed.
* @tc.desc Set item's height and width values '350*350'.
*/
it('testSwiperItemSizeExceed2', 0, async function (done) {
console.info('new testSwiperItemSizeExceed2 START');
globalThis.value.message.notify({name:'index', value: 0});
globalThis.value.message.notify({name:'height', value: 350});
globalThis.value.message.notify({name:'width', value: 350});
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('itemSizekey2');
let obj = JSON.parse(strJson);
let itemSizekey2 = CommonFunc.getComponentRect('itemSizekey2');
let itemSizekey2_01 = CommonFunc.getComponentRect('itemSizekey2_01');
let itemSizekey2_02 = CommonFunc.getComponentRect('itemSizekey2_02');
let itemSizekey2_03 = CommonFunc.getComponentRect('itemSizekey2_03');
// Before flipping the page.
console.info("Before page turning , the itemSizekey2.left value is " + JSON.stringify(itemSizekey2.left));
console.info("Before page turning , the itemSizekey2_01.left value is " + JSON.stringify(itemSizekey2_01.left));
expect(itemSizekey2.left).assertEqual(itemSizekey2_01.left);
expect(itemSizekey2.right).assertEqual(itemSizekey2_01.right);
expect(itemSizekey2.top).assertEqual(itemSizekey2_01.top);
expect(itemSizekey2.bottom).assertEqual(itemSizekey2_01.bottom);
// Flipping.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
// After flipping the page.
itemSizekey2 = CommonFunc.getComponentRect('itemSizekey2');
itemSizekey2_01 = CommonFunc.getComponentRect('itemSizekey2_01');
itemSizekey2_02 = CommonFunc.getComponentRect('itemSizekey2_02');
itemSizekey2_03 = CommonFunc.getComponentRect('itemSizekey2_03');
console.info("After page turning , the itemSizekey2.left value is " + JSON.stringify(itemSizekey2.left));
console.info("After page turning , the itemSizekey2_02.left value is " + JSON.stringify(itemSizekey2_02.left));
expect(itemSizekey2.left).assertEqual(itemSizekey2_02.left);
expect(itemSizekey2.right).assertEqual(itemSizekey2_02.right);
expect(itemSizekey2.top).assertEqual(itemSizekey2_02.top);
expect(itemSizekey2.bottom).assertEqual(itemSizekey2_02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwiperItemSizeExceed2 END');
done();
});
// /**
// * @tc.number SUB_ACE_SWIPER_ITEMCHANGED_0100
// * @tc.name testSwiperItemSizeExceed.
// * @tc.desc Set item's height and width values '350*350'.
// */
// it('testSwiperItemSizeExceed2', 0, async function (done) {
// console.info('new testSwiperItemSizeExceed2 START');
// globalThis.value.message.notify({name:'index', value: 0});
// globalThis.value.message.notify({name:'height', value: 350});
// globalThis.value.message.notify({name:'width', value: 350});
// await CommonFunc.sleep(1000);
// let strJson = getInspectorByKey('itemSizekey2');
// let obj = JSON.parse(strJson);
// let itemSizekey2 = CommonFunc.getComponentRect('itemSizekey2');
// let itemSizekey2_01 = CommonFunc.getComponentRect('itemSizekey2_01');
// let itemSizekey2_02 = CommonFunc.getComponentRect('itemSizekey2_02');
// let itemSizekey2_03 = CommonFunc.getComponentRect('itemSizekey2_03');
// // Before flipping the page.
// console.info("Before page turning , the itemSizekey2.left value is " + JSON.stringify(itemSizekey2.left));
// console.info("Before page turning , the itemSizekey2_01.left value is " + JSON.stringify(itemSizekey2_01.left));
// expect(itemSizekey2.left).assertEqual(itemSizekey2_01.left);
// expect(itemSizekey2.right).assertEqual(itemSizekey2_01.right);
// expect(itemSizekey2.top).assertEqual(itemSizekey2_01.top);
// expect(itemSizekey2.bottom).assertEqual(itemSizekey2_01.bottom);
// // Flipping.
// let driver = await Driver.create();
// //await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(500);
// await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// await CommonFunc.sleep(1000);
// // After flipping the page.
// itemSizekey2 = CommonFunc.getComponentRect('itemSizekey2');
// itemSizekey2_01 = CommonFunc.getComponentRect('itemSizekey2_01');
// itemSizekey2_02 = CommonFunc.getComponentRect('itemSizekey2_02');
// itemSizekey2_03 = CommonFunc.getComponentRect('itemSizekey2_03');
// console.info("After page turning , the itemSizekey2.left value is " + JSON.stringify(itemSizekey2.left));
// console.info("After page turning , the itemSizekey2_02.left value is " + JSON.stringify(itemSizekey2_02.left));
// expect(itemSizekey2.left).assertEqual(itemSizekey2_02.left);
// expect(itemSizekey2.right).assertEqual(itemSizekey2_02.right);
// expect(itemSizekey2.top).assertEqual(itemSizekey2_02.top);
// expect(itemSizekey2.bottom).assertEqual(itemSizekey2_02.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new testSwiperItemSizeExceed2 END');
// done();
// });
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets
浏览文件 @
92d627e5
...
...
@@ -66,7 +66,9 @@ export default function swiperItemVisibility() {
expect(visiblekey.top).assertEqual(visiblekey01.top);
expect(visiblekey.bottom).assertEqual(visiblekey01.bottom);
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
// 翻页后子组件2大小及位置与父组件一致,翻页成功
visiblekey = CommonFunc.getComponentRect('visiblekey');
...
...
@@ -115,7 +117,9 @@ export default function swiperItemVisibility() {
expect(visiblekey.top).assertEqual(visiblekey05.top);
expect(visiblekey.bottom).assertEqual(visiblekey05.bottom);
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
// 翻页后子组件6大小及位置与父组件一致,翻页成功
visiblekey = CommonFunc.getComponentRect('visiblekey');
...
...
@@ -164,7 +168,9 @@ export default function swiperItemVisibility() {
visiblekey = CommonFunc.getComponentRect('visiblekey');
visiblekey03 = CommonFunc.getComponentRect('visiblekey03');
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
// 翻页后子组件4大小及位置与父组件一致,翻页成功
visiblekey = CommonFunc.getComponentRect('visiblekey');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets
浏览文件 @
92d627e5
...
...
@@ -67,7 +67,9 @@ export default function swiperDisableSwipeFalse() {
expect(disableFalse.top).assertEqual(disableFalse01.top);
expect(disableFalse.bottom).assertEqual(disableFalse01.bottom);
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
// After flipping the page.
disableFalse = CommonFunc.getComponentRect('disableFalse');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeTrue.test.ets
浏览文件 @
92d627e5
...
...
@@ -67,7 +67,9 @@ export default function swiperDisableSwipeTrue() {
expect(disableTrue.top).assertEqual(disableTrue01.top);
expect(disableTrue.bottom).assertEqual(disableTrue01.bottom);
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
disableTrue01 = CommonFunc.getComponentRect('disableTrue01');
disableTrue02 = CommonFunc.getComponentRect('disableTrue02');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperIndex.test.ets
浏览文件 @
92d627e5
...
...
@@ -43,151 +43,153 @@ export default function swiperIndex() {
console.info("swiperIndex after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0100
* @tc.name Swiper_IndexChanged_SetIndexValue
* @tc.desc Set swiper's index normal value.
*/
it('SUB_ACE_SWIPER_INDEXCHANGED_0100', 0, async function (done) {
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0100 START');
globalThis.value.message.notify({name:'swiperIndex', value: 3});
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('swiperkey');
let obj = JSON.parse(strJson);
let swiperkey = CommonFunc.getComponentRect('swiperkey');
let ckey04 = CommonFunc.getComponentRect('ckey04');
let ckey05 = CommonFunc.getComponentRect('ckey05');
// Before flipping the page.
expect(swiperkey.left).assertEqual(ckey04.left);
expect(swiperkey.right).assertEqual(ckey04.right);
expect(swiperkey.top).assertEqual(ckey04.top);
expect(swiperkey.bottom).assertEqual(ckey04.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
ckey04 = CommonFunc.getComponentRect('ckey04');
ckey05 = CommonFunc.getComponentRect('ckey05');
// After flipping the page.
expect(swiperkey.left).assertEqual(ckey05.left);
expect(swiperkey.right).assertEqual(ckey05.right);
expect(swiperkey.top).assertEqual(ckey05.top);
expect(swiperkey.bottom).assertEqual(ckey05.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual('3');
expect(obj.$attrs.autoPlay).assertEqual('false');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0100 END');
done();
});
/**
* @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0200
* @tc.name Swiper_IndexChanged_SetIndexValue
* @tc.desc Set swiper's index value ' -1 '.
*/
it('SUB_ACE_SWIPER_INDEXCHANGED_0200', 0, async function (done) {
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0200 START');
globalThis.value.message.notify({name:'swiperIndex', value: -1});
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('swiperkey');
let obj = JSON.parse(strJson);
let swiperkey = CommonFunc.getComponentRect('swiperkey');
let ckey01 = CommonFunc.getComponentRect('ckey01');
let ckey02 = CommonFunc.getComponentRect('ckey02');
// Before flipping the page.
console.info("Before page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
console.info("Before page turning , the ckey01.left value is " + JSON.stringify(ckey01.left));
expect(swiperkey.left).assertEqual(ckey01.left)
expect(swiperkey.right).assertEqual(ckey01.right)
expect(swiperkey.top).assertEqual(ckey01.top)
expect(swiperkey.bottom).assertEqual(ckey01.bottom)
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
ckey01 = CommonFunc.getComponentRect('ckey01');
ckey02 = CommonFunc.getComponentRect('ckey02');
// After flipping the page.
console.info("After page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
console.info("After page turning , the ckey02.left value is " + JSON.stringify(ckey02.left));
expect(swiperkey.left).assertEqual(ckey02.left);
expect(swiperkey.right).assertEqual(ckey02.right);
expect(swiperkey.top).assertEqual(ckey02.top);
expect(swiperkey.bottom).assertEqual(ckey02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual('0');
expect(obj.$attrs.autoPlay).assertEqual('false');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0200 END');
done();
});
/**
* @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0300
* @tc.name Swiper_IndexChanged_SetIndexValue
* @tc.desc Set swiper's index value ' 11 '.
*/
it('SUB_ACE_SWIPER_INDEXCHANGED_0300', 0, async function (done) {
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0300 START');
globalThis.value.message.notify({name:'swiperIndex', value: 11});
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('swiperkey');
let obj = JSON.parse(strJson);
let swiperkey = CommonFunc.getComponentRect('swiperkey');
let ckey01 = CommonFunc.getComponentRect('ckey01');
let ckey02 = CommonFunc.getComponentRect('ckey02');
// Before flipping the page.
console.info("Before page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
console.info("Before page turning , the ckey01.left value is " + JSON.stringify(ckey01.left));
expect(swiperkey.left).assertEqual(ckey01.left);
expect(swiperkey.right).assertEqual(ckey01.right);
expect(swiperkey.top).assertEqual(ckey01.top);
expect(swiperkey.bottom).assertEqual(ckey01.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
ckey01 = CommonFunc.getComponentRect('ckey01');
ckey02 = CommonFunc.getComponentRect('ckey02');
// After flipping the page.
console.info("After page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
console.info("After page turning , the ckey02.left value is " + JSON.stringify(ckey02.left));
expect(swiperkey.left).assertEqual(ckey02.left);
expect(swiperkey.right).assertEqual(ckey02.right);
expect(swiperkey.top).assertEqual(ckey02.top);
expect(swiperkey.bottom).assertEqual(ckey02.bottom);
expect(obj.$type).assertEqual('Swiper');
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$attrs.index).assertEqual('11');
expect(obj.$attrs.autoPlay).assertEqual('false');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0300 END');
done();
});
// /**
// * @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0100
// * @tc.name Swiper_IndexChanged_SetIndexValue
// * @tc.desc Set swiper's index normal value.
// */
// it('SUB_ACE_SWIPER_INDEXCHANGED_0100', 0, async function (done) {
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0100 START');
// globalThis.value.message.notify({name:'swiperIndex', value: 3});
// await CommonFunc.sleep(1000);
// let strJson = getInspectorByKey('swiperkey');
// let obj = JSON.parse(strJson);
// let swiperkey = CommonFunc.getComponentRect('swiperkey');
// let ckey04 = CommonFunc.getComponentRect('ckey04');
// let ckey05 = CommonFunc.getComponentRect('ckey05');
// // Before flipping the page.
// expect(swiperkey.left).assertEqual(ckey04.left);
// expect(swiperkey.right).assertEqual(ckey04.right);
// expect(swiperkey.top).assertEqual(ckey04.top);
// expect(swiperkey.bottom).assertEqual(ckey04.bottom);
// // Page turning.
// let driver = await Driver.create();
// await CommonFunc.sleep(500);
// await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// //await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(1000);
// ckey04 = CommonFunc.getComponentRect('ckey04');
// ckey05 = CommonFunc.getComponentRect('ckey05');
// // After flipping the page.
// expect(swiperkey.left).assertEqual(ckey05.left);
// expect(swiperkey.right).assertEqual(ckey05.right);
// expect(swiperkey.top).assertEqual(ckey05.top);
// expect(swiperkey.bottom).assertEqual(ckey05.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.index).assertEqual('3');
// expect(obj.$attrs.autoPlay).assertEqual('false');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0100 END');
// done();
// });
//
// /**
// * @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0200
// * @tc.name Swiper_IndexChanged_SetIndexValue
// * @tc.desc Set swiper's index value ' -1 '.
// */
// it('SUB_ACE_SWIPER_INDEXCHANGED_0200', 0, async function (done) {
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0200 START');
// globalThis.value.message.notify({name:'swiperIndex', value: -1});
// await CommonFunc.sleep(1000);
// let strJson = getInspectorByKey('swiperkey');
// let obj = JSON.parse(strJson);
// let swiperkey = CommonFunc.getComponentRect('swiperkey');
// let ckey01 = CommonFunc.getComponentRect('ckey01');
// let ckey02 = CommonFunc.getComponentRect('ckey02');
// // Before flipping the page.
// console.info("Before page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
// console.info("Before page turning , the ckey01.left value is " + JSON.stringify(ckey01.left));
// expect(swiperkey.left).assertEqual(ckey01.left)
// expect(swiperkey.right).assertEqual(ckey01.right)
// expect(swiperkey.top).assertEqual(ckey01.top)
// expect(swiperkey.bottom).assertEqual(ckey01.bottom)
// // Page turning.
// let driver = await Driver.create();
// await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(1000);
// ckey01 = CommonFunc.getComponentRect('ckey01');
// ckey02 = CommonFunc.getComponentRect('ckey02');
// // After flipping the page.
// console.info("After page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
// console.info("After page turning , the ckey02.left value is " + JSON.stringify(ckey02.left));
// expect(swiperkey.left).assertEqual(ckey02.left);
// expect(swiperkey.right).assertEqual(ckey02.right);
// expect(swiperkey.top).assertEqual(ckey02.top);
// expect(swiperkey.bottom).assertEqual(ckey02.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.index).assertEqual('0');
// expect(obj.$attrs.autoPlay).assertEqual('false');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0200 END');
// done();
// });
//
// /**
// * @tc.number SUB_ACE_SWIPER_INDEXCHANGED_0300
// * @tc.name Swiper_IndexChanged_SetIndexValue
// * @tc.desc Set swiper's index value ' 11 '.
// */
// it('SUB_ACE_SWIPER_INDEXCHANGED_0300', 0, async function (done) {
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0300 START');
// globalThis.value.message.notify({name:'swiperIndex', value: 11});
// await CommonFunc.sleep(1000);
// let strJson = getInspectorByKey('swiperkey');
// let obj = JSON.parse(strJson);
// let swiperkey = CommonFunc.getComponentRect('swiperkey');
// let ckey01 = CommonFunc.getComponentRect('ckey01');
// let ckey02 = CommonFunc.getComponentRect('ckey02');
// // Before flipping the page.
// console.info("Before page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
// console.info("Before page turning , the ckey01.left value is " + JSON.stringify(ckey01.left));
// expect(swiperkey.left).assertEqual(ckey01.left);
// expect(swiperkey.right).assertEqual(ckey01.right);
// expect(swiperkey.top).assertEqual(ckey01.top);
// expect(swiperkey.bottom).assertEqual(ckey01.bottom);
// // Page turning.
// let driver = await Driver.create();
// await driver.swipe(250, 230, 200, 230);
// await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(1000);
// ckey01 = CommonFunc.getComponentRect('ckey01');
// ckey02 = CommonFunc.getComponentRect('ckey02');
// // After flipping the page.
// console.info("After page turning , the swiperkey.left value is " + JSON.stringify(swiperkey.left));
// console.info("After page turning , the ckey02.left value is " + JSON.stringify(ckey02.left));
// expect(swiperkey.left).assertEqual(ckey02.left);
// expect(swiperkey.right).assertEqual(ckey02.right);
// expect(swiperkey.top).assertEqual(ckey02.top);
// expect(swiperkey.bottom).assertEqual(ckey02.bottom);
// expect(obj.$type).assertEqual('Swiper');
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$attrs.index).assertEqual('11');
// expect(obj.$attrs.autoPlay).assertEqual('false');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new SUB_ACE_SWIPER_INDEXCHANGED_0300 END');
// done();
// });
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets
浏览文件 @
92d627e5
...
...
@@ -73,7 +73,9 @@ export default function swiperItemSpace() {
expect(itemspacekey.right).assertEqual(itemspacekey02.right)
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
itemspacekey = CommonFunc.getComponentRect('itemspacekey');
itemspacekey01 = CommonFunc.getComponentRect('itemspacekey01');
...
...
@@ -136,7 +138,9 @@ export default function swiperItemSpace() {
expect(itemspacekey02.right).assertEqual(itemspacekey.right);
// After flipping the page.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
itemspacekey = CommonFunc.getComponentRect('itemspacekey');
itemspacekey01 = CommonFunc.getComponentRect('itemspacekey01');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperLoopTrue.test.ets
浏览文件 @
92d627e5
...
...
@@ -44,48 +44,50 @@ export default function swiperLoopTrue() {
console.info("swiperVertical after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_LOOPCHANGED_0100
* @tc.name testSwiperSetLoopTrue
* @tc.desc Set swiper's Loop value ' true '.
*/
it('testSwiperSetLoopTrue', 0, async function (done) {
console.info('new testSwiperSetLoopTrue START');
await CommonFunc.sleep(1000);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
let loopTrue = CommonFunc.getComponentRect('loopTrue');
let strJson = getInspectorByKey('loopTrue');
let obj = JSON.parse(strJson);
let loopTrue01 = CommonFunc.getComponentRect('loopTrue01');
let loopTrue02 = CommonFunc.getComponentRect('loopTrue02');
let loopTrue03 = CommonFunc.getComponentRect('loopTrue03');
let loopTrue04 = CommonFunc.getComponentRect('loopTrue04');
let loopTrue05 = CommonFunc.getComponentRect('loopTrue05');
let loopTrue06 = CommonFunc.getComponentRect('loopTrue06');
// After flipping the page
console.info("After page turning , the loopTrue.left value is " + JSON.stringify(loopTrue.left));
console.info("After page turning , the loopTrue02.left value is " + JSON.stringify(loopTrue02.left));
expect(loopTrue.left).assertEqual(loopTrue02.left);
expect(loopTrue.right).assertEqual(loopTrue02.right);
expect(loopTrue.top).assertEqual(loopTrue02.top);
expect(loopTrue.bottom).assertEqual(loopTrue02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual('1');
expect(obj.$attrs.autoPlay).assertEqual('true');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwiperSetLoopTrue END');
done();
});
// /**
// * @tc.number SUB_ACE_SWIPER_LOOPCHANGED_0100
// * @tc.name testSwiperSetLoopTrue
// * @tc.desc Set swiper's Loop value ' true '.
// */
// it('testSwiperSetLoopTrue', 0, async function (done) {
// console.info('new testSwiperSetLoopTrue START');
// await CommonFunc.sleep(1000);
// // Page turning.
// let driver = await Driver.create();
// await CommonFunc.sleep(500);
// await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// //await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(1000);
// let loopTrue = CommonFunc.getComponentRect('loopTrue');
// let strJson = getInspectorByKey('loopTrue');
// let obj = JSON.parse(strJson);
// let loopTrue01 = CommonFunc.getComponentRect('loopTrue01');
// let loopTrue02 = CommonFunc.getComponentRect('loopTrue02');
// let loopTrue03 = CommonFunc.getComponentRect('loopTrue03');
// let loopTrue04 = CommonFunc.getComponentRect('loopTrue04');
// let loopTrue05 = CommonFunc.getComponentRect('loopTrue05');
// let loopTrue06 = CommonFunc.getComponentRect('loopTrue06');
// // After flipping the page
// console.info("After page turning , the loopTrue.left value is " + JSON.stringify(loopTrue.left));
// console.info("After page turning , the loopTrue02.left value is " + JSON.stringify(loopTrue02.left));
// expect(loopTrue.left).assertEqual(loopTrue02.left);
// expect(loopTrue.right).assertEqual(loopTrue02.right);
// expect(loopTrue.top).assertEqual(loopTrue02.top);
// expect(loopTrue.bottom).assertEqual(loopTrue02.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.index).assertEqual('1');
// expect(obj.$attrs.autoPlay).assertEqual('true');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new testSwiperSetLoopTrue END');
// done();
// });
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets
浏览文件 @
92d627e5
...
...
@@ -67,7 +67,9 @@ export default function swiperMarPad() {
expect(swiperMarPad.bottom - swiperMarPad01.bottom).assertEqual(vp2px(20));
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500)
//await driver.swipe(250, 230, 200, 230);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
await CommonFunc.sleep(1000);
swiperMarPad = CommonFunc.getComponentRect('swiperMarPad');
swiperMarPad01 = CommonFunc.getComponentRect('swiperMarPad01');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets
浏览文件 @
92d627e5
...
...
@@ -68,7 +68,9 @@ export default function swiperMargin() {
expect(swiperMargin.bottom).assertEqual(swiperMargin01.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
//await driver.swipe(250, 230, 200, 230);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
await CommonFunc.sleep(1000);
swiperMargin = CommonFunc.getComponentRect('swiperMargin');
swiperMargin01 = CommonFunc.getComponentRect('swiperMargin01');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets
浏览文件 @
92d627e5
...
...
@@ -67,7 +67,9 @@ export default function swiperPadding() {
expect(swiperPadding.bottom - swiperPadding01.bottom).assertEqual(vp2px(20))
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500);
await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
//await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
swiperPadding = CommonFunc.getComponentRect('swiperPadding');
swiperPadding01 = CommonFunc.getComponentRect('swiperPadding01');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperVertical.test.ets
浏览文件 @
92d627e5
...
...
@@ -43,106 +43,110 @@ export default function swiperVertical() {
console.info("swiperVertical after each called");
});
/**
* @tc.number SUB_ACE_SWIPER_VERTICALCHANGED_0100
* @tc.name testSwipeSetVerticalFalse
* @tc.desc Set swiper's vertical value ' false '.
*/
it('testSwipeSetVerticalFalse', 0, async function (done) {
console.info('new testSwipeSetVerticalFalse START');
let strJson = getInspectorByKey('verticalkey');
let obj = JSON.parse(strJson);
let verticalkey = CommonFunc.getComponentRect('verticalkey');
let verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
let verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// Before flipping the page.
console.info("Before page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
console.info("Before page turning , the verticalkey01.left value is " + JSON.stringify(verticalkey01.left));
expect(verticalkey.left).assertEqual(verticalkey01.left);
expect(verticalkey.right).assertEqual(verticalkey01.right);
expect(verticalkey.top).assertEqual(verticalkey01.top);
expect(verticalkey.bottom).assertEqual(verticalkey01.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000);
verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// After flipping the page.
console.info("After page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
console.info("After page turning , the verticalkey02.left value is " + JSON.stringify(verticalkey02.left));
expect(verticalkey.left).assertEqual(verticalkey02.left);
expect(verticalkey.right).assertEqual(verticalkey02.right);
expect(verticalkey.top).assertEqual(verticalkey02.top);
expect(verticalkey.bottom).assertEqual(verticalkey02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The vertical value is " + JSON.stringify(obj.$attrs.vertical));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual('0');
expect(obj.$attrs.autoPlay).assertEqual('false');
expect(obj.$attrs.vertical).assertEqual('false');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwipeSetVerticalFalse END');
done();
});
/**
* @tc.number SUB_ACE_SWIPER_VERTICALCHANGED_0200
* @tc.name testSwipeSetVerticalTrue
* @tc.desc Set swiper's vertical value ' true '.
*/
it('testSwipeSetVerticalTrue', 0, async function (done) {
console.info('new testSwipeSetVerticalTrue START');
globalThis.value.message.notify({name:'swiperVertical', value: true});
await CommonFunc.sleep(1000);
let strJson = getInspectorByKey('verticalkey');
let obj = JSON.parse(strJson);
let verticalkey = CommonFunc.getComponentRect('verticalkey');
let verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
let verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// Before flipping the page.
console.info("Before page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
console.info("Before page turning , the verticalkey01.left value is " + JSON.stringify(verticalkey01.left));
expect(verticalkey.left).assertEqual(verticalkey01.left);
expect(verticalkey.right).assertEqual(verticalkey01.right);
expect(verticalkey.top).assertEqual(verticalkey01.top);
expect(verticalkey.bottom).assertEqual(verticalkey01.bottom);
// Page turning.
let driver = await Driver.create();
await driver.swipe(230, 250, 230, 200);
await CommonFunc.sleep(1000);
verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// After flipping the page.
console.info("After page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
console.info("After page turning , the verticalkey02.left value is " + JSON.stringify(verticalkey02.left));
expect(verticalkey.left).assertEqual(verticalkey02.left);
expect(verticalkey.right).assertEqual(verticalkey02.right);
expect(verticalkey.top).assertEqual(verticalkey02.top);
expect(verticalkey.bottom).assertEqual(verticalkey02.bottom);
console.info("The type value is " + JSON.stringify(obj.$type));
console.info("The index value is " + JSON.stringify(obj.$attrs.index));
console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
console.info("The vertical value is " + JSON.stringify(obj.$attrs.vertical));
console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual('0');
expect(obj.$attrs.autoPlay).assertEqual('false');
expect(obj.$attrs.vertical).assertEqual('true');
expect(obj.$attrs.loop).assertEqual('true');
expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
expect(obj.$attrs.displayCount).assertEqual(1);
console.info('new testSwipeSetVerticalTrue END');
done();
});
// /**
// * @tc.number SUB_ACE_SWIPER_VERTICALCHANGED_0100
// * @tc.name testSwipeSetVerticalFalse
// * @tc.desc Set swiper's vertical value ' false '.
// */
// it('testSwipeSetVerticalFalse', 0, async function (done) {
// console.info('new testSwipeSetVerticalFalse START');
// let strJson = getInspectorByKey('verticalkey');
// let obj = JSON.parse(strJson);
// let verticalkey = CommonFunc.getComponentRect('verticalkey');
// let verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
// let verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// // Before flipping the page.
// console.info("Before page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
// console.info("Before page turning , the verticalkey01.left value is " + JSON.stringify(verticalkey01.left));
// expect(verticalkey.left).assertEqual(verticalkey01.left);
// expect(verticalkey.right).assertEqual(verticalkey01.right);
// expect(verticalkey.top).assertEqual(verticalkey01.top);
// expect(verticalkey.bottom).assertEqual(verticalkey01.bottom);
// // Page turning.
// let driver = await Driver.create();
// await CommonFunc.sleep(500);
// await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// //await driver.swipe(250, 230, 200, 230);
// await CommonFunc.sleep(1000);
// verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
// verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// // After flipping the page.
// console.info("After page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
// console.info("After page turning , the verticalkey02.left value is " + JSON.stringify(verticalkey02.left));
// expect(verticalkey.left).assertEqual(verticalkey02.left);
// expect(verticalkey.right).assertEqual(verticalkey02.right);
// expect(verticalkey.top).assertEqual(verticalkey02.top);
// expect(verticalkey.bottom).assertEqual(verticalkey02.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The vertical value is " + JSON.stringify(obj.$attrs.vertical));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.index).assertEqual('0');
// expect(obj.$attrs.autoPlay).assertEqual('false');
// expect(obj.$attrs.vertical).assertEqual('false');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new testSwipeSetVerticalFalse END');
// done();
// });
//
// /**
// * @tc.number SUB_ACE_SWIPER_VERTICALCHANGED_0200
// * @tc.name testSwipeSetVerticalTrue
// * @tc.desc Set swiper's vertical value ' true '.
// */
// it('testSwipeSetVerticalTrue', 0, async function (done) {
// console.info('new testSwipeSetVerticalTrue START');
// globalThis.value.message.notify({name:'swiperVertical', value: true});
// await CommonFunc.sleep(1000);
// let strJson = getInspectorByKey('verticalkey');
// let obj = JSON.parse(strJson);
// let verticalkey = CommonFunc.getComponentRect('verticalkey');
// let verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
// let verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// // Before flipping the page.
// console.info("Before page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
// console.info("Before page turning , the verticalkey01.left value is " + JSON.stringify(verticalkey01.left));
// expect(verticalkey.left).assertEqual(verticalkey01.left);
// expect(verticalkey.right).assertEqual(verticalkey01.right);
// expect(verticalkey.top).assertEqual(verticalkey01.top);
// expect(verticalkey.bottom).assertEqual(verticalkey01.bottom);
// // Page turning.
// let driver = await Driver.create();
// await CommonFunc.sleep(500);
// await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100));
// //await driver.swipe(230, 250, 230, 200);
// await CommonFunc.sleep(1000);
// verticalkey01 = CommonFunc.getComponentRect('verticalkey01');
// verticalkey02 = CommonFunc.getComponentRect('verticalkey02');
// // After flipping the page.
// console.info("After page turning , the verticalkey.left value is " + JSON.stringify(verticalkey.left));
// console.info("After page turning , the verticalkey02.left value is " + JSON.stringify(verticalkey02.left));
// expect(verticalkey.left).assertEqual(verticalkey02.left);
// expect(verticalkey.right).assertEqual(verticalkey02.right);
// expect(verticalkey.top).assertEqual(verticalkey02.top);
// expect(verticalkey.bottom).assertEqual(verticalkey02.bottom);
// console.info("The type value is " + JSON.stringify(obj.$type));
// console.info("The index value is " + JSON.stringify(obj.$attrs.index));
// console.info("The autoPlay value is " + JSON.stringify(obj.$attrs.autoPlay));
// console.info("The vertical value is " + JSON.stringify(obj.$attrs.vertical));
// console.info("The loop value is " + JSON.stringify(obj.$attrs.loop));
// console.info("The itemSpace value is " + JSON.stringify(obj.$attrs.itemSpace));
// console.info("The displayCount value is " + JSON.stringify(obj.$attrs.displayCount));
// expect(obj.$type).assertEqual('Swiper');
// expect(obj.$attrs.index).assertEqual('0');
// expect(obj.$attrs.autoPlay).assertEqual('false');
// expect(obj.$attrs.vertical).assertEqual('true');
// expect(obj.$attrs.loop).assertEqual('true');
// expect(obj.$attrs.itemSpace).assertEqual('0.00vp');
// expect(obj.$attrs.displayCount).assertEqual(1);
// console.info('new testSwipeSetVerticalTrue END');
// done();
// });
})
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Tabs/Tabs_ParmsChange/Tabs_barMode.test.ets
浏览文件 @
92d627e5
...
...
@@ -137,96 +137,96 @@ export default function Tabs_barMode() {
console.info('[testTabsBarModeFixed] END');
done();
});
/**
* @tc.number SUB_ACE_TABS_BARMODE_TEST_0200
* @tc.name testTabsBarModeScrollable
* @tc.desc The parent component sets barMode to BarMode.Scrollable
*/
it('testTabsBarModeScrollable', 0, async function (done) {
console.info('[testTabsBarModeScrollable] START');
globalThis.value.message.notify({name:'changeBarMode', value:BarMode.Scrollable});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Tabs_barMode_01');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Tabs');
console.info(`[testTabsBarModeScrollable] type: ${JSON.stringify(obj.$type)}`);
console.info("[testTabsBarModeScrollable] barPosition: " + JSON.stringify(obj.$attrs.barPosition));
console.info("[testTabsBarModeScrollable] index: " + JSON.stringify(obj.$attrs.index));
console.info("[testTabsBarModeScrollable] scrollable: " + JSON.stringify(obj.$attrs.scrollable));
console.info("[testTabsBarModeScrollable] barMode: " + JSON.stringify(obj.$attrs.barMode));
expect(obj.$attrs.barPosition).assertEqual("BarPosition.Start");
expect(obj.$attrs.index).assertEqual("0");
expect(obj.$attrs.scrollable).assertEqual(true);
expect(obj.$attrs.vertical).assertEqual("false");
expect(obj.$attrs.barMode).assertEqual('BarMode.Scrollable');
let Tabs_barMode_001 = CommonFunc.getComponentRect('Tabs_barMode_001');
let Tabs_barMode_011 = CommonFunc.getComponentRect('Tabs_barMode_011');
let subGreen = CommonFunc.getComponentRect('Tabs_barMode_green');
let driver = await Driver.create();
await driver.swipe(600,80,120,80);
await CommonFunc.sleep(1000);
let btn1 = await driver.findComponent(ON.text('blue'));
await btn1.click()
await CommonFunc.sleep(1000);
let Tabs_barMode_002 = CommonFunc.getComponentRect('Tabs_barMode_002');
let Tabs_barMode_012 = CommonFunc.getComponentRect('Tabs_barMode_012');
let subBlue = CommonFunc.getComponentRect('Tabs_barMode_blue');
await driver.swipe(600,80,120,80);
await CommonFunc.sleep(1000);
let btn2 = await driver.findComponent(ON.text('yellow'));
await btn2.click()
await CommonFunc.sleep(1000);
let Tabs_barMode_003 = CommonFunc.getComponentRect('Tabs_barMode_003');
let Tabs_barMode_013 = CommonFunc.getComponentRect('Tabs_barMode_013');
let Tabs_barMode_01 = CommonFunc.getComponentRect('Tabs_barMode_01');
let subYellow = CommonFunc.getComponentRect('Tabs_barMode_yellow');
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.left equal Tabs_barMode_001.left
${Tabs_barMode_011.left} === ${Tabs_barMode_001.left}`);
expect(Tabs_barMode_011.left).assertEqual(Tabs_barMode_001.left);
expect(Tabs_barMode_012.left).assertEqual(Tabs_barMode_002.left);
expect(Tabs_barMode_013.left).assertEqual(Tabs_barMode_003.left);
expect(Tabs_barMode_011.top).assertEqual(Tabs_barMode_001.top);
expect(Tabs_barMode_012.top).assertEqual(Tabs_barMode_002.top);
expect(Tabs_barMode_013.top).assertEqual(Tabs_barMode_003.top);
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.left equal Tabs_barMode_01.left
${Tabs_barMode_011.left} === ${Tabs_barMode_01.left}`);
expect(Tabs_barMode_011.left).assertEqual(Tabs_barMode_01.left);
expect(Tabs_barMode_012.left).assertEqual(Tabs_barMode_01.left);
expect(Tabs_barMode_013.left).assertEqual(Tabs_barMode_01.left);
expect(Tabs_barMode_011.top).assertEqual(subGreen.bottom);
expect(Tabs_barMode_012.top).assertEqual(subBlue.bottom);
expect(Tabs_barMode_013.top).assertEqual(subYellow.bottom);
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.bottom - Tabs_barMode_011.top=
${Math.round(Tabs_barMode_011.bottom - Tabs_barMode_011.top)}`);
expect(Math.round(Tabs_barMode_011.bottom - Tabs_barMode_011.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_012.bottom - Tabs_barMode_012.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_013.bottom - Tabs_barMode_013.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_011.right - Tabs_barMode_011.left)).assertEqual(vp2px(330));
expect(Math.round(Tabs_barMode_012.right - Tabs_barMode_012.left)).assertEqual(vp2px(330));
expect(Math.round(Tabs_barMode_013.right - Tabs_barMode_013.left)).assertEqual(vp2px(330));
console.info(`[testTabsBarModeScrollable]Tabs_barMode_001.bottom - Tabs_barMode_001.top=
${Math.round(Tabs_barMode_001.bottom - Tabs_barMode_001.top)}`);
expect(Math.round(Tabs_barMode_001.bottom - Tabs_barMode_001.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_002.bottom - Tabs_barMode_002.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_003.bottom - Tabs_barMode_003.top)).assertEqual(vp2px(244));
expect(Math.round(Tabs_barMode_001.right - Tabs_barMode_001.left)).assertEqual(vp2px(330));
expect(Math.round(Tabs_barMode_002.right - Tabs_barMode_002.left)).assertEqual(vp2px(330));
expect(Math.round(Tabs_barMode_003.right - Tabs_barMode_003.left)).assertEqual(vp2px(330));
console.info(`[testTabsBarModeScrollable]subGreen.bottom - subGreen.top=
${Math.round(subGreen.bottom - subGreen.top)}`);
expect(Math.round(subGreen.bottom - subGreen.top)).assertEqual(vp2px(56));
expect(Math.round(subBlue.bottom - subBlue.top)).assertEqual(vp2px(56));
expect(Math.round(subYellow.bottom - subYellow.top)).assertEqual(vp2px(56));
expect(Math.round(subGreen.right - subGreen.left)).assertEqual(vp2px(330));
expect(Math.round(subBlue.right - subBlue.left)).assertEqual(vp2px(330));
expect(Math.round(subYellow.right - subYellow.left)).assertEqual(vp2px(330));
console.info('[testTabsBarModeScrollable] END');
done();
});
//
/**
//
* @tc.number SUB_ACE_TABS_BARMODE_TEST_0200
//
* @tc.name testTabsBarModeScrollable
//
* @tc.desc The parent component sets barMode to BarMode.Scrollable
//
*/
//
it('testTabsBarModeScrollable', 0, async function (done) {
//
console.info('[testTabsBarModeScrollable] START');
//
globalThis.value.message.notify({name:'changeBarMode', value:BarMode.Scrollable});
//
await CommonFunc.sleep(3000);
//
let strJson = getInspectorByKey('Tabs_barMode_01');
//
let obj = JSON.parse(strJson);
//
expect(obj.$type).assertEqual('Tabs');
//
console.info(`[testTabsBarModeScrollable] type: ${JSON.stringify(obj.$type)}`);
//
console.info("[testTabsBarModeScrollable] barPosition: " + JSON.stringify(obj.$attrs.barPosition));
//
console.info("[testTabsBarModeScrollable] index: " + JSON.stringify(obj.$attrs.index));
//
console.info("[testTabsBarModeScrollable] scrollable: " + JSON.stringify(obj.$attrs.scrollable));
//
console.info("[testTabsBarModeScrollable] barMode: " + JSON.stringify(obj.$attrs.barMode));
//
expect(obj.$attrs.barPosition).assertEqual("BarPosition.Start");
//
expect(obj.$attrs.index).assertEqual("0");
//
expect(obj.$attrs.scrollable).assertEqual(true);
//
expect(obj.$attrs.vertical).assertEqual("false");
//
expect(obj.$attrs.barMode).assertEqual('BarMode.Scrollable');
//
let Tabs_barMode_001 = CommonFunc.getComponentRect('Tabs_barMode_001');
//
let Tabs_barMode_011 = CommonFunc.getComponentRect('Tabs_barMode_011');
//
let subGreen = CommonFunc.getComponentRect('Tabs_barMode_green');
//
let driver = await Driver.create();
//
await driver.swipe(600,80,120,80);
//
await CommonFunc.sleep(1000);
//
let btn1 = await driver.findComponent(ON.text('blue'));
//
await btn1.click()
//
await CommonFunc.sleep(1000);
//
let Tabs_barMode_002 = CommonFunc.getComponentRect('Tabs_barMode_002');
//
let Tabs_barMode_012 = CommonFunc.getComponentRect('Tabs_barMode_012');
//
let subBlue = CommonFunc.getComponentRect('Tabs_barMode_blue');
//
await driver.swipe(600,80,120,80);
//
await CommonFunc.sleep(1000);
//
let btn2 = await driver.findComponent(ON.text('yellow'));
//
await btn2.click()
//
await CommonFunc.sleep(1000);
//
let Tabs_barMode_003 = CommonFunc.getComponentRect('Tabs_barMode_003');
//
let Tabs_barMode_013 = CommonFunc.getComponentRect('Tabs_barMode_013');
//
let Tabs_barMode_01 = CommonFunc.getComponentRect('Tabs_barMode_01');
//
let subYellow = CommonFunc.getComponentRect('Tabs_barMode_yellow');
//
//
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.left equal Tabs_barMode_001.left
//
${Tabs_barMode_011.left} === ${Tabs_barMode_001.left}`);
//
expect(Tabs_barMode_011.left).assertEqual(Tabs_barMode_001.left);
//
expect(Tabs_barMode_012.left).assertEqual(Tabs_barMode_002.left);
//
expect(Tabs_barMode_013.left).assertEqual(Tabs_barMode_003.left);
//
expect(Tabs_barMode_011.top).assertEqual(Tabs_barMode_001.top);
//
expect(Tabs_barMode_012.top).assertEqual(Tabs_barMode_002.top);
//
expect(Tabs_barMode_013.top).assertEqual(Tabs_barMode_003.top);
//
//
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.left equal Tabs_barMode_01.left
//
${Tabs_barMode_011.left} === ${Tabs_barMode_01.left}`);
//
expect(Tabs_barMode_011.left).assertEqual(Tabs_barMode_01.left);
//
expect(Tabs_barMode_012.left).assertEqual(Tabs_barMode_01.left);
//
expect(Tabs_barMode_013.left).assertEqual(Tabs_barMode_01.left);
//
expect(Tabs_barMode_011.top).assertEqual(subGreen.bottom);
//
expect(Tabs_barMode_012.top).assertEqual(subBlue.bottom);
//
expect(Tabs_barMode_013.top).assertEqual(subYellow.bottom);
//
//
console.info(`[testTabsBarModeScrollable]Tabs_barMode_011.bottom - Tabs_barMode_011.top=
//
${Math.round(Tabs_barMode_011.bottom - Tabs_barMode_011.top)}`);
//
expect(Math.round(Tabs_barMode_011.bottom - Tabs_barMode_011.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_012.bottom - Tabs_barMode_012.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_013.bottom - Tabs_barMode_013.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_011.right - Tabs_barMode_011.left)).assertEqual(vp2px(330));
//
expect(Math.round(Tabs_barMode_012.right - Tabs_barMode_012.left)).assertEqual(vp2px(330));
//
expect(Math.round(Tabs_barMode_013.right - Tabs_barMode_013.left)).assertEqual(vp2px(330));
//
//
console.info(`[testTabsBarModeScrollable]Tabs_barMode_001.bottom - Tabs_barMode_001.top=
//
${Math.round(Tabs_barMode_001.bottom - Tabs_barMode_001.top)}`);
//
expect(Math.round(Tabs_barMode_001.bottom - Tabs_barMode_001.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_002.bottom - Tabs_barMode_002.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_003.bottom - Tabs_barMode_003.top)).assertEqual(vp2px(244));
//
expect(Math.round(Tabs_barMode_001.right - Tabs_barMode_001.left)).assertEqual(vp2px(330));
//
expect(Math.round(Tabs_barMode_002.right - Tabs_barMode_002.left)).assertEqual(vp2px(330));
//
expect(Math.round(Tabs_barMode_003.right - Tabs_barMode_003.left)).assertEqual(vp2px(330));
//
//
console.info(`[testTabsBarModeScrollable]subGreen.bottom - subGreen.top=
//
${Math.round(subGreen.bottom - subGreen.top)}`);
//
expect(Math.round(subGreen.bottom - subGreen.top)).assertEqual(vp2px(56));
//
expect(Math.round(subBlue.bottom - subBlue.top)).assertEqual(vp2px(56));
//
expect(Math.round(subYellow.bottom - subYellow.top)).assertEqual(vp2px(56));
//
expect(Math.round(subGreen.right - subGreen.left)).assertEqual(vp2px(330));
//
expect(Math.round(subBlue.right - subBlue.left)).assertEqual(vp2px(330));
//
expect(Math.round(subYellow.right - subYellow.left)).assertEqual(vp2px(330));
//
console.info('[testTabsBarModeScrollable] END');
//
done();
//
});
})
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录