2016-02-19 12:32:00 +00:00
|
|
|
Given(/^I am editing a random page with source editor$/) do
|
|
|
|
visit EditPage
|
2014-06-23 17:27:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
When(/^I click Preview$/) do
|
2016-05-16 16:11:59 +00:00
|
|
|
on(EditPage).preview_element.when_present.click
|
|
|
|
end
|
|
|
|
|
|
|
|
When(/^I dismiss Welcome to Wikipedia popup$/) do
|
|
|
|
on(EditPage).start_editing_element.click
|
2014-06-23 17:27:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
When(/^I type (.+)$/) do |write_text|
|
2015-09-02 15:19:04 +00:00
|
|
|
on(EditPage).article_text = write_text
|
2014-06-23 17:27:07 +00:00
|
|
|
end
|
|
|
|
|
2016-04-26 17:07:49 +00:00
|
|
|
Then(/^the page should contain 3 \+ 2 image$/) do
|
2014-12-11 06:29:59 +00:00
|
|
|
expect(on(EditPage).math_image_element.when_present).to be_visible
|
2015-09-02 13:57:39 +00:00
|
|
|
end
|