Просмотр исходного кода

test: stop Chrome password prompts from blocking later integration tests

The authChangeEventStream test is the first to log in through the form
and keep clicking. On CI, every click after that login was ignored,
including in later suites, consistent with Chrome's saved or breached
password prompt sitting above the page. Disable the password manager and
leak detection for the test browser, and clear the session cookie when
the test finishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread 23 часов назад
Родитель
Сommit
f53f12bf67

+ 8 - 0
integration-tests/mochaSetup.mjs

@@ -6,6 +6,14 @@ export async function mochaGlobalSetup () {
   const options = new Options()
   options.addArguments('--headless', '--disable-gpu', '--disable-dev-shm-usage')
 
+  // Logging in with a test password can raise Chrome's save-password or
+  // breached-password prompt, which swallows clicks for every later test.
+  options.setUserPreferences({
+    credentials_enable_service: false,
+    'profile.password_manager_enabled': false,
+    'profile.password_manager_leak_detection': false,
+  })
+
   global.webdriver = await new Builder().forBrowser(Browser.CHROME).setChromeOptions(options).build()
   await global.webdriver.manage().setTimeouts({ implicit: 0, pageLoad: 30000, script: 30000 })
 

+ 1 - 0
integration-tests/tests/authChangeEventStream/authChangeEventStream.mjs

@@ -26,6 +26,7 @@ describe('config: authChangeEventStream', function () {
   })
 
   after(async () => {
+    await webdriver.manage().deleteAllCookies()
     await runner.stop()
   })