diff --git a/tests/browser/features/math.feature b/tests/browser/features/math.feature index 1b5db839d..3f9e83b99 100644 --- a/tests/browser/features/math.feature +++ b/tests/browser/features/math.feature @@ -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 3 + 2 + When I click link Create source + And I type 3 + 2 And I click Preview Then the page should contain an img tag And alt for that img should be 3 + 2 diff --git a/tests/browser/features/step_definitions/math_steps.rb b/tests/browser/features/step_definitions/math_steps.rb index 6bb945679..98843e8a5 100644 --- a/tests/browser/features/step_definitions/math_steps.rb +++ b/tests/browser/features/step_definitions/math_steps.rb @@ -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 \ No newline at end of file