mediawiki-extensions-Revisi.../tests/browser/features/support/step_definitions/tooltips.rb
WMDE-Fisch 2da20ba593 Simplify visiblity checks for tooltips
Change-Id: I2eba136a92054df7431dedb7a83f5af38f4d01e9
2016-08-31 12:47:18 +02:00

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_visible).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_visible).not_to be_visible
end