diff --git a/tests/browser/features/math.feature b/tests/browser/features/math.feature index 3f9e83b..48c8c05 100644 --- a/tests/browser/features/math.feature +++ b/tests/browser/features/math.feature @@ -15,7 +15,7 @@ Feature: Math Scenario: Display simple math Given I am logged in And I am at page that does not exist - When I click link Create source + When I click link Create And I type 3 + 2 And I click Preview Then the page should contain an img tag diff --git a/tests/browser/features/step_definitions/math_steps.rb b/tests/browser/features/step_definitions/math_steps.rb index f63befe..2918cf1 100644 --- a/tests/browser/features/step_definitions/math_steps.rb +++ b/tests/browser/features/step_definitions/math_steps.rb @@ -14,8 +14,8 @@ Given(/^I am at page that does not exist$/) do visit(DoesNotExistPage, using_params: { page_name: @random_string }) end -When(/^I click link Create source$/) do - on(DoesNotExistPage).create_source_element.when_present.click +When(/^I click link Create$/) do + on(DoesNotExistPage).action_edit_element.when_present.click end When(/^I click Preview$/) do diff --git a/tests/browser/features/support/pages/does_not_exist_page.rb b/tests/browser/features/support/pages/does_not_exist_page.rb index f3a58da..dbd01f1 100644 --- a/tests/browser/features/support/pages/does_not_exist_page.rb +++ b/tests/browser/features/support/pages/does_not_exist_page.rb @@ -14,5 +14,5 @@ class DoesNotExistPage page_url '<%=params[:page_name]%>' - a(:create_source, text: 'Create source') + a(:action_edit, css: 'li#ca-edit > span > a') end