mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-12 07:25:13 +00:00
12e6631dde
The waitr click on the checkbox seems to be broken or is broken with intend since the actual OOUI checkbox has an opacity of 0. Additionally when_visible fails when the element is not present yet. The the way to go here seems to wait for the element to be there and then check for visibility. Also made use of PageObject method for checkboxes, the name selector and the link element. Bug: T158074 Change-Id: I2c3d6d963c8bcdc420bfbc57c1c2380bce7ef2f1
15 lines
555 B
Ruby
15 lines
555 B
Ruby
Given(/^I hover over revision (\d+)$/) do |index|
|
|
on(DiffPage).revisionslider_rev(index.to_i).hover
|
|
end
|
|
|
|
Given(/^I hover over the revision (\d+) tooltip$/) do |index|
|
|
on(DiffPage).revisionslider_tooltip(index.to_i).hover
|
|
end
|
|
|
|
Then(/^a tooltip should be present for revision (\d+)$/) do |index|
|
|
expect(on(DiffPage).revisionslider_tooltip(index.to_i).when_present).to be_visible
|
|
end
|
|
|
|
Then(/^no tooltip should be present for revision (\d+)$/) do |index|
|
|
expect(on(DiffPage).revisionslider_tooltip(index.to_i).when_not_present).not_to be_present
|
|
end |