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

!8948 新增用例

Merge pull request !8948 from 姚翠/master
...@@ -1245,6 +1245,27 @@ export default function windowPromiseTest(context, windowStage, abilityStorage) ...@@ -1245,6 +1245,27 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
done(); done();
} }
}) })
/**
* @tc.number SUB_WINDOW_GETUICONTEXT_JSAPI_001
* @tc.name Test getUIContext_Test_001
* @tc.desc Get the UIContext instance.
*/
it('getUIContext_Test_001', 0, async function (done) {
let caseName = 'getUIContext_Test_001';
let msgStr = 'jsunittest ' + caseName + ' ';
let uiContext=null;
console.log(msgStr + 'begin');
let mainWindow = null
mainWindow = await windowStage.getMainWindow().catch((err) => {
unexpectedError(err, caseName, 'windowStage.getMainWindow', done);
});
expect(!!mainWindow).assertTrue();
// 获取UIContext实例。
uiContext = mainWindow.getUIContext();
expect(!!uiContext).assertTrue();
console.log(msgStr + 'after uiContext: '+JSON.stringify(uiContext));
done();
})
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册