mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-27 19:26:12 +01:00
Move over another ajax test from selenium to stories.
This commit is contained in:
parent
6f760c768e
commit
adde38eecb
3 changed files with 82 additions and 5 deletions
34
stories/steps/context_detail.rb
Normal file
34
stories/steps/context_detail.rb
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
steps_for :context_detail do
|
||||
include_steps_for :users
|
||||
|
||||
Given "Luis has a context Errands" do
|
||||
@errands = @luis.contexts.create!(:name => 'Errands')
|
||||
end
|
||||
|
||||
When "Luis visits the Errands context page" do
|
||||
visits "/contexts/#{@errands.to_param}"
|
||||
end
|
||||
|
||||
When "he edits the Errands context name in place to be OutAndAbout" do
|
||||
selenium.click 'context_name_in_place_editor'
|
||||
wait_for_ajax_and_effects
|
||||
selenium.type "css=#context_name_in_place_editor-inplaceeditor input.editor_field", "OutAndAbout"
|
||||
clicks_button "ok", :wait => :ajax
|
||||
end
|
||||
|
||||
When "Luis visits the context listing page" do
|
||||
visits "/contexts"
|
||||
end
|
||||
|
||||
Then "he should see the context name is OutAndAbout" do
|
||||
should_see 'OutAndAbout'
|
||||
end
|
||||
|
||||
Then "he should see that a context named Errands is not present" do
|
||||
should_not_see 'Errands'
|
||||
end
|
||||
|
||||
Then "he should see that a context named OutAndAbout is present" do
|
||||
should_see 'OutAndAbout'
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue