提交 c7b26b0d 编写于 作者: C chengxingzhen

XTS元能力失败用例适配

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