mediawiki-extensions-Revisi.../tests/browser/features/support/step_definitions/timeline.rb
Thiemo Kreuz 407c1de800 Use cookie to dismiss help dialog and fix failing browser tests
I have seen this failing:
https://integration.wikimedia.org/ci/job/mwext-mw-selenium-jessie/9255/console

The idea is to pre-set this cookie so the help dialog never shows up
in the first place. The tests do not need to look for the element, click
it, wait for the dialog to close. This should even speed up the browser
tests, I believe.

Also this adjustes waiting conditions in several places to address
timing issues with failing browser tests.

Since these tests should be replaced by Node.js on the long run I
added "sleep" in the cases although it's not recommended.

Change-Id: Ida381faa390aa62ebaadd3713864676be80abd51
2018-07-03 16:44:28 +02:00

24 lines
825 B
Ruby

Then(/^The forward arrow should be disabled/) do
expect(on(DiffPage).revisionslider_timeline_forwards_disabled_element.when_present).to be_visible
end
Then(/^The backward arrow should be disabled/) do
expect(on(DiffPage).revisionslider_timeline_backwards_disabled_element.when_present).to be_visible
end
Then(/^The forward arrow should be enabled/) do
expect(on(DiffPage).revisionslider_timeline_forwards_element).to be_visible
end
Then(/^The backward arrow should be enabled/) do
expect(on(DiffPage).revisionslider_timeline_backwards_element).to be_visible
end
Given(/^I click on the forward arrow$/) do
on(DiffPage).revisionslider_timeline_forwards_element.when_present.click
end
Given(/^I click on the backward arrow$/) do
on(DiffPage).revisionslider_timeline_backwards_element.when_present.click
end