mirror of
https://github.com/discourse/discourse.git
synced 2025-03-31 14:35:56 +08:00
DEV: attempts to fix flakey spec (#25984)
This commit is contained in:
parent
0b60086ff8
commit
3200e276b7
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user