mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-19 13:48:09 +01:00
set configurations for using cucumber and selenium
if you want to run it, update your database.yml to include cucumber and selenium environments (like in the .tmpl) and run RAILS_ENV=selenium cucumber -p selenium
This commit is contained in:
parent
502e60c9a1
commit
8f349d3b6b
9 changed files with 60 additions and 20 deletions
|
|
@ -38,14 +38,18 @@ end
|
|||
|
||||
Given /^I have a project "([^\"]*)" with (.*) notes?$/ do |project_name, num|
|
||||
project = @current_user.projects.create!(:name => project_name)
|
||||
num.to_i.downto 0 do |i|
|
||||
project.notes.create!(:user_id => @current_user.id, :body => "A note #{i}")
|
||||
0.upto num.to_i do |i|
|
||||
project.notes.create!(:user_id => @current_user.id, :body => "A note #{i+1}")
|
||||
end
|
||||
end
|
||||
|
||||
When /^I delete the first note$/ do
|
||||
# need selenium for this to check on the js
|
||||
pending
|
||||
click_link "delete note"
|
||||
end
|
||||
|
||||
Then /^the first note should disappear$/ do
|
||||
# the first note contains "A note 1"
|
||||
Then "I should not see \"A note 1\""
|
||||
end
|
||||
|
||||
Given /^I have one project "([^\"]*)" with 1 note$/ do |arg1|
|
||||
|
|
@ -99,12 +103,6 @@ visits '/notes'
|
|||
should_see "new exam note"
|
||||
end
|
||||
|
||||
Then "the first note should disappear" do
|
||||
wait_for_ajax_and_effects
|
||||
should_not_see 'exam note 1'
|
||||
end
|
||||
|
||||
|
||||
Then "he should see the note text" do
|
||||
should_see 'exam note 1'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue