提交 bdef59e2 编写于 作者: 华华小仙女

1.优化displayAndWindowRefactorInterface.test用例setWindowModeTest2 2、补充callback用例createTest5的描述

Signed-off-by: N华华小仙女 <zhurong18@h-partners.com>
上级 cb38c5c8
......@@ -1921,11 +1921,12 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
expect(!!wnd).assertTrue();
let loopCount = windowModeArr;
console.log(msgStr + 'ohosWindow.windowType' + JSON.stringify(loopCount))
for (let i = 0; i < loopCount.length; i++) {
sleep(500)
let tempType = ohosWindow.WindowMode[loopCount[i]];
console.log(msgStr + 'tempWnd.setWindowMode ' + tempType + ' start');
getData(0, loopCount.length)
function getData(i, length) {
try {
let tempType = ohosWindow.WindowMode[loopCount[i]];
console.log(msgStr + 'tempWnd.setWindowMode tempType:' + tempType + ' start i:' + i);
wnd.setWindowMode(tempType, (err, data) => {
if (err && err.code) {
console.log(msgStr + 'currentType: ' + tempType)
......@@ -1937,11 +1938,16 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
console.info(msgStr + 'Succeeded in setting the window mode. loopCount.length: ' + loopCount.length);
if (sumCount == loopCount.length) done();
}
if (++i < length) {
getData(i, length)
console.log(msgStr + 'jixuzhixing i: ' + i);
} else {
console.log(msgStr + 'i++<length i: ' + i + ' ,length:' + length + ' ,tempType:' + tempType);
}
})
} catch (exception) {
console.error(msgStr + 'try catch Failed to set the window mode. Cause: ' + JSON.stringify(exception));
}
;
}
} catch (exception) {
console.error(msgStr + 'try catch Failed to create the window. Cause: ' + JSON.stringify(exception));
......
......@@ -955,7 +955,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
/**
* @tc.number SUB_WINDOW_CREATE_JSAPI_005
* @tc.name Test create5
* @tc.desc Verify the scenario of creating the application type window
* @tc.desc Scheme of Failed to Create Application Type Window in Stage Mode
*/
it('createTest5', 0, done => {
let caseName = 'createTest5';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册