提交 ef14e9c8 编写于 作者: Mupceet's avatar Mupceet

Merge branch 'release_1015_xts' of https://gitee.com/mupceet/xts_acts into release_1015_xts

...@@ -19,19 +19,18 @@ group("barrierfree") { ...@@ -19,19 +19,18 @@ group("barrierfree") {
deps = [ deps = [
"accessibilityconfig:ActsAccessibilityConfigTest", "accessibilityconfig:ActsAccessibilityConfigTest",
"accessibilityconfigreqreadpermission:ActsAccessibilityConfigReqReadPermissionTest", "accessibilityconfigreqreadpermission:ActsAccessibilityConfigReqReadPermissionTest",
#"accessibilityconfigreqwritepermission:ActsAccessibilityConfigReqWritePermissionTest",
"accessibilityelement:ActsAccessibilityElementTest", "accessibilityelement:ActsAccessibilityElementTest",
"accessibilityerrcode:ActsAccessibilityErrCodeTest",
"accessibilityevent:ActsAccessibilityEventTest", "accessibilityevent:ActsAccessibilityEventTest",
"accessibilityextension:ActsAccessibilityExtensionTest", "accessibilityextension:ActsAccessibilityExtensionTest",
"accessibilityextensioncontext:ActsAccessibilityExtensionContextTest", "accessibilityextensioncontext:ActsAccessibilityExtensionContextTest",
"accessibilitygestureevent:ActsAccessibilityGestureEventTest", "accessibilitygestureevent:ActsAccessibilityGestureEventTest",
"accessibilitysendaccessibilityevent:ActsAccessibilitySendAccessibilityEventTest",
"accessibleabilitylist:ActsAccessibleAbilityListTest", "accessibleabilitylist:ActsAccessibleAbilityListTest",
"accessiblecaptionconfiguration:ActsAccessibleCaptionConfigurationTest", "accessiblecaptionconfiguration:ActsAccessibleCaptionConfigurationTest",
"accessiblecheckability:ActsAccessibleCheckAbilityTest", "accessiblecheckability:ActsAccessibleCheckAbilityTest",
"accessibleregisterstate:ActsAccessibleRegisterStateTest", "accessibleregisterstate:ActsAccessibleRegisterStateTest",
"accessiblesendevent:ActsAccessibleSendEventTest", "accessiblesendevent:ActsAccessibleSendEventTest",
"accessibilityerrcode:ActsAccessibilityErrCodeTest",
"accessibilitysendaccessibilityevent:ActsAccessibilitySendAccessibilityEventTest",
"accessibletest:actsaccessibletest", "accessibletest:actsaccessibletest",
"targetProject/aceTest:aceTest", "targetProject/aceTest:aceTest",
] ]
......
...@@ -743,8 +743,8 @@ export class ElementTest { ...@@ -743,8 +743,8 @@ export class ElementTest {
} }
} catch (e) { } catch (e) {
console.info('ElementTest executePerformActionPromise ' + caseName + ' catch(e): ' + JSON.stringify(e)); console.info('ElementTest executePerformActionPromise ' + caseName + ' catch(e): ' + JSON.stringify(e));
if (action == invalidString && e && e.code != 0) { if (e && e.code != 0) {
if (e.code == 9300005) { if (e.code == 9300005 || e.code == 9300000) {
result = true; result = true;
} }
result = true; result = true;
...@@ -854,7 +854,9 @@ export class ElementTest { ...@@ -854,7 +854,9 @@ export class ElementTest {
element.attributeNames((err, names) => { element.attributeNames((err, names) => {
console.info('ElementTest executeAttributeNamesCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeNamesCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeNamesCallback ' + caseName + ' names: ' + JSON.stringify(names)); console.info('ElementTest executeAttributeNamesCallback ' + caseName + ' names: ' + JSON.stringify(names));
if (err.code == 0 && Array.isArray(names)) { if (err && err.code != 0) {
result = false;
} else if (Array.isArray(names)) {
result = true; result = true;
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
...@@ -877,9 +879,9 @@ export class ElementTest { ...@@ -877,9 +879,9 @@ export class ElementTest {
element.attributeValue(input, (err, value) => { element.attributeValue(input, (err, value) => {
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value));
if (input == invalidString && err && err.code != 0) { if (err && err.code != 0) {
result = true; result = true;
} else if (err.code == 0 && typeof(value) == outputType) { } else if (typeof(value) == outputType) {
result = true; result = true;
} else { } else {
console.warn('ElementTest executeAttributeValueCallback ' + caseName + ' valueType: ' + typeof(value)); console.warn('ElementTest executeAttributeValueCallback ' + caseName + ' valueType: ' + typeof(value));
...@@ -903,10 +905,10 @@ export class ElementTest { ...@@ -903,10 +905,10 @@ export class ElementTest {
element.attributeValue(input, (err, value) => { element.attributeValue(input, (err, value) => {
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value));
if (err.code == 0 && typeof(value) == 'object' && typeof(value.left) == 'number' if (typeof(value) == 'object' && typeof(value.left) == 'number'
&& typeof(value.top) == 'number' && typeof(value.width) == 'number' && typeof(value.height) == 'number') { && typeof(value.top) == 'number' && typeof(value.width) == 'number' && typeof(value.height) == 'number') {
result = true; result = true;
} else { } else if (err) {
console.warn('ElementTest executeAttributeValueCallbackRect ' + caseName + ' valueType: ' + typeof(value)); console.warn('ElementTest executeAttributeValueCallbackRect ' + caseName + ' valueType: ' + typeof(value));
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
...@@ -932,7 +934,9 @@ export class ElementTest { ...@@ -932,7 +934,9 @@ export class ElementTest {
target.attributeValue('triggerAction', (err, value) => { target.attributeValue('triggerAction', (err, value) => {
console.info('ElementTest executeAttributeValueCallbackTriggerAction ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeValueCallbackTriggerAction ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeValueCallbackTriggerAction ' + caseName + ' valueType: ' + typeof(value)); console.info('ElementTest executeAttributeValueCallbackTriggerAction ' + caseName + ' valueType: ' + typeof(value));
if (err.code == 0 && eventType == 'click' && typeof(value) == 'string') { if (err) {
this.publishCaseResult(caseName, false);
} else if (eventType == 'click' && typeof(value) == 'string') {
this.publishCaseResult(caseName, true); this.publishCaseResult(caseName, true);
} }
}); });
...@@ -964,7 +968,9 @@ export class ElementTest { ...@@ -964,7 +968,9 @@ export class ElementTest {
element.attributeValue('rootElement', (err, value) => { element.attributeValue('rootElement', (err, value) => {
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value)); console.info('ElementTest executeAttributeValueCallback ' + caseName + ' value: ' + JSON.stringify(value));
if (err.code == 0 && typeof(value) == 'object') { if (err) {
let result = false;
} else if (typeof(value) == 'object') {
result = true; result = true;
} else { } else {
console.warn('ElementTest executeAttributeValueCallback ' + caseName + ' valueType: ' + typeof(value)); console.warn('ElementTest executeAttributeValueCallback ' + caseName + ' valueType: ' + typeof(value));
...@@ -982,7 +988,9 @@ export class ElementTest { ...@@ -982,7 +988,9 @@ export class ElementTest {
element.attributeValue(input, (err, value) => { element.attributeValue(input, (err, value) => {
console.info('ElementTest executeAttributeValueCallbackArray ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeAttributeValueCallbackArray ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeAttributeValueCallbackArray ' + caseName + ' value: ' + JSON.stringify(value)); console.info('ElementTest executeAttributeValueCallbackArray ' + caseName + ' value: ' + JSON.stringify(value));
if (err.code == 0 && Array.isArray(value)) { if (err) {
let result = false;
} else if (Array.isArray(value)) {
if ((value.length == 0)|| if ((value.length == 0)||
(value.length > 0 && typeof(value[0]) == outputType)) { (value.length > 0 && typeof(value[0]) == outputType)) {
result = true; result = true;
...@@ -1000,7 +1008,7 @@ export class ElementTest { ...@@ -1000,7 +1008,7 @@ export class ElementTest {
element.actionNames((err, actions) => { element.actionNames((err, actions) => {
console.info('ElementTest executeActionNamesCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeActionNamesCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeActionNamesCallback ' + caseName + ' actions: ' + JSON.stringify(actions)); console.info('ElementTest executeActionNamesCallback ' + caseName + ' actions: ' + JSON.stringify(actions));
if (err.code == 0 && Array.isArray(actions)) { if (Array.isArray(actions)) {
if ((actions.length == 0) || if ((actions.length == 0) ||
(actions.length > 0 && typeof(actions[0]) == 'string')) { (actions.length > 0 && typeof(actions[0]) == 'string')) {
result = true; result = true;
...@@ -1020,12 +1028,12 @@ export class ElementTest { ...@@ -1020,12 +1028,12 @@ export class ElementTest {
element.performAction(action, args, (err, ret) => { element.performAction(action, args, (err, ret) => {
console.info('ElementTest executePerformActionCallback ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executePerformActionCallback ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executePerformActionCallback ' + caseName + ' ret: ' + JSON.stringify(ret)); console.info('ElementTest executePerformActionCallback ' + caseName + ' ret: ' + JSON.stringify(ret));
if (action == invalidString && err && err.code != 0) { if (err && err.code != 0) {
if (err.code == 9300005) { if (err.code == 9300005 || err.code == 9300000) {
result = true; result = true;
} }
result = true; result = true;
} else if (err.code == 0 && typeof(ret) == 'undefined') { } else if (typeof(ret) == 'undefined') {
result = true; result = true;
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
...@@ -1043,7 +1051,7 @@ export class ElementTest { ...@@ -1043,7 +1051,7 @@ export class ElementTest {
console.info('ElementTest executeFindElementCallbackByContent ' + caseName + ' element: ' + JSON.stringify(found)); console.info('ElementTest executeFindElementCallbackByContent ' + caseName + ' element: ' + JSON.stringify(found));
if (condition == invalidString && err && err.code != 0) { if (condition == invalidString && err && err.code != 0) {
result = true; result = true;
} else if (err.code == 0 && Array.isArray(found)) { } else if (Array.isArray(found)) {
if (found.length == 0 || typeof(found[0]) == 'object') { if (found.length == 0 || typeof(found[0]) == 'object') {
result = true; result = true;
} }
...@@ -1067,7 +1075,7 @@ export class ElementTest { ...@@ -1067,7 +1075,7 @@ export class ElementTest {
console.info('ElementTest executeFindElementCallbackByFocusType ' + caseName + ' element: ' + JSON.stringify(found)); console.info('ElementTest executeFindElementCallbackByFocusType ' + caseName + ' element: ' + JSON.stringify(found));
if (condition == invalidString && err && err.code != 0) { if (condition == invalidString && err && err.code != 0) {
result = true; result = true;
} else if (err.code == 0 && typeof(found) == 'object') { } else if (typeof(found) == 'object') {
result = true; result = true;
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
...@@ -1092,7 +1100,7 @@ export class ElementTest { ...@@ -1092,7 +1100,7 @@ export class ElementTest {
console.info('ElementTest executeFindElementCallbackByFocusDirection ' + caseName + ' element: ' + JSON.stringify(found)); console.info('ElementTest executeFindElementCallbackByFocusDirection ' + caseName + ' element: ' + JSON.stringify(found));
if (condition == invalidString && err.code != 0) { if (condition == invalidString && err.code != 0) {
result = true; result = true;
} else if (err.code == 0 && typeof(found) == 'object') { } else if (typeof(found) == 'object') {
result = true; result = true;
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
...@@ -1113,7 +1121,9 @@ export class ElementTest { ...@@ -1113,7 +1121,9 @@ export class ElementTest {
element.findElement('focusDirection', 'down', (err, found) => { element.findElement('focusDirection', 'down', (err, found) => {
console.info('ElementTest executeFindElementCallback5900 ' + caseName + ' err: ' + JSON.stringify(err)); console.info('ElementTest executeFindElementCallback5900 ' + caseName + ' err: ' + JSON.stringify(err));
console.info('ElementTest executeFindElementCallback5900 ' + caseName + ' element: ' + JSON.stringify(found)); console.info('ElementTest executeFindElementCallback5900 ' + caseName + ' element: ' + JSON.stringify(found));
if (err.code == 0 && typeof(found) == 'object') { if (err && err.code != 0) {
}if (typeof(found) == 'object') {
result = true; result = true;
} }
this.publishCaseResult(caseName, result); this.publishCaseResult(caseName, result);
......
# Copyright (c) 2022 Huawei Device Co., Ltd. # Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # 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") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsAccessibilityErrCodeTest") { ohos_js_hap_suite("ActsAccessibilityErrCodeTest") {
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
deps = [ deps = [
":accessibilityerrcode_js_assets", ":accessibilityerrcode_js_assets",
":accessibilityerrcode_resources", ":accessibilityerrcode_resources",
] ]
ets2abc = true ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b" certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsAccessibilityErrCodeTest" hap_name = "ActsAccessibilityErrCodeTest"
part_name = "accessibility" part_name = "accessibility"
subsystem_name = "barrierfree" subsystem_name = "barrierfree"
} }
ohos_app_scope("accessibilityerrcode_app_profile") { ohos_app_scope("accessibilityerrcode_app_profile") {
app_profile = "AppScope/app.json" app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ] sources = [ "AppScope/resources" ]
} }
ohos_js_assets("accessibilityerrcode_js_assets") { ohos_js_assets("accessibilityerrcode_js_assets") {
source_dir = "entry/src/main/ets" source_dir = "entry/src/main/ets"
} }
ohos_resources("accessibilityerrcode_resources") { ohos_resources("accessibilityerrcode_resources") {
sources = [ "entry/src/main/resources" ] sources = [ "entry/src/main/resources" ]
deps = [ ":accessibilityerrcode_app_profile" ] deps = [ ":accessibilityerrcode_app_profile" ]
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
} }
# Copyright (c) 2022 Huawei Device Co., Ltd. # Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # 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") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsAccessibilitySendAccessibilityEventTest") { ohos_js_hap_suite("ActsAccessibilitySendAccessibilityEventTest") {
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
deps = [ deps = [
":accessibilitysendaccessibilityevent_js_assets", ":accessibilitysendaccessibilityevent_js_assets",
":accessibilitysendaccessibilityevent_resources", ":accessibilitysendaccessibilityevent_resources",
] ]
ets2abc = true ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b" certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsAccessibilitySendAccessibilityEventTest" hap_name = "ActsAccessibilitySendAccessibilityEventTest"
part_name = "accessibility" part_name = "accessibility"
subsystem_name = "barrierfree" subsystem_name = "barrierfree"
} }
ohos_app_scope("accessibilitysendaccessibilityevent_app_profile") { ohos_app_scope("accessibilitysendaccessibilityevent_app_profile") {
app_profile = "AppScope/app.json" app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ] sources = [ "AppScope/resources" ]
} }
ohos_js_assets("accessibilitysendaccessibilityevent_js_assets") { ohos_js_assets("accessibilitysendaccessibilityevent_js_assets") {
source_dir = "entry/src/main/ets" source_dir = "entry/src/main/ets"
} }
ohos_resources("accessibilitysendaccessibilityevent_resources") { ohos_resources("accessibilitysendaccessibilityevent_resources") {
sources = [ "entry/src/main/resources" ] sources = [ "entry/src/main/resources" ]
deps = [ ":accessibilitysendaccessibilityevent_app_profile" ] deps = [ ":accessibilitysendaccessibilityevent_app_profile" ]
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册