提交 26b5ecfa 编写于 作者: Z zhouke

@ohos.uitest.d.ts中Point接口名调整,xts测试套适配.Signed-off-by: <zhouke35@huawei.com>.

Signed-off-by: Nzhouke <zhouke35@huawei.com>
上级 f8dfec18
......@@ -14,7 +14,7 @@
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import abilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
import { UiComponent, UiDriver, BY, Component, Driver, UiWindow, ON, MatchPattern, DisplayRotation, ResizeDirection, WindowMode, PointerMatrix } from '@ohos.uitest'
import { UiComponent, UiDriver, BY, Component, Driver, UiWindow, ON, MatchPattern, DisplayRotation, ResizeDirection, WindowMode, PointerMatrix } from '@ohos.UiTest'
import ability_featureAbility from '@ohos.ability.featureAbility';
const delegator = abilityDelegatorRegistry.getAbilityDelegator();
......@@ -494,7 +494,7 @@ export default function UiTest() {
await driver.delayMs(waitUiReadyMs)
let Button = await driver.findComponent(ON.text('next page'))
let center = await Button.getBoundsCenter()
await driver.click(center.X, center.Y)
await driver.click(center.x, center.y)
await driver.delayMs(waitUiReadyMs)
let newButton = await driver.findComponent(ON.text('back to index'))
let text = await newButton.getText()
......@@ -514,7 +514,7 @@ export default function UiTest() {
await driver.delayMs(waitUiReadyMs)
let Button = await driver.findComponent(ON.text('Click twice'))
let center = await Button.getBoundsCenter()
await driver.doubleClick(center.X, center.Y)
await driver.doubleClick(center.x, center.y)
await driver.delayMs(waitUiReadyMs)
let button = await driver.findComponent(ON.text('doubleClick'))
let text = await button.getText()
......@@ -534,7 +534,7 @@ export default function UiTest() {
await driver.delayMs(waitUiReadyMs)
let Button = await driver.findComponent(ON.text('next page'))
let center = await Button.getBoundsCenter()
await driver.longClick(center.X, center.Y)
await driver.longClick(center.x, center.y)
await driver.delayMs(waitUiReadyMs)
let newButton = await driver.findComponent(ON.text('longClick'))
let text = await newButton.getText()
......@@ -784,7 +784,7 @@ export default function UiTest() {
let text = await driver.findComponent(ON.type('TextInput'))
let center = await text.getBoundsCenter()
await text.inputText('123')
await driver.click(center.X, center.Y)
await driver.click(center.x, center.y)
await driver.delayMs(waitUiReadyMs)
await driver.triggerCombineKeys(2072, 2017)
await driver.delayMs(waitUiReadyMs)
......@@ -924,7 +924,7 @@ export default function UiTest() {
await startAbility('com.uitestScene.acts', 'com.uitestScene.acts.MainAbility')
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
await driver.fling({X:300, Y:600},{X:300, Y:300}, 20, 600)
await driver.fling({x:300, y:600},{x:300, y:300}, 20, 600)
let text = await driver.findComponent(ON.text('next page'))
expect(text == null).assertTrue()
let scrollBar = await driver.findComponent(ON.type('Scroll'))
......@@ -1026,28 +1026,28 @@ export default function UiTest() {
let bounds1 = await image1.getBounds()
let pointer = PointerMatrix.create(2,11)
await driver.delayMs(300)
pointer.setPoint(0,0,{X:245,Y:480})
pointer.setPoint(0,1,{X:250,Y:480})
pointer.setPoint(0,2,{X:255,Y:480})
pointer.setPoint(0,3,{X:260,Y:480})
pointer.setPoint(0,4,{X:265,Y:480})
pointer.setPoint(0,5,{X:270,Y:480})
pointer.setPoint(0,6,{X:275,Y:480})
pointer.setPoint(0,7,{X:280,Y:480})
pointer.setPoint(0,8,{X:285,Y:480})
pointer.setPoint(0,9,{X:290,Y:480})
pointer.setPoint(0,10,{X:295,Y:480})
pointer.setPoint(1,0,{X:505,Y:480})
pointer.setPoint(1,1,{X:500,Y:480})
pointer.setPoint(1,2,{X:495,Y:480})
pointer.setPoint(1,3,{X:490,Y:480})
pointer.setPoint(1,4,{X:485,Y:480})
pointer.setPoint(1,5,{X:480,Y:480})
pointer.setPoint(1,6,{X:475,Y:480})
pointer.setPoint(1,7,{X:470,Y:480})
pointer.setPoint(1,8,{X:465,Y:480})
pointer.setPoint(1,9,{X:460,Y:480})
pointer.setPoint(1,10,{X:455,Y:480})
pointer.setPoint(0,0,{x:245,y:480})
pointer.setPoint(0,1,{x:250,y:480})
pointer.setPoint(0,2,{x:255,y:480})
pointer.setPoint(0,3,{x:260,y:480})
pointer.setPoint(0,4,{x:265,y:480})
pointer.setPoint(0,5,{x:270,y:480})
pointer.setPoint(0,6,{x:275,y:480})
pointer.setPoint(0,7,{x:280,y:480})
pointer.setPoint(0,8,{x:285,y:480})
pointer.setPoint(0,9,{x:290,y:480})
pointer.setPoint(0,10,{x:295,y:480})
pointer.setPoint(1,0,{x:505,y:480})
pointer.setPoint(1,1,{x:500,y:480})
pointer.setPoint(1,2,{x:495,y:480})
pointer.setPoint(1,3,{x:490,y:480})
pointer.setPoint(1,4,{x:485,y:480})
pointer.setPoint(1,5,{x:480,y:480})
pointer.setPoint(1,6,{x:475,y:480})
pointer.setPoint(1,7,{x:470,y:480})
pointer.setPoint(1,8,{x:465,y:480})
pointer.setPoint(1,9,{x:460,y:480})
pointer.setPoint(1,10,{x:455,y:480})
await driver.injectMultiPointerAction(pointer, 600)
let image2 = await driver.findComponent(ON.type('Image'))
let bounds2= await image2.getBounds()
......@@ -1343,8 +1343,8 @@ export default function UiTest() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
let s = await driver.getDisplaySize()
expect(s.X != 0).assertTrue()
expect(s.Y != 0).assertTrue()
expect(s.x != 0).assertTrue()
expect(s.y != 0).assertTrue()
await stopApplication('com.uitestScene.acts')
})
......@@ -1358,8 +1358,8 @@ export default function UiTest() {
let driver = Driver.create()
await driver.delayMs(waitUiReadyMs)
let s = await driver.getDisplayDensity()
expect(s.X != 0).assertTrue()
expect(s.Y != 0).assertTrue()
expect(s.x != 0).assertTrue()
expect(s.y != 0).assertTrue()
await stopApplication('com.uitestScene.acts')
})
......@@ -1501,7 +1501,7 @@ export default function UiTest() {
let text2 = await driver.findComponent(ON.text('one'))
let point1 = await text1.getBoundsCenter()
let point2 = await text2.getBoundsCenter()
await driver.drag(point1.X, point1.Y, point2.X, point2.Y)
await driver.drag(point1.x, point1.y, point2.x, point2.y)
await driver.delayMs(waitUiReadyMs)
let text = await driver.findComponent(ON.text('four'))
expect(text == null).assertTrue()
......
......@@ -17,7 +17,7 @@ import audio from '@ohos.multimedia.audio';
import fileio from '@ohos.fileio';
import featureAbility from '@ohos.ability.featureAbility';
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from '@ohos/hypium';
import { UiDriver, BY } from '@ohos.uitest'
import { UiDriver, BY } from '@ohos.UiTest'
export default function audioCapturer() {
describe('audioCapturer', function () {
......
......@@ -16,7 +16,7 @@
import audio from '@ohos.multimedia.audio';
import featureAbility from '@ohos.ability.featureAbility';
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from '@ohos/hypium';
import { UiDriver, BY } from '@ohos.uitest'
import { UiDriver, BY } from '@ohos.UiTest'
export default function audioCapturerChange() {
describe('audioCapturerChange', function () {
......
......@@ -16,7 +16,7 @@
import audio from '@ohos.multimedia.audio';
import featureAbility from '@ohos.ability.featureAbility';
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from '@ohos/hypium';
import { UiDriver, BY } from '@ohos.uitest'
import { UiDriver, BY } from '@ohos.UiTest'
export default function audioFramework() {
......
......@@ -18,7 +18,7 @@ import fileio from '@ohos.fileio';
import featureAbility from '@ohos.ability.featureAbility'
import resourceManager from '@ohos.resourceManager';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
import { UiDriver, BY} from '@ohos.uitest'
import { UiDriver, BY} from '@ohos.UiTest'
export default function audioVoip() {
describe('audioVoip', function () {
......
......@@ -19,7 +19,7 @@ import router from '@system.router'
import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import fileio from '@ohos.fileio'
import featureAbility from '@ohos.ability.featureAbility'
import { UiDriver, BY, PointerMatrix } from '@ohos.uitest'
import { UiDriver, BY, PointerMatrix } from '@ohos.UiTest'
const context = featureAbility.getContext();
......
......@@ -15,7 +15,7 @@
import mediaLibrary from "@ohos.multimedia.mediaLibrary";
import abilityAccessCtrl from "@ohos.abilityAccessCtrl";
import bundle from "@ohos.bundle";
import uitest from "@ohos.uitest";
import uitest from "@ohos.UiTest";
const presetsCount = {
ActsMediaLibraryAlbumTest: { albumsCount: 15, assetsCount: 27 },
ActsMediaLibraryBaseTest: { albumsCount: 11, assetsCount: 14 },
......
......@@ -12,7 +12,7 @@ import {
ResizeDirection,
WindowMode,
PointerMatrix,
} from "@ohos.uitest";
} from "@ohos.UiTest";
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......
......@@ -17,7 +17,7 @@ import contact from '@ohos.contact';
import sms from '@ohos.telephony.sms';
import featureAbility from '@ohos.ability.featureAbility';
import { afterAll, beforeAll, describe, expect, it } from '@ohos/hypium';
import { BY, UiDriver } from '@ohos.uitest';
import { BY, UiDriver } from '@ohos.UiTest';
export default function ObjectInterfaceTest() {
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { UiDriver } from '@ohos.uitest'
import { UiDriver } from '@ohos.UiTest'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import prompt from '@ohos.prompt'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册