提交 a7b6442a 编写于 作者: H hekun

fix the test case

Signed-off-by: Nhekun <hekun18@huawei.com>
上级 b82d5746
...@@ -2082,5 +2082,25 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta ...@@ -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 () { ...@@ -1251,6 +1251,7 @@ describe('window_test', function () {
expect(wnd != null).assertTrue(); expect(wnd != null).assertTrue();
wnd.resetSize(400, 400).then(() => { wnd.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success'); console.log('windowTest resetSize wnd.resetSize(400, 400) success');
wnd.destroy();
done(); done();
}, (err_resetSize) => { }, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize)); console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
...@@ -1280,6 +1281,7 @@ describe('window_test', function () { ...@@ -1280,6 +1281,7 @@ describe('window_test', function () {
console.log('windowTest CreateTest2 callback create success data' + data); console.log('windowTest CreateTest2 callback create success data' + data);
data.resetSize(400, 400).then(() => { data.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success'); console.log('windowTest resetSize wnd.resetSize(400, 400) success');
data.destroy();
done(); done();
}, (err_resetSize) => { }, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize)); console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
...@@ -1930,10 +1932,10 @@ describe('window_test', function () { ...@@ -1930,10 +1932,10 @@ describe('window_test', function () {
it('enumWindowStageEventType_Test_001', 0, async function (done) { it('enumWindowStageEventType_Test_001', 0, async function (done) {
console.log('test the enum value of WindowStageEventType begin'); console.log('test the enum value of WindowStageEventType begin');
try { try {
expect(1).assertEqual(window.WindowStageEventType.FOREGROUND); expect(1).assertEqual(window.WindowStageEventType.SHOWN);
expect(2).assertEqual(window.WindowStageEventType.ACTIVE); expect(2).assertEqual(window.WindowStageEventType.ACTIVE);
expect(3).assertEqual(window.WindowStageEventType.INACTIVE); expect(3).assertEqual(window.WindowStageEventType.INACTIVE);
expect(4).assertEqual(window.WindowStageEventType.BACKGROUND); expect(4).assertEqual(window.WindowStageEventType.HIDDEN);
done(); done();
} catch (err) { } catch (err) {
console.log('test enum value of windowStageEventType error ' + JSON.stringify(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.
先完成此消息的编辑!
想要评论请 注册