mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-03 07:48:50 +01:00
add tests for toggling visibility of collapsed contexts
This commit is contained in:
parent
30c2fb8b82
commit
cdff38995c
5 changed files with 127 additions and 5 deletions
|
|
@ -16,10 +16,6 @@ Given /^I have a project "([^\"]*)" with (.*) notes?$/ do |project_name, num|
|
|||
end
|
||||
end
|
||||
|
||||
When /^I click Toggle Notes$/ do
|
||||
click_link 'Toggle notes'
|
||||
end
|
||||
|
||||
When /^I add note "([^\"]*)" from the "([^\"]*)" project page$/ do |note, project|
|
||||
project = Project.find_by_name(project)
|
||||
project.notes.create!(:user_id => @current_user.id, :body => note)
|
||||
|
|
@ -44,6 +40,23 @@ When /^I edit the first note to "([^"]*)"$/ do |note_body|
|
|||
click_button "submit_note_#{id}"
|
||||
end
|
||||
|
||||
When /^I toggle the note of "([^"]*)"$/ do |todo_description|
|
||||
todo = @current_user.todos.find_by_description(todo_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath = "//div[@id='line_todo_#{todo.id}']/div/a/img"
|
||||
|
||||
selenium.click(xpath)
|
||||
end
|
||||
|
||||
When /^I click Toggle Notes$/ do
|
||||
click_link 'Toggle notes'
|
||||
end
|
||||
|
||||
When /^I toggle all notes$/ do
|
||||
When "I click Toggle Notes"
|
||||
end
|
||||
|
||||
Then /^(.*) notes should be visible$/ do |number|
|
||||
# count number of project_notes
|
||||
count = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue