diff --git a/graphic/windowstandard/src/main/js/default/test/window.parameter.js b/graphic/windowstandard/src/main/js/default/test/window.parameter.js index 1ef03b49a03531cf9b4ded43f1df6ab475b16046..12cf04b7366dac1ccfa9903f21fdcd5a4591de8c 100644 --- a/graphic/windowstandard/src/main/js/default/test/window.parameter.js +++ b/graphic/windowstandard/src/main/js/default/test/window.parameter.js @@ -30,9 +30,8 @@ describe('window_test', function(){ /** * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_1900 - * @tc.name Test moveTestNegative - * @tc.desc Test moveTo API function test - * @tc.autor hekun wx874319 + * @tc.name Test moveTestNegative. + * @tc.desc Test window.moveTo API function test. */ it('moveTestNegative', 0,function(){ console.log('jsunittest moveTestNegative begin') @@ -46,4 +45,214 @@ describe('window_test', function(){ }) }) }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2000 + * @tc.name Test resetSizeTestLoop. + * @tc.desc Test window.resetSize API function test. + */ + it('resetSizeLoop', 0, function(){ + var width = 100; + var height = 100; + console.log('jsunittest resetSizeLoop begin') + window.getTopwindow().then(wnd =>{ + console.log('jsunittest resetSizeLoop getTopWindow wnd: ' + wnd) + for (let i = 1; i <= 5; i++){ + width = width * i; + height = height * i; + wnd.resetSize(width, height).then(()=>{ + console.log('jsunittest resetSizeTestLoop success') + }) + } + wnd.resetSize(0,0).then(()=>{ + console.log('jsunittest resetSizeTsetLoop wnd.resetSize(0,0) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2100 + * @tc.name Test setWindowTypeTestZero. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTestZero', 0, function(){ + console.log('jsunittest setWindowTypeTestZero begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTestZero getTopWindow wnd: ' + wnd) + wnd.setWindowType(0).then(()=>{ + console.log('jsunittest setWindowTypeTestZero wnd.setWindowType(0) success') + }) + wnd.moveTo(200,200).then(()=>{ + console.log('jsunittest setWindowTypeTestZero wnd.moveTo(200,200) success') + }) + wnd.resetSize(200,200).then(()=>{ + console.log('jsunittest setWindowTypeTestZero wnd.resetSize(200,200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2200 + * @tc.name Test setWindowTypeTestThirty. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTestThirty', 0, function(){ + console.log('jsunittest setWindowTypeTestThirty begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTestThirty getTopwindow wnd: ' + wnd) + wnd.setWindowType(30).then(()=>{ + console.log('jsunittest setWindowTypeTestThirty wnd.setWindowType(30) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestThirty wnd.moveTo(200, 200) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestThirty wnd.resetSize(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2300 + * @tc.name Test setWindowTypeTestSeventy. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTestSeventy', 0, function(){ + console.log('jsunittest setWindowTypeTestSeventy begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTestSeventy getTopwindow wnd: ' + wnd) + wnd.setWindowType(70).then(()=>{ + console.log('jsunittest setWindowTypeTestSeventy wnd.setWindowType(70) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestSeventy wnd.moveTo(200, 200) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestSeventy wnd.resetSize(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2400 + * @tc.name Test setWindowTypeTestNinety. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTestNinety', 0, function(){ + console.log('jsunittest setWindowTypeTestNinety begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTestNinety getTopwindow wnd: ' + wnd) + wnd.setWindowType(90).then(()=>{ + console.log('jsunittest setWindowTypeTestNinety wnd.setWindowType(90) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestNinety wnd.moveTo(200, 200) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestNinety wnd.resetSize(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2500 + * @tc.name Test setWindowTypeTestOrderChange. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTestOrderChange', 0, function(){ + console.log('jsunittest setWindowTypeTestOrderChange begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTestOrderChange getTopwindow wnd: ' + wnd) + wnd.setWindowType(0).then(()=>{ + console.log('jsunittest setWindowTypeTestOrderChange wnd.setWindowType(0) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestOrderChange wnd.resetSize(200, 200) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTestOrderChange wnd.moveTo(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2600 + * @tc.name Test setWindowTypeTest15. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTest15', 0, function(){ + console.log('jsunittest setWindowTypeTest15 begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTest15 getTopwindow wnd: ' + wnd) + wnd.setWindowType(30).then(()=>{ + console.log('jsunittest setWindowTypeTest15 wnd.setWindowType(30) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest15 wnd.resetSize(200, 200) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest15 wnd.moveTo(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2700 + * @tc.name Test setWindowTypeTest16. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTest16', 0, function(){ + console.log('jsunittest setWindowTypeTest16 begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTest16 getTopwindow wnd: ' + wnd) + wnd.setWindowType(70).then(()=>{ + console.log('jsunittest setWindowTypeTest16 wnd.setWindowType(70) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest16 wnd.resetSize(200, 200) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest16 wnd.moveTo(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2800 + * @tc.name Test setWindowTypeTest17. + * @tc.desc Test window.setWindowType API function test. + */ + it('setWindowTypeTest17', 0, function(){ + console.log('jsunittest setWindowTypeTest17 begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest setWindowTypeTest17 getTopwindow wnd: ' + wnd) + wnd.setWindowType(90).then(()=>{ + console.log('jsunittest setWindowTypeTest17 wnd.setWindowType(90) success') + }) + wnd.resetSize(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest17 wnd.resetSize(200, 200) success') + }) + wnd.moveTo(200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest17 wnd.moveTo(200, 200) success') + }) + }) + }) + + /** + * @tc.number GRAPHIC__FUNCTION_WINDOW_TESTWINDOW_JS_API_2900 + * @tc.name Test moveTest6. + * @tc.desc Test window.moveTo API function test. + */ + it('moveTest6', 0, function(){ + console.log('jsunittest moveTest6 begin') + window.getTopwindow().then(wnd => { + console.log('jsunittest moveTest6 getTopwindow wnd: ' + wnd) + wnd.moveTo(-200, 200).then(()=>{ + console.log('jsunittest setWindowTypeTest17 wnd.moveTo(-200, 300) success') + }) + wnd.moveTo(200, -300).then(()=>{ + console.log('jsunittest setWindowTypeTest17 wnd.moveTo(200, -300) success') + }) + }) + }) }) \ No newline at end of file