未验证 提交 0b4ee485 编写于 作者: O openharmony_ci 提交者: Gitee

!6757 【窗口子系统】优化setWindowModeTest2用例和createTest5用例

Merge pull request !6757 from 华华小仙女/master
......@@ -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.
先完成此消息的编辑!
想要评论请 注册