diff --git a/features/posts.feature b/features/posts.feature index 38bb349f4..1c8f2e900 100644 --- a/features/posts.feature +++ b/features/posts.feature @@ -55,7 +55,7 @@ Feature: posting And I have turned off jQuery effects And I click "Mention" button And I expand the publisher in the modal window - And I append "#status_message_text" with "I am eating a yogurt" in the modal window + And I append "I am eating a yogurt" to the publisher in the modal window And I press "Share" in the modal window And I follow "" Then I should "I am eating a yogurt" @@ -70,7 +70,7 @@ Feature: posting And I have turned off jQuery effects And I click "Mention" button And I expand the publisher in the modal window - And I append "#status_message_text" with "I am eating a yogurt" in the modal window + And I append "I am eating a yogurt" to the publisher in the modal window And I follow "DidntPostTo" within "#publisher" in the modal window And I press "Share" in the modal window And I follow "" diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index b162fd491..e04352ea1 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -12,9 +12,11 @@ And /^I expand the publisher$/ do end -When /^(?:|I )append "([^"]*)" with "([^"]*)"$/ do |field, value| - script = "$('#{ field }').val(function(index, value) { - return value + ' ' + '#{value}'; });" +When /^I append "([^"]*)" to the publisher$/ do |stuff| + script = <<-JS + $('#status_message_fake_text').val( + $('#status_message_fake_text').val() + '#{stuff}').keyup(); +JS page.execute_script(script) end