diff --git a/graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets b/graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets index 73b9f52630bd997790b101a011eb187d191e2326..c6ecf066afdd9d6ee8135f622aaffc0d8f3af01d 100644 --- a/graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets +++ b/graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets @@ -2305,7 +2305,7 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta expect(!!tempWnd).assertTrue(); await tempWnd.setWindowMode(ohosWindow.WindowMode.UNDEFINED).catch(async (err) => { console.error(msgStr + 'Failed to set the window mode. Cause: ' + JSON.stringify(err)); - expect(err.code == 401).assertTrue(); + expect(err.code == 1300002).assertTrue(); await tempWnd.destroyWindow() console.log(msgStr + 'tempWnd.setWindowMode failed ' + 'finished'); done(); @@ -2341,7 +2341,7 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta console.log(msgStr + 'currentType: ' + tempType) console.error(msgStr + 'Failed to set the window mode. Cause: ' + JSON.stringify(err)); try { - expect(err.code == 401).assertTrue(); + expect(err.code == 1300002).assertTrue(); } catch (error) { console.info(`ohosWindow.createWindow catch error: ${JSON.stringify(error)}`) }