mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-11 22:06:07 +00:00
c0c90234d0
This moves all browser tests from MobileFrontend to the Minerva repo in preparation for separating the two. Note, this means browser tests will exist in both repositories for a period of time. This is important and necessary to ensure we do not break anything. See: https://lists.wikimedia.org/pipermail/mobile-l/2017-July/010536.html Bug: T168758 Change-Id: I84ae3ea14191f672cabcd52020e80b0a40a72ce1
38 lines
1.2 KiB
Ruby
38 lines
1.2 KiB
Ruby
Given(/^I am on a page that has the following edits:$/) do |table|
|
|
page = 'Selenium_diff_test_'.concat(@random_string)
|
|
table.rows.each { |(text)| api.edit(title: page, text: text) }
|
|
visit(ArticlePage, using_params: { article_name: page })
|
|
end
|
|
|
|
When(/^I clear the editor$/) do
|
|
on(ArticlePage).editor_textarea_element.when_present.clear
|
|
end
|
|
|
|
When(/^I click the edit button$/) do
|
|
on(ArticlePage).edit_link_element.when_present.click
|
|
end
|
|
|
|
When(/^I click the wikitext editor overlay close button$/) do
|
|
on(ArticlePage).editor_overlay_close_button_element.when_present.click
|
|
end
|
|
|
|
When(/^I do not see the wikitext editor overlay$/) do
|
|
on(ArticlePage).editor_overlay_element.when_not_visible
|
|
end
|
|
|
|
When(/^I see the wikitext editor overlay$/) do
|
|
on(ArticlePage).editor_textarea_element.when_present
|
|
end
|
|
|
|
When(/^I type "(.+)" into the editor$/) do |text|
|
|
on(ArticlePage).editor_textarea_element.when_present.send_keys(text)
|
|
end
|
|
|
|
Then(/^I should not see the wikitext editor overlay$/) do
|
|
expect(on(ArticlePage).editor_overlay_element).not_to be_visible
|
|
end
|
|
|
|
Then(/^I see the anonymous editor warning$/) do
|
|
expect(on(ArticlePage).anon_editor_warning_element.when_present).to be_visible
|
|
end
|