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

!7043 【窗口子系统】修改枚举测试用例字段

Merge pull request !7043 from hekun/master
......@@ -2082,5 +2082,25 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
}
;
})
/**
* @tc.number SUB_WMS_ENUM_WINDOWSTAGEEVENTTYPERENAME_JSAPI_001
* @tc.name Test enumWindowStageEventTypeReName_Test_001.
* @tc.desc To test the enum value of WindowStageEventType.
*/
it('enumWindowStageEventTypeReName_Test_001', 0, async function (done) {
console.info('test the enum value of WindowStageEventType begin');
try {
expect(1).assertEqual(ohosWindow.WindowStageEventType.SHOWN);
expect(2).assertEqual(ohosWindow.WindowStageEventType.ACTIVE);
expect(3).assertEqual(ohosWindow.WindowStageEventType.INACTIVE);
expect(4).assertEqual(ohosWindow.WindowStageEventType.HIDDEN);
done();
} catch (err) {
console.info('test enum value of windowStageEventType error ' + JSON.stringify(err));
expect().assertFail();
done();
}
})
})
}
......@@ -1251,6 +1251,7 @@ describe('window_test', function () {
expect(wnd != null).assertTrue();
wnd.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
wnd.destroy();
done();
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
......@@ -1280,6 +1281,7 @@ describe('window_test', function () {
console.log('windowTest CreateTest2 callback create success data' + data);
data.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
data.destroy();
done();
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
......@@ -1930,10 +1932,10 @@ describe('window_test', function () {
it('enumWindowStageEventType_Test_001', 0, async function (done) {
console.log('test the enum value of WindowStageEventType begin');
try {
expect(1).assertEqual(window.WindowStageEventType.FOREGROUND);
expect(1).assertEqual(window.WindowStageEventType.SHOWN);
expect(2).assertEqual(window.WindowStageEventType.ACTIVE);
expect(3).assertEqual(window.WindowStageEventType.INACTIVE);
expect(4).assertEqual(window.WindowStageEventType.BACKGROUND);
expect(4).assertEqual(window.WindowStageEventType.HIDDEN);
done();
} catch (err) {
console.log('test enum value of windowStageEventType error ' + JSON.stringify(err));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册