فهرست منبع

test: stop the OliveTin process even if restoring the window size fails

If restoring the window rect threw in an after hook, runner.stop() was
skipped and the suite's OliveTin process kept its ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6U1CRbWasL1BAqbi7Rmsb
Claude 2 ساعت پیش
والد
کامیت
a8eb47243a

+ 5 - 2
integration-tests/tests/localAuth/localAuth.mjs

@@ -16,8 +16,11 @@ describe('config: localAuth', function () {
   })
 
   after(async () => {
-    await webdriver.manage().window().setRect(originalWindowRect)
-    await runner.stop()
+    try {
+      await webdriver.manage().window().setRect(originalWindowRect)
+    } finally {
+      await runner.stop()
+    }
   })
 
   afterEach(function () {

+ 5 - 2
integration-tests/tests/topbarNavigation/topbarNavigation.mjs

@@ -14,8 +14,11 @@ describe('config: sectionNavigationStyle topbar', function () {
   })
 
   after(async () => {
-    await webdriver.manage().window().setRect(originalWindowRect)
-    await runner.stop()
+    try {
+      await webdriver.manage().window().setRect(originalWindowRect)
+    } finally {
+      await runner.stop()
+    }
   })
 
   afterEach(function () {