diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/Grid_attribute/Grid_GridFriction.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/Grid_attribute/Grid_GridFriction.test.ets index 13de492f3db7d50d3dafcbfc4603785930602c39..36db129973d20cff3fed203bac19ba1c2ca5e0f0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/Grid_attribute/Grid_GridFriction.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/Grid_attribute/Grid_GridFriction.test.ets @@ -15,34 +15,33 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, - WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest'; +import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager'; export default function grid_GridFrictionTest() { - describe('Grid_GridFrictionTest', function () { + describe('grid_GridFrictionTest', function () { beforeEach(async function (done) { - console.info("Grid_GridFrictionTest beforeEach start"); + console.info("GridFrictionPage beforeEach start"); let options = { url: 'MainAbility/pages/Grid/Grid_attribute/GridFrictionPage', } try { router.clear(); let pages = router.getState(); - console.info("get Grid_GridFrictionTest state pages:" + JSON.stringify(pages)); - if (!("Grid_GridFrictionTest" == pages.name)) { - console.info("get Grid_GridInitialIndex1 pages.name:" + JSON.stringify(pages.name)); + console.info("get GridFrictionPage state pages:" + JSON.stringify(pages)); + if (!("GridFrictionPage" == pages.name)) { + console.info("get GridFrictionPage pages.name:" + JSON.stringify(pages.name)); let result = await router.push(options); await CommonFunc.sleep(2000); - console.info("push Grid_GridFrictionTest page result:" + JSON.stringify(result)); + console.info("push GridFrictionPage page result:" + JSON.stringify(result)); } } catch (err) { - console.error("push Grid_GridFrictionTest page error:" + err); + console.error("push GridFrictionPage page error:" + err); } - console.info("Grid_GridFrictionTest beforeEach end"); + console.info("GridFrictionPage beforeEach end"); done(); }); afterEach(async function () { await CommonFunc.sleep(1000); - console.info("Grid_GridFrictionTest after each called"); + console.info("GridFrictionPage after each called"); }); /** * @tc.number SUB_ACE_GRID_GRIDFRICTION_001 @@ -52,10 +51,11 @@ export default function grid_GridFrictionTest() { it('testGridFriction', 0, async function (done) { console.info('[testGridFriction] START'); globalThis.value.message.notify({name:'friction', value:-1}) + await CommonFunc.sleep(2000); let gridContainerStrJson = getInspectorByKey('Grid_GridFriction'); let gridContainerObj = JSON.parse(gridContainerStrJson); expect(gridContainerObj.$type).assertEqual('Grid'); - expect(gridContainerObj.$friction).assertEqual(0.6); + expect(gridContainerObj.$attrs.friction).assertEqual(0.6); console.info('[testGridFriction] END'); done(); }); @@ -68,10 +68,11 @@ export default function grid_GridFrictionTest() { it('testGridFriction', 0, async function (done) { console.info('[testGridFriction] START'); globalThis.value.message.notify({name:'friction', value:10}) + await CommonFunc.sleep(2000); let gridContainerStrJson = getInspectorByKey('Grid_GridFriction'); let gridContainerObj = JSON.parse(gridContainerStrJson); expect(gridContainerObj.$type).assertEqual('Grid'); - expect(gridContainerObj.$friction).assertEqual(10); + expect(gridContainerObj.$attrs.friction).assertEqual(10); console.info('[testGridFriction] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_attribute/List_ListFriction.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_attribute/List_ListFriction.test.ets index 27d1319eeecfea130b563e6b3c7f9187480bb83e..9d8109fad7164a15b935e9b9756fb20ce6ef72d5 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_attribute/List_ListFriction.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_attribute/List_ListFriction.test.ets @@ -15,34 +15,34 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, - WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest'; +import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager'; export default function list_ListFrictionTest() { - describe('List_ListFrictionTest', function () { + + describe('list_ListFrictionTest', function () { beforeEach(async function (done) { - console.info("List_ListFrictionTest beforeEach start"); + console.info("ListFrictionPage beforeEach start"); let options = { url: 'MainAbility/pages/List/List_attribute/ListFrictionPage', } try { router.clear(); let pages = router.getState(); - console.info("get List_ListFrictionTest state pages:" + JSON.stringify(pages)); - if (!("list_ListFrictionTest" == pages.name)) { - console.info("get List_ListInitialIndex1 pages.name:" + JSON.stringify(pages.name)); + console.info("get ListFrictionPage state pages:" + JSON.stringify(pages)); + if (!("ListFrictionPage" == pages.name)) { + console.info("get ListFrictionPage pages.name:" + JSON.stringify(pages.name)); let result = await router.push(options); await CommonFunc.sleep(2000); - console.info("push List_ListFrictionTest page result:" + JSON.stringify(result)); + console.info("push ListFrictionPage page result:" + JSON.stringify(result)); } } catch (err) { - console.error("push List_ListFrictionTest page error:" + err); + console.error("push ListFrictionPage page error:" + err); } - console.info("List_ListFrictionTest beforeEach end"); + console.info("ListFrictionPage beforeEach end"); done(); }); afterEach(async function () { await CommonFunc.sleep(1000); - console.info("List_ListFrictionTest after each called"); + console.info("ListFrictionPage after each called"); }); /** * @tc.number SUB_ACE_LIST_LISTFRICTION_001 @@ -52,10 +52,11 @@ export default function list_ListFrictionTest() { it('testListFriction', 0, async function (done) { console.info('[testListFriction] START'); globalThis.value.message.notify({name:'friction', value:-1}) + await CommonFunc.sleep(2000); let listContainerStrJson = getInspectorByKey('List_ListFriction'); let listContainerObj = JSON.parse(listContainerStrJson); expect(listContainerObj.$type).assertEqual('List'); - expect(listContainerObj.$friction).assertEqual(0.6); + expect(listContainerObj.$attrs.friction).assertEqual(0.6); console.info('[testListFriction] END'); done(); }); @@ -68,10 +69,11 @@ export default function list_ListFrictionTest() { it('testListFriction', 0, async function (done) { console.info('[testListFriction] START'); globalThis.value.message.notify({name:'friction', value:10}) + await CommonFunc.sleep(2000); let listContainerStrJson = getInspectorByKey('List_ListFriction'); let listContainerObj = JSON.parse(listContainerStrJson); expect(listContainerObj.$type).assertEqual('List'); - expect(listContainerObj.$friction).assertEqual(10); + expect(listContainerObj.$attrs.friction).assertEqual(10); console.info('[testListFriction] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Scroll/Scroll_attribute/Scroll_ScrollFriction.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Scroll/Scroll_attribute/Scroll_ScrollFriction.test.ets index 075780d618f3b6765193d0803bcfe6b804ffacbb..554b98a2f474c27d64b903de13808e931fb3de5c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Scroll/Scroll_attribute/Scroll_ScrollFriction.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Scroll/Scroll_attribute/Scroll_ScrollFriction.test.ets @@ -15,34 +15,33 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, - WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest'; +import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager'; export default function scroll_ScrollFrictionTest() { - describe('Scroll_ScrollFrictionTest', function () { + describe('scroll_ScrollFrictionTest', function () { beforeEach(async function (done) { - console.info("Scroll_ScrollFrictionTest beforeEach start"); + console.info("ScrollFrictionPage beforeEach start"); let options = { url: 'MainAbility/pages/Scroll/Scroll_attribute/ScrollFrictionPage', } try { router.clear(); let pages = router.getState(); - console.info("get Scroll_ScrollFrictionTest state pages:" + JSON.stringify(pages)); - if (!("Scroll_ScrollFrictionTest" == pages.name)) { + console.info("get ScrollFrictionPage state pages:" + JSON.stringify(pages)); + if (!("ScrollFrictionPage" == pages.name)) { console.info("get Scroll_ScrollInitialIndex1 pages.name:" + JSON.stringify(pages.name)); let result = await router.push(options); await CommonFunc.sleep(2000); - console.info("push Scroll_ScrollFrictionTest page result:" + JSON.stringify(result)); + console.info("push ScrollFrictionPage page result:" + JSON.stringify(result)); } } catch (err) { - console.error("push Scroll_ScrollFrictionTest page error:" + err); + console.error("push ScrollFrictionPage page error:" + err); } - console.info("Scroll_ScrollFrictionTest beforeEach end"); + console.info("ScrollFrictionPage beforeEach end"); done(); }); afterEach(async function () { await CommonFunc.sleep(1000); - console.info("Scroll_ScrollFrictionTest after each called"); + console.info("ScrollFrictionPage after each called"); }); /** * @tc.number SUB_ACE_SCROLL_SCROLLFRICTION_001 @@ -52,10 +51,11 @@ export default function scroll_ScrollFrictionTest() { it('testScrollFriction', 0, async function (done) { console.info('[testScrollFriction] START'); globalThis.value.message.notify({name:'friction', value:-1}) + await CommonFunc.sleep(2000); let scrollContainerStrJson = getInspectorByKey('Scroll_ScrollFriction'); let scrollContainerObj = JSON.parse(scrollContainerStrJson); expect(scrollContainerObj.$type).assertEqual('Scroll'); - expect(scrollContainerObj.$friction).assertEqual(0.6); + expect(scrollContainerObj.$attrs.friction).assertEqual(0.6); console.info('[testScrollFriction] END'); done(); }); @@ -68,10 +68,11 @@ export default function scroll_ScrollFrictionTest() { it('testScrollFriction', 0, async function (done) { console.info('[testScrollFriction] START'); globalThis.value.message.notify({name:'friction', value:10}) + await CommonFunc.sleep(2000); let scrollContainerStrJson = getInspectorByKey('Scroll_ScrollFriction'); let scrollContainerObj = JSON.parse(scrollContainerStrJson); expect(scrollContainerObj.$type).assertEqual('Scroll'); - expect(scrollContainerObj.$friction).assertEqual(10); + expect(scrollContainerObj.$attrs.friction).assertEqual(10); console.info('[testScrollFriction] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets index 466e33e11b854d8c862f523ce0cb10faddc7b151..ba5d9f896920d02ea17ee4be9310d84af28103a9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/WaterFlow/WaterFlow_attribute/WaterFlow_WaterFlowFriction.test.ets @@ -15,29 +15,28 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, - WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest'; +import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager'; export default function waterFlow_WaterFlowFrictionTest() { - describe('WaterFlow_WaterFlowFrictionTest', function () { + describe('waterFlow_WaterFlowFrictionTest', function () { beforeEach(async function (done) { - console.info("WaterFlow_WaterFlowFrictionTest beforeEach start"); + console.info("WaterFlowFrictionPage beforeEach start"); let options = { url: 'MainAbility/pages/WaterFlow/WaterFlow_attribute/WaterFlowFrictionPage', } try { router.clear(); let pages = router.getState(); - console.info("get WaterFlow_WaterFlowFrictionTest state pages:" + JSON.stringify(pages)); - if (!("WaterFlow_WaterFlowFrictionTest" == pages.name)) { + console.info("get WaterFlowFrictionPage state pages:" + JSON.stringify(pages)); + if (!("WaterFlowFrictionPage" == pages.name)) { console.info("get WaterFlow_WaterFlow pages.name:" + JSON.stringify(pages.name)); let result = await router.push(options); await CommonFunc.sleep(2000); - console.info("push WaterFlow_WaterFlowFrictionTest page result:" + JSON.stringify(result)); + console.info("push WaterFlowFrictionPage page result:" + JSON.stringify(result)); } } catch (err) { - console.error("push WaterFlow_WaterFlowFrictionTest page error:" + err); + console.error("push WaterFlowFrictionPage page error:" + err); } - console.info("WaterFlow_WaterFlowFrictionTest beforeEach end"); + console.info("WaterFlowFrictionPage beforeEach end"); done(); }); afterEach(async function () { @@ -52,10 +51,11 @@ export default function waterFlow_WaterFlowFrictionTest() { it('testWaterFlowFriction', 0, async function (done) { console.info('[testWaterFlowFriction] START'); globalThis.value.message.notify({name:'friction', value:-1}) + await CommonFunc.sleep(2000); let scrollContainerStrJson = getInspectorByKey('WaterFlow_WaterFlowFriction'); let scrollContainerObj = JSON.parse(scrollContainerStrJson); expect(scrollContainerObj.$type).assertEqual('WaterFlow'); - expect(scrollContainerObj.$friction).assertEqual(0.6); + expect(scrollContainerObj.$attrs.friction).assertEqual(0.6); console.info('[testWaterFlowFriction] END'); done(); }); @@ -68,10 +68,11 @@ export default function waterFlow_WaterFlowFrictionTest() { it('testWaterFlowFriction', 0, async function (done) { console.info('[testWaterFlowFriction] START'); globalThis.value.message.notify({name:'friction', value:10}) + await CommonFunc.sleep(2000); let scrollContainerStrJson = getInspectorByKey('WaterFlow_WaterFlowFriction'); let scrollContainerObj = JSON.parse(scrollContainerStrJson); expect(scrollContainerObj.$type).assertEqual('WaterFlow'); - expect(scrollContainerObj.$friction).assertEqual(10); + expect(scrollContainerObj.$attrs.friction).assertEqual(10); console.info('[testWaterFlowFriction] END'); done(); });