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

删除@ts-nocheck字段

Signed-off-by: N华华小仙女 <zhurong18@h-partners.com>
上级 df5929ce
...@@ -1454,7 +1454,10 @@ export default function windowPromiseTest(context, windowStage, abilityStorage) ...@@ -1454,7 +1454,10 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
}); });
console.log(msgStr + 'windowStage.getMainWindow :' + JSON.stringify(mainWin)); console.log(msgStr + 'windowStage.getMainWindow :' + JSON.stringify(mainWin));
expect(!!mainWin).assertTrue(); expect(!!mainWin).assertTrue();
let orientationItem = ['UNSPECIFIED', 'PORTRAIT', 'LANDSCAPE']; let num = 0
let orientationItem = ['UNSPECIFIED', 'PORTRAIT', 'LANDSCAPE', 'PORTRAIT_INVERTED',
'LANDSCAPE_INVERTED', 'AUTO_ROTATION', 'AUTO_ROTATION_PORTRAIT', 'AUTO_ROTATION_LANDSCAPE',
'AUTO_ROTATION_RESTRICTED', 'AUTO_ROTATION_PORTRAIT_RESTRICTED', 'AUTO_ROTATION_LANDSCAPE_RESTRICTED', 'LOCKED', 'UNSPECIFIED'];
for (let i = 0;i < orientationItem.length; i++) { for (let i = 0;i < orientationItem.length; i++) {
await sleep(1000); await sleep(1000);
let orientation = ohosWindow.Orientation[orientationItem[i]] let orientation = ohosWindow.Orientation[orientationItem[i]]
...@@ -1462,12 +1465,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage) ...@@ -1462,12 +1465,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
console.log(msgStr + 'i : ' + i + ' ,ohosWindow.Orientation : ' + JSON.stringify(ohosWindow.Orientation)); console.log(msgStr + 'i : ' + i + ' ,ohosWindow.Orientation : ' + JSON.stringify(ohosWindow.Orientation));
await mainWin.setPreferredOrientation(orientation).then(() => { await mainWin.setPreferredOrientation(orientation).then(() => {
console.log(msgStr + 'success set window.setPreferredOrientation : ' + orientation); console.log(msgStr + 'success set window.setPreferredOrientation : ' + orientation);
num++
if(num == orientationItem.length) done();
}).catch(err => { }).catch(err => {
console.log(msgStr + 'window.setPreferredOrientation failed set error:' + orientation); console.log(msgStr + 'window.setPreferredOrientation failed set error:' + orientation);
}); });
} }
console.log(msgStr + 'done ');
done();
}) })
/** /**
* @tc.number SUB_WINDOW_SETFORBIDSPLITMOVE_JSAPI_001 * @tc.number SUB_WINDOW_SETFORBIDSPLITMOVE_JSAPI_001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册