未验证 提交 f69178b3 编写于 作者: O openharmony_ci 提交者: Gitee

!5426 多模子系统xts新框架适配

Merge pull request !5426 from 岳鑫瑶/master
......@@ -9,7 +9,7 @@
# 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.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......@@ -25,7 +25,9 @@ ohos_js_hap_suite("multimodalinput_js_test") {
part_name = "input"
}
ohos_js_assets("multimodalinput_js_assets") {
source_dir = "./src/main/js/default"
js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
}
ohos_resources("multimodalinput_js_resources") {
sources = [ "./src/main/resources" ]
......
{
"description": "Configuration for multimodalinput js api Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "160000",
"package": "ohos.acts.multimodalinput.input",
"shell-timeout": "60000"
"type": "OHJSUnitTest",
"bundle-name": "ohos.acts.multimodalinput.input",
"package-name": "ohos.acts.multimodalinput.input",
"test-timeout": "300000",
"shell-timeout": "300000",
"testcase-timeout": 60000
},
"kits": [
{
......
......@@ -14,7 +14,9 @@
"deviceConfig": {},
"module": {
"package": "ohos.acts.multimodalinput.input",
"name": ".MyApplication",
"name": ".entry",
"mainAbility":".MainAbility",
"srcPath":"",
"deviceType": [
"phone"
],
......@@ -25,23 +27,40 @@
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "ohos.acts.multimodalinput.input.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"formsEnabled": false,
"name": ".MainAbility",
"srcLanguage": "js",
"srcPath": "MainAbility",
"icon": "$media:icon",
"description": "$string:MainAbility_desc",
"label": "$string:MainAbility_label",
"type": "page",
"visible": true,
"launchType": "standard"
},
{
"orientation": "unspecified",
"formsEnabled": false,
"name": ".TestAbility",
"srcLanguage": "js",
"srcPath": "TestAbility",
"icon": "$media:icon",
"description": "$string:TestAbility_desc",
"label": "$string:TestAbility_label",
"type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
......@@ -54,7 +73,21 @@
"designWidth": 720,
"autoDesignWidth": false
}
},
{
"pages": [
"pages/index/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
],
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
}
}
}
/*
* Copyright (C) 2022 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/ListMultimodalinput.test'
export default {
onCreate() {
console.info('Application onCreate1111')
let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
let abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
......@@ -13,10 +13,7 @@
* limitations under the License.
*/
import { Core, ExpectExtend } from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default {
data: {
......@@ -25,22 +22,10 @@ export default {
onInit() {
this.title = this.$t('strings.world');
},
onActive() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
this.timeout = 5000
configService.setConfig(this)
require('../../test/ListMultimodalinput.test')
core.execute()
onShow() {
console.info('onShow finish')
},
onReady() {
console.info('onReady');
},
}
/*
* Copyright (C) 2022 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 default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
/*
* Copyright (c) 2022 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 default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
},
"Files": {
}
}
\ No newline at end of file
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
\ No newline at end of file
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* Copyright (c) 2022 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.
*/
require('./InputDevice.test.js')
require('./MultimodalInputKey_Code.test.js')
require('./Pointer.test.js')
/*
* Copyright (c) 2022 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 default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
}
}
/*
* Copyright (c) 2022 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
function translateParamsToString(parameters) {
const keySet = new Set([
'-s class', '-s notClass', '-s suite', '-s itName',
'-s level', '-s testType', '-s size', '-s timeout',
'-s package', '-s dryRun'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams += ' ' + key + ' ' + parameters[key]
}
}
return targetParams.trim()
}
export default {
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
},
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.MainAbility'
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
var debug = abilityDelegatorArguments.parameters["-D"]
console.info('debug value : '+debug)
if (debug == 'true')
{
cmd += ' -D'
}
console.info('cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd, (err, data) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + data.stdResult);
console.info('executeShellCommand : data : ' + data.exitCode);
})
}
};
/*
* Copyright (c) 2022 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 inputkeyCode from '@ohos.multimodalInput.keyCode'
import keyEvent from '@ohos.multimodalInput.keyEvent'
import mouseEvent from '@ohos.multimodalInput.mouseEvent'
import touchEvent from '@ohos.multimodalInput.touchEvent'
import { Key, KeyEvent } from '@ohos.multimodalInput.keyEvent'
import { AxisValue, MouseEvent } from '@ohos.multimodalInput.mouseEvent'
import { Touch, TouchEvent } from '@ohos.multimodalInput.touchEvent'
import {
describe,
beforeAll,
beforeEach,
afterEach,
afterAll,
it,
expect
} from 'deccjsunit/index'
describe('MultimodalInput_test', function () {
it('MultimodalInput_test::KeyEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0010 enter`);
expect(keyEvent.Action.CANCEL == 0).assertTrue();
expect(keyEvent.Action.DOWN == 1).assertTrue();
expect(keyEvent.Action.UP == 2).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::KeyEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0020 enter`);
let testKey: Key = { code: inputkeyCode.KeyCode.KEYCODE_FN, pressedTime: 10, deviceId: 1 };
expect(testKey.code == inputkeyCode.KeyCode.KEYCODE_FN).assertTrue();
expect(testKey.pressedTime == 10).assertTrue();
expect(testKey.deviceId == 1).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::KeyEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0030 enter`);
let testKey: Key = { code: inputkeyCode.KeyCode.KEYCODE_FN, pressedTime: 10, deviceId: 1 };
let testKeyEvent: KeyEvent = {
action: keyEvent.Action.DOWN, key: testKey, unicodeChar: 1, keys: [testKey],
ctrlKey: true, altKey: true, shiftKey: true, logoKey: true, fnKey: true, capsLock: true, numLock: true,
scrollLock: true
};
expect(testKeyEvent.action == keyEvent.Action.DOWN).assertTrue();
expect(testKeyEvent.key.code == testKey.code).assertTrue();
expect(testKeyEvent.unicodeChar == 1).assertTrue();
expect(testKeyEvent.keys[0].code == testKey.code).assertTrue();
expect(testKeyEvent.ctrlKey).assertTrue();
expect(testKeyEvent.altKey).assertTrue();
expect(testKeyEvent.shiftKey).assertTrue();
expect(testKeyEvent.logoKey).assertTrue();
expect(testKeyEvent.fnKey).assertTrue();
expect(testKeyEvent.capsLock).assertTrue();
expect(testKeyEvent.numLock).assertTrue();
expect(testKeyEvent.scrollLock).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0010 enter`);
expect(mouseEvent.Action.CANCEL == 0).assertTrue();
expect(mouseEvent.Action.MOVE == 1).assertTrue();
expect(mouseEvent.Action.BUTTON_DOWN == 2).assertTrue();
expect(mouseEvent.Action.BUTTON_UP == 3).assertTrue();
expect(mouseEvent.Action.AXIS_BEGIN == 4).assertTrue();
expect(mouseEvent.Action.AXIS_UPDATE == 5).assertTrue();
expect(mouseEvent.Action.AXIS_END == 6).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter`);
expect(mouseEvent.Button.LEFT == 0).assertTrue();
expect(mouseEvent.Button.MIDDLE == 1).assertTrue();
expect(mouseEvent.Button.RIGHT == 2).assertTrue();
expect(mouseEvent.Button.SIDE == 3).assertTrue();
expect(mouseEvent.Button.EXTRA == 4).assertTrue();
expect(mouseEvent.Button.FORWARD == 5).assertTrue();
expect(mouseEvent.Button.BACK == 6).assertTrue();
expect(mouseEvent.Button.TASK == 6).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0030 enter`);
expect(mouseEvent.Axis.SCROLL_VERTICAL == 0).assertTrue();
expect(mouseEvent.Axis.SCROLL_HORIZONTAL == 1).assertTrue();
expect(mouseEvent.Axis.PINCH == 2).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0040 enter`);
let testAxisValue: AxisValue = { axis: mouseEvent.Axis.SCROLL_VERTICAL, value: 1 };
expect(testAxisValue.axis == mouseEvent.Axis.SCROLL_VERTICAL).assertTrue();
expect(testAxisValue.value == 1).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0040 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0050 enter`);
let testAxisValue: AxisValue = { axis: mouseEvent.Axis.SCROLL_VERTICAL, value: 1 };
let testMouseEvent: MouseEvent = {
action: mouseEvent.Action.CANCEL, screenX: 1, screenY: 1, windowX: 1,
windowY: 1, rawDeltaX: 1, rawDeltaY: 1, button: mouseEvent.Button.LEFT,
pressedButtons: [mouseEvent.Button.LEFT], axes: [testAxisValue],
pressedKeys: [inputkeyCode.KeyCode.KEYCODE_FN], ctrlKey: true, altKey: true, shiftKey: true,
logoKey: true, fnKey: true, capsLock: true, numLock: true, scrollLock: true
};
expect(testMouseEvent.action == mouseEvent.Action.CANCEL).assertTrue();
expect(testMouseEvent.screenX == 1).assertTrue();
expect(testMouseEvent.screenY == 1).assertTrue();
expect(testMouseEvent.windowX == 1).assertTrue();
expect(testMouseEvent.windowY == 1).assertTrue();
expect(testMouseEvent.rawDeltaX == 1).assertTrue();
expect(testMouseEvent.rawDeltaY == 1).assertTrue();
expect(testMouseEvent.button == mouseEvent.Button.LEFT).assertTrue();
expect(testMouseEvent.pressedButtons[0] == mouseEvent.Button.LEFT).assertTrue();
expect(testMouseEvent.axes[0].axis == mouseEvent.Axis.SCROLL_VERTICAL).assertTrue();
expect(testMouseEvent.pressedKeys[0] == inputkeyCode.KeyCode.KEYCODE_FN).assertTrue();
expect(testMouseEvent.ctrlKey).assertTrue();
expect(testMouseEvent.altKey).assertTrue();
expect(testMouseEvent.shiftKey).assertTrue();
expect(testMouseEvent.logoKey).assertTrue();
expect(testMouseEvent.fnKey).assertTrue();
expect(testMouseEvent.capsLock).assertTrue();
expect(testMouseEvent.numLock).assertTrue();
expect(testMouseEvent.scrollLock).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0050 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0010 enter`);
expect(touchEvent.Action.CANCEL == 0).assertTrue();
expect(touchEvent.Action.DOWN == 1).assertTrue();
expect(touchEvent.Action.MOVE == 2).assertTrue();
expect(touchEvent.Action.UP == 3).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0020 enter`);
expect(touchEvent.ToolType.FINGER == 0).assertTrue();
expect(touchEvent.ToolType.PEN == 1).assertTrue();
expect(touchEvent.ToolType.RUBBER == 2).assertTrue();
expect(touchEvent.ToolType.BRUSH == 3).assertTrue();
expect(touchEvent.ToolType.PENCIL == 4).assertTrue();
expect(touchEvent.ToolType.AIRBRUSH == 5).assertTrue();
expect(touchEvent.ToolType.MOUSE == 6).assertTrue();
expect(touchEvent.ToolType.LENS == 7).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0030 enter`);
expect(touchEvent.SourceType.TOUCH_SCREEN == 0).assertTrue();
expect(touchEvent.SourceType.PEN == 1).assertTrue();
expect(touchEvent.SourceType.TOUCH_PAD == 2).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0040 enter`);
let testTouch: Touch = {
id: 1, pressedTime: 1, screenX: 1, screenY: 1, windowX: 1, windowY: 1, pressure: 1,
width: 1, height: 1, tiltX: 1, tiltY: 1, toolX: 1, toolY: 1, toolWidth: 1, toolHeight: 1, rawX: 1,
rawY: 1, toolType: touchEvent.ToolType.FINGER
};
expect(testTouch.id == 1).assertTrue();
expect(touchEvent.pressedTime == 1).assertTrue();
expect(touchEvent.screenX == 1).assertTrue();
expect(touchEvent.screenY == 1).assertTrue();
expect(touchEvent.windowX == 1).assertTrue();
expect(touchEvent.windowY == 1).assertTrue();
expect(touchEvent.pressure == 1).assertTrue();
expect(touchEvent.width == 1).assertTrue();
expect(touchEvent.height == 1).assertTrue();
expect(touchEvent.tiltX == 1).assertTrue();
expect(touchEvent.tiltY == 1).assertTrue();
expect(touchEvent.toolX == 1).assertTrue();
expect(touchEvent.toolY == 1).assertTrue();
expect(touchEvent.toolWidth == 1).assertTrue();
expect(touchEvent.toolHeight == 1).assertTrue();
expect(touchEvent.rawX == 1).assertTrue();
expect(touchEvent.rawY == 1).assertTrue();
expect(touchEvent.toolType == touchEvent.ToolType.FINGER).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0040 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0050 enter`);
let testTouch: Touch = {
id: 1, pressedTime: 1, screenX: 1, screenY: 1, windowX: 1, windowY: 1, pressure: 1,
width: 1, height: 1, tiltX: 1, tiltY: 1, toolX: 1, toolY: 1, toolWidth: 1, toolHeight: 1, rawX: 1,
rawY: 1, toolType: touchEvent.ToolType.FINGER
};
let testTouchEvent: TouchEvent = {
action: touchEvent.Action.CANCEL, touch: testTouch, touches: [testTouch],
sourceType: touchEvent.SourceType.TOUCH_SCREEN
};
expect(testTouchEvent.action == touchEvent.Action.CANCEL).assertTrue();
expect(testTouchEvent.touch.id == 1).assertTrue();
expect(testTouchEvent.touches[0].id == 1).assertTrue();
expect(testTouchEvent.sourceType == touchEvent.SourceType.TOUCH_SCREEN).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0050 exit`);
})
})
......@@ -14,17 +14,9 @@
*/
import inputDevice from '@ohos.multimodalInput.inputDevice';
import {
describe,
beforeAll,
beforeEach,
afterEach,
afterAll,
it,
expect
} from 'deccjsunit/index'
describe('MultimodalInput_test', function () {
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function MultimodalInput_Device_test() {
describe('MultimodalInput_Device_test', function () {
// 参数正确,返回一个数组
it('inputDevice::getDeviceIds_test-01', 0, function () {
......@@ -364,3 +356,4 @@ describe('MultimodalInput_test', function () {
})
})
}
\ No newline at end of file
/*
* Copyright (c) 2022 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 MultimodalInput_Device_test from './InputDevice.test.js'
import MultimodalInput_KeyCode_test from './MultimodalInputKey_Code.test.js'
import MultimodalInput_Pointer_test from './Pointer.test.js'
export default function testsuite() {
MultimodalInput_Device_test()
MultimodalInput_KeyCode_test()
MultimodalInput_Pointer_test()
}
\ No newline at end of file
......@@ -13,17 +13,9 @@
* limitations under the License.
*/
import inputkeyCode from '@ohos.multimodalInput.keyCode';
import {
describe,
beforeAll,
beforeEach,
afterEach,
afterAll,
it,
expect
} from 'deccjsunit/index'
describe('Multimodalinput_KeyCode_test', function () {
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function MultimodalInput_KeyCode_test() {
describe('MultimodalInput_KeyCode_test', function () {
it('Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_0010', 0, function () {
......@@ -820,11 +812,11 @@ describe('Multimodalinput_KeyCode_test', function () {
})
it('Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_1000', 0, function () {
console.info(`Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_100 enter`);
console.info(`Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_1000 enter`);
expect(inputkeyCode.KeyCode.KEYCODE_MOVE_HOME == 2081).assertTrue();
console.info(`Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_100 exit`);
console.info(`Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_1000 exit`);
})
it('Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_101', 0, function () {
......@@ -2667,5 +2659,5 @@ describe('Multimodalinput_KeyCode_test', function () {
console.info(`Multimodalinput_KeyCode_test::SUB_MMI_KeyCodeTest_348 exit`);
})
})
}
......@@ -15,17 +15,9 @@
import pointer from '@ohos.multimodalInput.pointer'
import window from '@ohos.window'
import {
describe,
beforeAll,
beforeEach,
afterEach,
afterAll,
it,
expect
} from 'deccjsunit/index'
describe('MultimodalInput_Pointer_test', function () {
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function MultimodalInput_Pointer_test() {
describe('MultimodalInput_Pointer_test', function () {
it('MultimodalInput_Pointer_test::PointerVisibleTest_001', 0, function () {
console.info(`MultimodalInput_Pointer_test::SetPointerVisibleTest_001 enter`);
......@@ -294,7 +286,6 @@ describe('MultimodalInput_Pointer_test', function () {
console.info('MultimodalInput_Pointer_test::Pointer_MIDDLE_BTN_NORTH_SOUTH_WEST_EAST_test = ' + pointer.PointerStyle.MIDDLE_BTN_NORTH_SOUTH_WEST_EAST);
expect(pointer.PointerStyle.MIDDLE_BTN_NORTH_SOUTH_WEST_EAST == 38).assertTrue();
})
})
}
\ No newline at end of file
......@@ -7,6 +7,22 @@
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "label"
},
{
"name": "TestAbility_desc",
"value": "description"
},
{
"name": "TestAbility_label",
"value": "label"
}
]
}
\ No newline at end of file
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
......@@ -21,16 +21,7 @@ import inputEvent from '@ohos.multimodalInput.inputEvent'
import { Key, KeyEvent } from '@ohos.multimodalInput.keyEvent'
import { AxisValue, MouseEvent } from '@ohos.multimodalInput.mouseEvent'
import { Touch, TouchEvent } from '@ohos.multimodalInput.touchEvent'
import {
describe,
beforeAll,
beforeEach,
afterEach,
afterAll,
it,
expect
} from 'hypium/index'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function MultimodalInputEventTypeTest() {
describe('MultimodalInput_test', function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册