mediawiki-extensions-Revisi.../tests/browser/features/support/step_definitions/tooltips.rb
addshore 1e65ec602f Tooltip browser tests
Bug: T133278
Change-Id: I7ee7143ab3fcd9c2fe41604c370d9c4e2e7a9d20
2016-07-05 11:57:36 +01:00

17 lines
620 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|
on(DiffPage).wait_for_tooltip(index.to_i)
on(DiffPage).revisionslider_tooltip(index.to_i).visible?.should be_truthy
end
Then(/^no tooltip should be present for revision (\d+)$/) do |index|
on(DiffPage).wait_for_no_tooltip(index.to_i)
on(DiffPage).revisionslider_tooltip(index.to_i).visible?.should be_falsey
end