mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
Refactor code for RSpec3 expect syntax incorporation
Bug: T68369 Change-Id: I25e27d8b363957c4217eaf8516d3c9e61ece156e
This commit is contained in:
parent
7ae2e74309
commit
197bd9ccd6
|
@ -15,8 +15,8 @@ Feature: Math
|
|||
Scenario: Display simple math
|
||||
Given I am logged in
|
||||
And I am at page that does not exist
|
||||
And I click link Create source
|
||||
When I type <math>3 + 2</math>
|
||||
When I click link Create source
|
||||
And I type <math>3 + 2</math>
|
||||
And I click Preview
|
||||
Then the page should contain an img tag
|
||||
And alt for that img should be 3 + 2
|
||||
|
|
|
@ -27,14 +27,14 @@ When(/^I type (.+)$/) do |write_text|
|
|||
end
|
||||
|
||||
Then(/^alt for that img should be (.+)$/) do |alt|
|
||||
on(EditPage).math_image_element.element.alt.should == alt
|
||||
expect(on(EditPage).math_image_element.element.alt).to eq(alt)
|
||||
end
|
||||
|
||||
Then(/^src for that img should come from (.+)$/) do |src|
|
||||
on(EditPage).math_image_element.element.src.should match Regexp.escape(src)
|
||||
expect(on(EditPage).math_image_element.element.src).to match Regexp.escape(src)
|
||||
end
|
||||
|
||||
|
||||
Then(/^the page should contain an img tag$/) do
|
||||
on(EditPage).math_image_element.when_present.should be_visible
|
||||
expect(on(EditPage).math_image_element.when_present).to be_visible
|
||||
end
|
Loading…
Reference in a new issue