mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-11 23:46:07 +00:00
11825b9c17
The problems was that visual editor is the default editor at en.wikipedia.beta.wmflabs.org, and the test was expecting source editor. The test now works also locally, using mediawiki-vagrant. Removed headers from some files. We no longer use those headers. Removed cucumber tags we no longer use, mostly internet explorer. Added missing dependency (rake) to gemfile. Bug: T126463 Change-Id: Ia5809f40719a2fe0c6c94338072a38765fa5c87b
28 lines
755 B
Ruby
28 lines
755 B
Ruby
Given(/^I am creating a page with source editor$/) do
|
|
visit(DoesNotExistPage, using_params: { page_name: @random_string })
|
|
end
|
|
|
|
When(/^I click link Create$/) do
|
|
on(DoesNotExistPage).action_edit_element.when_present.click
|
|
end
|
|
|
|
When(/^I click Preview$/) do
|
|
on(EditPage).preview
|
|
end
|
|
|
|
When(/^I type (.+)$/) do |write_text|
|
|
on(EditPage).article_text = write_text
|
|
end
|
|
|
|
Then(/^alt for that img should be (.+)$/) do |alt|
|
|
expect(on(EditPage).math_image_element.element.alt).to eq(alt)
|
|
end
|
|
|
|
Then(/^src for that img should contain (.+)$/) do |src|
|
|
expect(on(EditPage).math_image_element.element.src).to match Regexp.escape src
|
|
end
|
|
|
|
Then(/^the page should contain an img tag$/) do
|
|
expect(on(EditPage).math_image_element.when_present).to be_visible
|
|
end
|