Project

General

Profile

Actions

Patch #42600

closed

Suppress "Change your password" popup for stable system tests

Added by Mizuki ISHIKAWA 10 days ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

In recent versions of Chrome, a “Change your password” popup may appear immediately after logging in. This popup causes unexpected interruptions during automated system tests, making the tests unstable and unreliable.

To prevent this popup and other password-related prompts from appearing during system tests, the following preferences have been added to the ChromeDriver configuration in ApplicationSystemTestCase:

diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb
index 4a6fd0d30..0bb0de944 100644
--- a/test/application_system_test_case.rb
+++ b/test/application_system_test_case.rb
@@ -43,6 +43,11 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
     driver_option.add_preference 'download.default_directory',   DOWNLOADS_PATH.gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
     driver_option.add_preference 'download.prompt_for_download', false
     driver_option.add_preference 'plugins.plugins_disabled',     ["Chrome PDF Viewer"]
+    # Disable "Change your password" popup shown after login due to leak detection
+    driver_option.add_preference 'profile.password_manager_leak_detection', false
+    # Disable password saving prompts
+    driver_option.add_preference 'profile.password_manager_enabled', false
+    driver_option.add_preference 'credentials_enable_service', false
   end
   setup do

This change improves the stability and reliability of system tests by ensuring they run without such interference.


Files

popup.png (236 KB) popup.png Mizuki ISHIKAWA, 2025-04-21 01:40
Actions #1

Updated by Go MAEDA 9 days ago

  • Target version set to 5.1.9

Setting the target version to 5.1.9.

Actions #2

Updated by Go MAEDA 8 days ago

  • Subject changed from Suppress “Change your password” popup for stable system tests to Suppress "Change your password" popup for stable system tests
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA

Committed the patch in r23704. Thank you.

Actions #3

Updated by Go MAEDA 7 days ago

  • Status changed from Resolved to Closed

Merged the change into the stable branches in r23708 and r23709.

Actions

Also available in: Atom PDF