mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-31 14:28:49 +01:00
A whole bunch more Selenium tests working
This commit is contained in:
parent
6126a6e9d7
commit
86de0a1290
5 changed files with 10 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ module TodosHelper
|
||||||
|
|
||||||
def remote_edit_menu_item(parameters, todo)
|
def remote_edit_menu_item(parameters, todo)
|
||||||
return link_to_remote(
|
return link_to_remote(
|
||||||
image_tag("edit_off.png", :mouseover => "edit_on.png", :alt => "", :align => "absmiddle")+" Edit",
|
image_tag("edit_off.png", :mouseover => "edit_on.png", :alt => "", :align => "absmiddle", :id => 'edit_icon_todo_'+todo.id.to_s)+" Edit",
|
||||||
:url => {:controller => 'todos', :action => 'edit', :id => todo.id},
|
:url => {:controller => 'todos', :action => 'edit', :id => todo.id},
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:with => "'#{parameters}'",
|
:with => "'#{parameters}'",
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
:with => "'_source_view=#{@source_view}'",
|
:with => "'_source_view=#{@source_view}'",
|
||||||
:before => "$('#{dom_id(context)}').block({message:null});",
|
:before => "$('#{dom_id(context)}').block({message:null});",
|
||||||
:complete => "$('#{dom_id(context)}').unblock();",
|
:complete => "$('#{dom_id(context)}').unblock();",
|
||||||
:confirm => "Are you sure you want to delete the context '#{context.name}'?"
|
:confirm => "Are you sure that you want to delete the context '#{context.name}'?"
|
||||||
) %>
|
) %>
|
||||||
<%= link_to_remote(
|
<%= link_to_remote(
|
||||||
image_tag( "blank.png", :title => "Edit context", :class=>"edit_item"),
|
image_tag( "blank.png", :title => "Edit context", :class=>"edit_item"),
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,10 @@ assert_text 'badge_count', '11'
|
||||||
|
|
||||||
# set project to hidden state
|
# set project to hidden state
|
||||||
open "/projects/2"
|
open "/projects/2"
|
||||||
|
click 'css=.project_settings a'
|
||||||
|
wait_for_visible "project_state_completed"
|
||||||
click 'project_state_completed'
|
click 'project_state_completed'
|
||||||
|
click 'submit_project_2'
|
||||||
# wait for flash before navigating away from project page
|
# wait for flash before navigating away from project page
|
||||||
wait_for_visible "flash"
|
wait_for_visible "flash"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ login :as => 'admin'
|
||||||
|
|
||||||
# set project to hidden state
|
# set project to hidden state
|
||||||
open "/projects/2"
|
open "/projects/2"
|
||||||
|
click 'css=.project_settings a'
|
||||||
|
wait_for_visible "project_state_hidden"
|
||||||
click 'project_state_hidden'
|
click 'project_state_hidden'
|
||||||
|
click 'submit_project_2'
|
||||||
# wait for flash before navigating away from project page to make sure that
|
# wait for flash before navigating away from project page to make sure that
|
||||||
# the changes have been saved
|
# the changes have been saved
|
||||||
wait_for_visible "flash"
|
wait_for_visible "flash"
|
||||||
|
|
@ -24,4 +27,4 @@ wait_for_visible "flash"
|
||||||
verify_text_not_present 'should be hidden'
|
verify_text_not_present 'should be hidden'
|
||||||
|
|
||||||
# badge count should still be same
|
# badge count should still be same
|
||||||
assert_text 'badge_count', '7'
|
assert_text 'badge_count', '7'
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
// store, assert, assertNot, verify, verifyNot, waitFor, and waitForNot commands.
|
// store, assert, assertNot, verify, verifyNot, waitFor, and waitForNot commands.
|
||||||
// Will result in support for storeContextCount, assertContextCount, etc.
|
// Will result in support for storeContextCount, assertContextCount, etc.
|
||||||
Selenium.prototype.getContextCount = function() {
|
Selenium.prototype.getContextCount = function() {
|
||||||
return this.browserbot.getCurrentWindow().$$('.context').length;
|
return this.browserbot.getCurrentWindow().$('.context').size();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue