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

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

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