Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c55ebaa2
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看板
提交
c55ebaa2
编写于
7月 01, 2023
作者:
李
李鲲辉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug for "滚动类组件支持配置fling效果的参数"XTS用例
Signed-off-by:
N
李鲲辉
<
likunhui@huawei.com
>
上级
f7e021ae
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
30 deletion
+29
-30
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_attribute/GridFrictionPage.ets
...ainAbility/pages/Grid/Grid_attribute/GridFrictionPage.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_attribute/ListFrictionPage.ets
...ainAbility/pages/List/List_attribute/ListFrictionPage.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Scroll/Scroll_attribute/ScrollFrictionPage.ets
...lity/pages/Scroll/Scroll_attribute/ScrollFrictionPage.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/WaterFlow/WaterFlow_attribute/WaterFlowFrictionPage.ets
...s/WaterFlow/WaterFlow_attribute/WaterFlowFrictionPage.ets
+2
-3
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
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets
.../WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets
+23
-23
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_attribute/GridFrictionPage.ets
浏览文件 @
c55ebaa2
...
@@ -69,7 +69,7 @@ struct GridFrictionPage {
...
@@ -69,7 +69,7 @@ struct GridFrictionPage {
this.scroller.scrollPage({ next: true })
this.scroller.scrollPage({ next: true })
})
})
.friction(this.friction)
.friction(this.friction)
.key(
Grid_GridFriction
)
.key(
'Grid_GridFriction'
)
}.width('100%').margin({ top: 5 })
}.width('100%').margin({ top: 5 })
}
}
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_attribute/ListFrictionPage.ets
浏览文件 @
c55ebaa2
...
@@ -57,7 +57,7 @@ struct ListFrictionPage {
...
@@ -57,7 +57,7 @@ struct ListFrictionPage {
})
})
.width('90%')
.width('90%')
.friction(this.friction)
.friction(this.friction)
.key(
List_ListFriction
)
.key(
'List_ListFriction'
)
}
}
.width('100%')
.width('100%')
.height('100%')
.height('100%')
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Scroll/Scroll_attribute/ScrollFrictionPage.ets
浏览文件 @
c55ebaa2
...
@@ -66,7 +66,7 @@ struct ScrollFrictionPage {
...
@@ -66,7 +66,7 @@ struct ScrollFrictionPage {
console.info('Scroll Stop')
console.info('Scroll Stop')
})
})
.friction(this.friction)
.friction(this.friction)
.key(
Scroll_ScrollFriction
)
.key(
'Scroll_ScrollFriction'
)
}.width('100%').height('100%').backgroundColor(0xDCDCDC)
}.width('100%').height('100%').backgroundColor(0xDCDCDC)
}
}
}
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/WaterFlow/WaterFlow_attribute/WaterFlowFrictionPage.ets
浏览文件 @
c55ebaa2
...
@@ -26,6 +26,7 @@ struct WaterFlowFrictionPage {
...
@@ -26,6 +26,7 @@ struct WaterFlowFrictionPage {
datasource: WaterFlowDataSource = new WaterFlowDataSource()
datasource: WaterFlowDataSource = new WaterFlowDataSource()
private itemWidthArray: number[] = []
private itemWidthArray: number[] = []
private itemHeightArray: number[] = []
private itemHeightArray: number[] = []
@State friction:number = 1000
messageManager:MessageManager = new MessageManager();
messageManager:MessageManager = new MessageManager();
onPageShow() {
onPageShow() {
...
@@ -42,13 +43,11 @@ struct WaterFlowFrictionPage {
...
@@ -42,13 +43,11 @@ struct WaterFlowFrictionPage {
this.messageManager.registerCallback(callback);
this.messageManager.registerCallback(callback);
}
}
// 计算flow item宽/高
getSize() {
getSize() {
let ret = Math.floor(Math.random() * this.maxSize)
let ret = Math.floor(Math.random() * this.maxSize)
return (ret > this.minSize ? ret : this.minSize)
return (ret > this.minSize ? ret : this.minSize)
}
}
// 保存flow item宽/高
getItemSizeArray() {
getItemSizeArray() {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 100; i++) {
this.itemWidthArray.push(this.getSize())
this.itemWidthArray.push(this.getSize())
...
@@ -110,7 +109,7 @@ struct WaterFlowFrictionPage {
...
@@ -110,7 +109,7 @@ struct WaterFlowFrictionPage {
.height('80%')
.height('80%')
.layoutDirection(FlexDirection.Column)
.layoutDirection(FlexDirection.Column)
.friction(this.friction)
.friction(this.friction)
.key(
WaterFlow_WaterFlowFriction
)
.key(
'WaterFlow_WaterFlowFriction'
)
}
}
}
}
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/List.test.ets
浏览文件 @
c55ebaa2
...
@@ -369,7 +369,7 @@ import Row_Size from './Row/parentComponentChanged/Row_Size.test';
...
@@ -369,7 +369,7 @@ import Row_Size from './Row/parentComponentChanged/Row_Size.test';
import Row_VerticalAlign from './Row/parentComponentChanged/Row_VerticalAlign.test';
import Row_VerticalAlign from './Row/parentComponentChanged/Row_VerticalAlign.test';
import list_ListFrictionTest from './List/List_attribute/List_ListFriction.test';
import list_ListFrictionTest from './List/List_attribute/List_ListFriction.test';
import grid_GridFrictionTest from './Grid/Grid_attribute/Grid_GridFriction.test';
import grid_GridFrictionTest from './Grid/Grid_attribute/Grid_GridFriction.test';
import waterflow_WaterFlowFrictionTest from './WaterFlow/WaterFlow_attribute/Water
f
low_WaterFlowFriction.test';
import waterflow_WaterFlowFrictionTest from './WaterFlow/WaterFlow_attribute/Water
F
low_WaterFlowFriction.test';
import scroll_ScrollFrictionTest from './Scroll/Scroll_attribute/Scroll_ScrollFriction.test';
import scroll_ScrollFrictionTest from './Scroll/Scroll_attribute/Scroll_ScrollFriction.test';
import AlignContentFlex_Start from './Flex/alignContent/Start/AlignContentFlex_Start.test.ets';
import AlignContentFlex_Start from './Flex/alignContent/Start/AlignContentFlex_Start.test.ets';
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets
浏览文件 @
c55ebaa2
...
@@ -17,62 +17,62 @@ import router from '@ohos.router';
...
@@ -17,62 +17,62 @@ import router from '@ohos.router';
import CommonFunc from '../../../MainAbility/common/Common';
import CommonFunc from '../../../MainAbility/common/Common';
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection,
WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest';
WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest';
export default function Water
flow_Waterf
lowFrictionTest() {
export default function Water
Flow_WaterF
lowFrictionTest() {
describe('Water
flow_Waterf
lowFrictionTest', function () {
describe('Water
Flow_WaterF
lowFrictionTest', function () {
beforeEach(async function (done) {
beforeEach(async function (done) {
console.info("Water
flow_Waterf
lowFrictionTest beforeEach start");
console.info("Water
Flow_WaterF
lowFrictionTest beforeEach start");
let options = {
let options = {
url: 'MainAbility/pages/Water
flow/Waterflow_attribute/Waterf
lowFrictionPage',
url: 'MainAbility/pages/Water
Flow/WaterFlow_attribute/WaterF
lowFrictionPage',
}
}
try {
try {
router.clear();
router.clear();
let pages = router.getState();
let pages = router.getState();
console.info("get Water
flow_Waterf
lowFrictionTest state pages:" + JSON.stringify(pages));
console.info("get Water
Flow_WaterF
lowFrictionTest state pages:" + JSON.stringify(pages));
if (!("Water
flow_Waterf
lowFrictionTest" == pages.name)) {
if (!("Water
Flow_WaterF
lowFrictionTest" == pages.name)) {
console.info("get Water
flow_WaterflowInitialIndex1
pages.name:" + JSON.stringify(pages.name));
console.info("get Water
Flow_WaterFlow
pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
let result = await router.push(options);
await CommonFunc.sleep(2000);
await CommonFunc.sleep(2000);
console.info("push Water
flow_Waterf
lowFrictionTest page result:" + JSON.stringify(result));
console.info("push Water
Flow_WaterF
lowFrictionTest page result:" + JSON.stringify(result));
}
}
} catch (err) {
} catch (err) {
console.error("push Water
flow_Waterf
lowFrictionTest page error:" + err);
console.error("push Water
Flow_WaterF
lowFrictionTest page error:" + err);
}
}
console.info("Water
flow_Waterf
lowFrictionTest beforeEach end");
console.info("Water
Flow_WaterF
lowFrictionTest beforeEach end");
done();
done();
});
});
afterEach(async function () {
afterEach(async function () {
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
console.info("Water
flow_Waterf
lowFrictionTest after each called");
console.info("Water
Flow_WaterF
lowFrictionTest after each called");
});
});
/**
/**
* @tc.number SUB_ACE_WATERFLOW_WATERFLOWFRICTION_001
* @tc.number SUB_ACE_WATERFLOW_WATERFLOWFRICTION_001
* @tc.name testWater
f
lowFriction
* @tc.name testWater
F
lowFriction
* @tc.desc set friction to -1
* @tc.desc set friction to -1
*/
*/
it('testWater
f
lowFriction', 0, async function (done) {
it('testWater
F
lowFriction', 0, async function (done) {
console.info('[testWater
f
lowFriction] START');
console.info('[testWater
F
lowFriction] START');
globalThis.value.message.notify({name:'friction', value:-1})
globalThis.value.message.notify({name:'friction', value:-1})
let scrollContainerStrJson = getInspectorByKey('Water
flow_Waterf
lowFriction');
let scrollContainerStrJson = getInspectorByKey('Water
Flow_WaterF
lowFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Water
f
low');
expect(scrollContainerObj.$type).assertEqual('Water
F
low');
expect(scrollContainerObj.$friction).assertEqual(0.6);
expect(scrollContainerObj.$friction).assertEqual(0.6);
console.info('[testWater
f
lowFriction] END');
console.info('[testWater
F
lowFriction] END');
done();
done();
});
});
/**
/**
* @tc.number SUB_ACE_WATERFLOW_WATERFLOWFRICTION_002
* @tc.number SUB_ACE_WATERFLOW_WATERFLOWFRICTION_002
* @tc.name testWater
f
lowFriction
* @tc.name testWater
F
lowFriction
* @tc.desc set friction to 10
* @tc.desc set friction to 10
*/
*/
it('testWater
f
lowFriction', 0, async function (done) {
it('testWater
F
lowFriction', 0, async function (done) {
console.info('[testWater
f
lowFriction] START');
console.info('[testWater
F
lowFriction] START');
globalThis.value.message.notify({name:'friction', value:10})
globalThis.value.message.notify({name:'friction', value:10})
let scrollContainerStrJson = getInspectorByKey('Water
flow_Waterf
lowFriction');
let scrollContainerStrJson = getInspectorByKey('Water
Flow_WaterF
lowFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Water
f
low');
expect(scrollContainerObj.$type).assertEqual('Water
F
low');
expect(scrollContainerObj.$friction).assertEqual(10);
expect(scrollContainerObj.$friction).assertEqual(10);
console.info('[testWater
f
lowFriction] END');
console.info('[testWater
F
lowFriction] END');
done();
done();
});
});
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录