提交 f7e021ae 编写于 作者: 李鲲辉

fix bug for "滚动类组件支持配置fling效果的参数"XTS用例

Signed-off-by: N李鲲辉 <likunhui@huawei.com>
上级 03e29671
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../common/MessageManager';
@Entry
......
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../common/MessageManager';
@Entry
......
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../common/MessageManager';
@Entry
......
// WaterFlowDataSource.ets
// 实现IDataSource接口的对象,用于瀑布流组件加载数据
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class WaterFlowDataSource implements IDataSource {
private dataArray: number[] = []
......
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../common/MessageManager';
import { WaterFlowDataSource } from './WaterFlowDataSource';
......
......@@ -52,10 +52,10 @@ export default function Grid_GridFrictionTest() {
it('testGridFriction', 0, async function (done) {
console.info('[testGridFriction] START');
globalThis.value.message.notify({name:'friction', value:-1})
let listContainerStrJson = getInspectorByKey('Grid_GridFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Grid');
expect(listContainerObj.$friction).assertEqual(0.6);
let gridContainerStrJson = getInspectorByKey('Grid_GridFriction');
let gridContainerObj = JSON.parse(gridContainerStrJson);
expect(gridContainerObj.$type).assertEqual('Grid');
expect(gridContainerObj.$friction).assertEqual(0.6);
console.info('[testGridFriction] END');
done();
});
......@@ -63,15 +63,15 @@ export default function Grid_GridFrictionTest() {
/**
* @tc.number SUB_ACE_GRID_GRIDFRICTION_002
* @tc.name testGridFriction
* @tc.desc set friction to 100
* @tc.desc set friction to 10
*/
it('testGridFriction', 0, async function (done) {
console.info('[testGridFriction] START');
globalThis.value.message.notify({name:'friction', value:10})
let listContainerStrJson = getInspectorByKey('Grid_GridFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Grid');
expect(listContainerObj.$friction).assertEqual(10);
let gridContainerStrJson = getInspectorByKey('Grid_GridFriction');
let gridContainerObj = JSON.parse(gridContainerStrJson);
expect(gridContainerObj.$type).assertEqual('Grid');
expect(gridContainerObj.$friction).assertEqual(10);
console.info('[testGridFriction] END');
done();
});
......
......@@ -368,9 +368,9 @@ import Row_Padding from './Row/parentComponentChanged/Row_Padding.test';
import Row_Size from './Row/parentComponentChanged/Row_Size.test';
import Row_VerticalAlign from './Row/parentComponentChanged/Row_VerticalAlign.test';
import list_ListFrictionTest from './List/List_attribute/List_ListFriction.test';
import grid_GridFrictionTest from './List/List_attribute/Grid_GridFriction.test';
import waterflow_WaterFlowFrictionTest from './List/List_attribute/Waterflow_WaterFlowFriction.test';
import scroll_ScrollFrictionTest from './List/List_attribute/Scroll_ScrollFriction.test';
import grid_GridFrictionTest from './Grid/Grid_attribute/Grid_GridFriction.test';
import waterflow_WaterFlowFrictionTest from './WaterFlow/WaterFlow_attribute/Waterflow_WaterFlowFriction.test';
import scroll_ScrollFrictionTest from './Scroll/Scroll_attribute/Scroll_ScrollFriction.test';
import AlignContentFlex_Start from './Flex/alignContent/Start/AlignContentFlex_Start.test.ets';
import AlignContent_FlexAlign_Start_Margin from './Flex/alignContent/Start/AlignContent_FlexAlign_Start_Margin.test.ets';
......
......@@ -63,7 +63,7 @@ export default function list_ListFrictionTest() {
/**
* @tc.number SUB_ACE_LIST_LISTFRICTION_002
* @tc.name testListFriction
* @tc.desc set friction to 100
* @tc.desc set friction to 10
*/
it('testListFriction', 0, async function (done) {
console.info('[testListFriction] START');
......
......@@ -52,10 +52,10 @@ export default function Scroll_ScrollFrictionTest() {
it('testScrollFriction', 0, async function (done) {
console.info('[testScrollFriction] START');
globalThis.value.message.notify({name:'friction', value:-1})
let listContainerStrJson = getInspectorByKey('Scroll_ScrollFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Scroll');
expect(listContainerObj.$friction).assertEqual(0.6);
let scrollContainerStrJson = getInspectorByKey('Scroll_ScrollFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Scroll');
expect(scrollContainerObj.$friction).assertEqual(0.6);
console.info('[testScrollFriction] END');
done();
});
......@@ -63,15 +63,15 @@ export default function Scroll_ScrollFrictionTest() {
/**
* @tc.number SUB_ACE_SCROLL_SCROLLFRICTION_002
* @tc.name testScrollFriction
* @tc.desc set friction to 100
* @tc.desc set friction to 10
*/
it('testScrollFriction', 0, async function (done) {
console.info('[testScrollFriction] START');
globalThis.value.message.notify({name:'friction', value:10})
let listContainerStrJson = getInspectorByKey('Scroll_ScrollFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Scroll');
expect(listContainerObj.$friction).assertEqual(10);
let scrollContainerStrJson = getInspectorByKey('Scroll_ScrollFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Scroll');
expect(scrollContainerObj.$friction).assertEqual(10);
console.info('[testScrollFriction] END');
done();
});
......
......@@ -52,10 +52,10 @@ export default function Waterflow_WaterflowFrictionTest() {
it('testWaterflowFriction', 0, async function (done) {
console.info('[testWaterflowFriction] START');
globalThis.value.message.notify({name:'friction', value:-1})
let listContainerStrJson = getInspectorByKey('Waterflow_WaterflowFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Waterflow');
expect(listContainerObj.$friction).assertEqual(0.6);
let scrollContainerStrJson = getInspectorByKey('Waterflow_WaterflowFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Waterflow');
expect(scrollContainerObj.$friction).assertEqual(0.6);
console.info('[testWaterflowFriction] END');
done();
});
......@@ -63,15 +63,15 @@ export default function Waterflow_WaterflowFrictionTest() {
/**
* @tc.number SUB_ACE_WATERFLOW_WATERFLOWFRICTION_002
* @tc.name testWaterflowFriction
* @tc.desc set friction to 100
* @tc.desc set friction to 10
*/
it('testWaterflowFriction', 0, async function (done) {
console.info('[testWaterflowFriction] START');
globalThis.value.message.notify({name:'friction', value:10})
let listContainerStrJson = getInspectorByKey('Waterflow_WaterflowFriction');
let listContainerObj = JSON.parse(listContainerStrJson);
expect(listContainerObj.$type).assertEqual('Waterflow');
expect(listContainerObj.$friction).assertEqual(10);
let scrollContainerStrJson = getInspectorByKey('Waterflow_WaterflowFriction');
let scrollContainerObj = JSON.parse(scrollContainerStrJson);
expect(scrollContainerObj.$type).assertEqual('Waterflow');
expect(scrollContainerObj.$friction).assertEqual(10);
console.info('[testWaterflowFriction] END');
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册