mediawiki-skins-MinervaNeue/tests/browser/features/step_definitions/issues_steps.rb
jdlrobson 6d243c1df0 QA: Page Issues browser test should wait till JS has finished loading
Clicking the page issue banner (which is ready from first paint to
be clicked) will not yield the overlay. The user must wait for the JS
to load. Likely the reason for Minerva browser test failures against
beta cluster.

Change-Id: I06c488ca64dd44ad24368a1d6b47bb2646ad4552
2019-01-16 11:43:02 -08:00

25 lines
712 B
Ruby

When(/^I click the overlay issue close button$/) do
on(ArticlePage).overlay_close_button_element.when_present.click
end
When(/^I click the page issues stamp$/) do
on(ArticlePage).issues_stamp_element.when_present.click
end
When(/^I see the issues overlay$/) do
on(ArticlePage).overlay_element.when_present
end
When(/^this page has issues$/) do
on(ArticlePage).issues_stamp_element.when_present
end
Then(/^I should not see the issues overlay$/) do
on(ArticlePage).wait_until_rl_module_ready('skins.minerva.scripts')
expect(on(ArticlePage).overlay_element).not_to be_visible
end
Then(/^I should see the issues overlay$/) do
expect(on(ArticlePage).overlay_element.when_present).to be_visible
end