DEV: attempts to fix flakey spec (#25984)

This commit is contained in:
Joffrey JAFFEUX 2024-03-01 10:08:24 +01:00 committed by GitHub
parent 0b60086ff8
commit 3200e276b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 7 deletions

View File

@ -25,14 +25,7 @@ module PageObjects
def leave def leave
component(class: ".can-leave").hover component(class: ".can-leave").hover
btn = component.find(".chat-channel-leave-btn", visible: :all) btn = component.find(".chat-channel-leave-btn", visible: :all)
# style manipulation is necessary to have it working with @media(hover: hover) on CI
page.execute_script(
"document.querySelector('#{build_selector} .chat-channel-leave-btn').style.display = 'block';",
)
btn.click btn.click
page.execute_script(
"document.querySelector('#{build_selector} .chat-channel-leave-btn').style.display = '';",
)
end end
def component(**args) def component(**args)