提交 b40d57d6 编写于 作者: M Mupceet

fix format check

Signed-off-by: NMupceet <laiguizhong@huawei.com>
上级 c9b6531e
...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册