Enable selenium service in devcontainer for system tests (#1340)

Co-authored-by: Pedro J. Aramburu <pedro@joakin.dev>
This commit is contained in:
Pedro J. Aramburu
2026-04-06 09:15:57 -03:00
committed by GitHub
parent 246cd00cbb
commit 616c363b3e
8 changed files with 72 additions and 6 deletions

View File

@@ -60,6 +60,7 @@ class SettingsTest < ApplicationSystemTestCase
click_button "Generate new code"
assert_selector 'span[data-clipboard-target="source"]', visible: true, count: 1 # invite code copy widget
copy_button = find('button[data-action="clipboard#copy"]', match: :first) # Find the first copy button (adjust if needed)
page.execute_script("Object.defineProperty(navigator, 'clipboard', { value: { writeText: () => Promise.resolve() }, writable: true, configurable: true })") # Mock clipboard API due to browser security restrictions in tests
copy_button.click
assert_selector 'span[data-clipboard-target="iconSuccess"]', visible: true, count: 1 # text copied and icon changed to checkmark
end