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

!4292 XTS元能力失败用例适配

Merge pull request !4292 from chengxingzhen/master
......@@ -132,7 +132,7 @@ export default function ActsAmsCallBackFifthScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -76,7 +76,7 @@ export default function ActsAmsCallBackFirstScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -127,7 +127,7 @@ export default function ActsAmsCallBackFourthScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -93,7 +93,7 @@ export default function ActsAmsCallBackSecondScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -87,7 +87,7 @@ export default function ActsAmsCallBackThirdScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -144,7 +144,7 @@ export default function ActsAmsTestFifthScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -78,7 +78,7 @@ export default function ActsAmsTestFirstScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -144,7 +144,7 @@ export default function ActsAmsTestFourthScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -100,7 +100,7 @@ export default function ActsAmsTestSecondScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -102,7 +102,7 @@ export default function ActsAmsTestThirdScene() {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
......
......@@ -35,6 +35,7 @@ describe('ActsDataAbilityHelperTest', function () {
console.debug('ACTS_beforeAll DAHelper ====>: ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper));
if(DAHelper == null){
console.debug('ACTS_beforeAll DAHelper ====>: DAHelper == null');
return;
}
} catch (err) {
console.error('=ACTS_beforeAll acquireDataAbilityHelper catch(err)====>:' + err);
......
......@@ -212,7 +212,7 @@ export default function abilityTest(abilityContext) {
expect(data.formEnabled).assertEqual(false);
expect(data.type).assertEqual(1);
expect(data.subType).assertEqual(0);
expect(data.orientation).assertEqual(0);
expect(data.orientation).assertEqual(2);
expect(data.launchMode).assertEqual(0);
expect(data.permissions.length).assertEqual(0);
expect(data.deviceTypes[0]).assertEqual("phone");
......
......@@ -62,16 +62,17 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
tempDataC = dataC[0];
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.message).assertEqual(ERR_OK);
done();
console.log(`==========${callbackName} ${describeName} end==========`);
});
await sleep(2000)
checkDataB(tempDataB)
checkDataC(tempDataC)
done();
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
expect().assertFail();
done();
}
});
......@@ -110,6 +111,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
expect().assertFail();
done();
}
});
function checkDataB(formInfo){
......@@ -121,9 +123,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_b').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_AUTO).assertEqual(formInfo.colorMode)
expect(1).assertEqual(formInfo.isDefault)
expect(1).assertEqual(formInfo.updateEnabled)
expect(1).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertTrue()
expect(formInfo.updateEnabled).assertTrue()
expect(formInfo.formVisibleNotify).assertTrue()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityb").assertEqual(formInfo.formConfigAbility)
expect(3).assertEqual(formInfo.updateDuration)
......@@ -131,8 +133,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect('10:30').assertEqual(formInfo.scheduledUpdateTime)
expect(1).assertEqual(formInfo.supportDimensions[0])
expect(2).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueB').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameB').assertEqual(formInfo.customizeData[0].name)
expect('valueB').assertEqual(formInfo.customizeData[0].value)
}
function checkDataC(formInfo){
expect("com.ohos.st.formsystemproviderc").assertEqual(formInfo.bundleName)
......@@ -143,9 +145,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_c').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_LIGHT).assertEqual(formInfo.colorMode)
expect(1).assertEqual(formInfo.isDefault)
expect(1).assertEqual(formInfo.updateEnabled)
expect(1).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertTrue()
expect(formInfo.updateEnabled).assertTrue()
expect(formInfo.formVisibleNotify).assertTrue()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityc").assertEqual(formInfo.formConfigAbility)
expect(4).assertEqual(formInfo.updateDuration)
......@@ -153,8 +155,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(3).assertEqual(formInfo.defaultDimension)
expect(3).assertEqual(formInfo.supportDimensions[0])
expect(4).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameC').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueC').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameC').assertEqual(formInfo.customizeData[0].name)
expect('valueC').assertEqual(formInfo.customizeData[0].value)
}
});
};
......@@ -74,6 +74,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
expect().assertFail();
done();
}
});
......@@ -115,6 +116,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
expect().assertFail();
done();
}
});
......@@ -127,9 +129,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_b').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_AUTO).assertEqual(formInfo.colorMode)
expect(1).assertEqual(formInfo.isDefault)
expect(1).assertEqual(formInfo.updateEnabled)
expect(1).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertTrue()
expect(formInfo.updateEnabled).assertTrue()
expect(formInfo.formVisibleNotify).assertTrue()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityb").assertEqual(formInfo.formConfigAbility)
expect(3).assertEqual(formInfo.updateDuration)
......@@ -137,8 +139,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect('10:30').assertEqual(formInfo.scheduledUpdateTime)
expect(1).assertEqual(formInfo.supportDimensions[0])
expect(2).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueB').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameB').assertEqual(formInfo.customizeData[0].name)
expect('valueB').assertEqual(formInfo.customizeData[0].value)
}
function checkDataA1(formInfo){
......@@ -150,9 +152,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_a01').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_DARK).assertEqual(formInfo.colorMode)
expect(1).assertEqual(formInfo.isDefault)
expect(1).assertEqual(formInfo.updateEnabled)
expect(1).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertTrue()
expect(formInfo.updateEnabled).assertTrue()
expect(formInfo.formVisibleNotify).assertTrue()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilitya01").assertEqual(formInfo.formConfigAbility)
expect(1).assertEqual(formInfo.updateDuration)
......@@ -160,8 +162,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect('5:30').assertEqual(formInfo.scheduledUpdateTime)
expect(1).assertEqual(formInfo.supportDimensions[0])
expect(3).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameA01').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueA01').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameA01').assertEqual(formInfo.customizeData[0].name)
expect('valueA01').assertEqual(formInfo.customizeData[0].value)
}
function checkDataA2(formInfo){
......@@ -173,9 +175,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_a02').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_LIGHT).assertEqual(formInfo.colorMode)
expect(0).assertEqual(formInfo.isDefault)
expect(0).assertEqual(formInfo.updateEnabled)
expect(0).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertFalse()
expect(formInfo.updateEnabled).assertFalse()
expect(formInfo.formVisibleNotify).assertFalse()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilitya02").assertEqual(formInfo.formConfigAbility)
expect(2).assertEqual(formInfo.updateDuration)
......@@ -185,8 +187,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(2).assertEqual(formInfo.supportDimensions[1])
expect(3).assertEqual(formInfo.supportDimensions[2])
expect(4).assertEqual(formInfo.supportDimensions[3])
expect('originWidgetNameA02').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueA02').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameA02').assertEqual(formInfo.customizeData[0].name)
expect('valueA02').assertEqual(formInfo.customizeData[0].value)
}
});
};
......@@ -68,6 +68,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
expect().assertFail();
done();
}
});
......@@ -118,9 +119,9 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_b').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_AUTO).assertEqual(formInfo.colorMode)
expect(1).assertEqual(formInfo.isDefault)
expect(1).assertEqual(formInfo.updateEnabled)
expect(1).assertEqual(formInfo.formVisibleNotify)
expect(formInfo.isDefault).assertTrue()
expect(formInfo.updateEnabled).assertTrue()
expect(formInfo.formVisibleNotify).assertTrue()
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityb").assertEqual(formInfo.formConfigAbility)
expect(3).assertEqual(formInfo.updateDuration)
......@@ -128,8 +129,8 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
expect('10:30').assertEqual(formInfo.scheduledUpdateTime)
expect(1).assertEqual(formInfo.supportDimensions[0])
expect(2).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueB').assertEqual(formInfo.metaData.customizeData[0].value)
expect('originWidgetNameB').assertEqual(formInfo.customizeData[0].name)
expect('valueB').assertEqual(formInfo.customizeData[0].value)
}
});
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册