mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 15:44:09 +01:00
migrate edit update and destroy to jQuery and refactor it
test for changing state is wip, forgot to mark it with @wip
This commit is contained in:
parent
ee4ef4ad42
commit
35453acd57
12 changed files with 198 additions and 105 deletions
14
features/step_definitions/project_list_steps.rb
Normal file
14
features/step_definitions/project_list_steps.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
When /^I delete project "([^"]*)"$/ do |project_name|
|
||||
# from the project list page
|
||||
project = @current_user.projects.find_by_name(project_name)
|
||||
project.should_not be_nil
|
||||
click_link "delete_project_#{project.id}"
|
||||
selenium.get_confirmation.should == "Are you sure that you want to delete the project '#{project_name}'?"
|
||||
wait_for do
|
||||
!selenium.is_element_present("delete_project_#{project.id}")
|
||||
end
|
||||
end
|
||||
|
||||
Then /^the project list badge for "([^"]*)" projects should show (\d+)$/ do |state_name, count|
|
||||
selenium.get_text("css=span##{state_name}-projects-count").should == count
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue