-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed some ajax bugs (drag-drop, add). All tests pass.
- Loading branch information
Showing
18 changed files
with
145 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# Add first element | ||
open '/oo/testnode37.html?test=add3' | ||
assert_not_visible 'add31_title' | ||
assert_not_visible 'add33_title' | ||
click 'css=img[alt=add]' | ||
assert_visible 'add31_title' | ||
type 'add31_title', 'add3' | ||
assert_visible 'add33_title' | ||
type 'add33_title', 'add3' | ||
click 'css=input[type=submit]' | ||
wait_for_not_visible 'add31_title' | ||
wait_for_not_visible 'add33_title' | ||
verify_text 'css=.add3 a', 'add3' | ||
# should have correct parent | ||
verify_text 'css=.add3 span', 'Kill the bugs' | ||
|
||
# Add a second element | ||
assert_not_visible 'add31_title' | ||
assert_not_visible 'add33_title' | ||
click 'css=img[alt=add]' | ||
assert_visible 'add31_title' | ||
type 'add31_title', 'add3_2' | ||
assert_visible 'add33_title' | ||
type 'add33_title', 'add3_2' | ||
click 'css=input[type=submit]' | ||
wait_for_not_visible 'add31_title' | ||
wait_for_not_visible 'add33_title' | ||
verify_text 'css=.add3_2 a', 'add3_2' | ||
# should have correct parent | ||
verify_text 'css=.add3_2 span', 'Kill the bugs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
open "/oo/testnode37.html?test=drop1" | ||
open '/oo/testnode37.html?test=drop1' | ||
assert_element_not_present 'drop13_33' | ||
|
||
# Drag & Drop | ||
set_timeout 4000 | ||
drag_and_drop_to_object "css=#drop11_33 > span.drag_handle", "drop12" | ||
wait_for_element_present "drop13_33" | ||
verify_text "drop13_33", "Art" | ||
drag_and_drop_to_object 'css=#drop11_33 > span.drag_handle', 'drop12' | ||
wait_for_element_present 'drop13_33' | ||
verify_text 'drop13_33', 'Art' | ||
# Unlink | ||
click "css=img[alt=remove]" | ||
wait_for_element_not_present "drop13_33" | ||
click 'css=img[alt=remove]' | ||
wait_for_element_not_present 'drop13_33' | ||
|
||
# Restart | ||
|
||
# Drag & Drop | ||
drag_and_drop_to_object "css=#drop11_33 > span.drag_handle", "drop12" | ||
wait_for_element_present "drop13_33" | ||
verify_text "drop13_33", "Art" | ||
drag_and_drop_to_object 'css=#drop11_33 > span.drag_handle', 'drop12' | ||
wait_for_element_present 'drop13_33' | ||
verify_text 'drop13_33', 'Art' | ||
|
||
# Make sure the changes are commited to db | ||
open "/oo/testnode37.html?test=drop1" | ||
open '/oo/testnode37.html?test=drop1' | ||
assert_element_present 'drop13_33' | ||
# Unlink | ||
click "css=img[alt=remove]" | ||
wait_for_element_not_present "drop13_33" | ||
click 'css=img[alt=remove]' | ||
wait_for_element_not_present 'drop13_33' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
open "/oo/testnode37.html?test=drop2" | ||
open '/oo/testnode37.html?test=drop2' | ||
assert_element_not_present 'drop22_29_33' | ||
|
||
# Drag & Drop | ||
set_timeout 4000 | ||
command 'setSpeed', 10 | ||
drag_and_drop_to_object "css=#drop21_33 > span.drag_handle", "drop22_29" | ||
wait_for_element_present "drop22_29_33" | ||
verify_text "drop22_29_33", "Art" | ||
drag_and_drop_to_object 'css=#drop21_33 > span.drag_handle', 'drop22_29' | ||
wait_for_element_present 'drop22_29_33' | ||
verify_text 'drop22_29_33', 'Art' | ||
# Unlink | ||
click "css=#drop22_29_33 img[alt=remove]" | ||
wait_for_element_not_present "drop22_29_33" | ||
click 'css=#drop22_29_33 img[alt=remove]' | ||
wait_for_element_not_present 'drop22_29_33' | ||
|
||
# Drag in other target | ||
|
||
# Drag & Drop | ||
drag_and_drop_to_object "css=#drop21_33 > span.drag_handle", "drop22_21" | ||
wait_for_element_present "drop22_21_33" | ||
verify_text "drop22_21_33", "Art" | ||
drag_and_drop_to_object 'css=#drop21_33 > span.drag_handle', 'drop22_21' | ||
wait_for_element_present 'drop22_21_33' | ||
verify_text 'drop22_21_33', 'Art' | ||
|
||
# Make sure the changes are commited to db | ||
open "/oo/testnode37.html?test=drop2" | ||
assert_element_present 'drop23_21_33' | ||
open '/oo/testnode37.html?test=drop2' | ||
assert_element_present 'drop22_21_33' | ||
# Should be | ||
# assert_element_present 'drop22_21_33' | ||
# Unlink | ||
click "css=#drop23_21_33 img[alt=remove]" | ||
wait_for_element_not_present "drop23_21_33" | ||
click 'css=#drop22_21_33 img[alt=remove]' | ||
wait_for_element_not_present 'drop22_21_33' | ||
|
||
command 'setSpeed', 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# Drag from list in each. | ||
open "/oo/testnode37.html?test=drop3" | ||
open '/oo/testnode37.html?test=drop3' | ||
assert_element_not_present 'drop33_26' | ||
|
||
# Drag & Drop | ||
set_timeout 4000 | ||
drag_and_drop_to_object "css=#drop12_21_26 > span.drag_handle", "drop32" | ||
wait_for_element_present "drop33_26" | ||
verify_text "drop33_26", "crocodiles" | ||
drag_and_drop_to_object 'css=#drop12_21_26 > span.drag_handle', 'drop32' | ||
wait_for_element_present 'drop33_26' | ||
verify_text 'drop33_26', 'crocodiles' | ||
# Unlink | ||
click "css=img[alt=remove]" | ||
wait_for_element_not_present "drop33_26" | ||
click 'css=img[alt=remove]' | ||
wait_for_element_not_present 'drop33_26' | ||
|
||
# Restart | ||
|
||
# Drag & Drop | ||
drag_and_drop_to_object "css=#drop12_21_26 > span.drag_handle", "drop32" | ||
wait_for_element_present "drop33_26" | ||
verify_text "drop33_26", "crocodiles" | ||
drag_and_drop_to_object 'css=#drop12_21_26 > span.drag_handle', 'drop32' | ||
wait_for_element_present 'drop33_26' | ||
verify_text 'drop33_26', 'crocodiles' | ||
|
||
# Drag & Drop from other location | ||
command 'setSpeed', 800 | ||
drag_and_drop_to_object "css=#drop12_11_12 > span.drag_handle", "drop32" | ||
wait_for_element_present "drop33_12" | ||
verify_text "drop33_12", "people" | ||
drag_and_drop_to_object 'css=#drop12_11_12 > span.drag_handle', 'drop32' | ||
wait_for_element_present 'drop33_12' | ||
verify_text 'drop33_12', 'people' | ||
command 'setSpeed', 0 | ||
|
||
# Make sure the changes are commited to db | ||
open "/oo/testnode37.html?test=drop3" | ||
open '/oo/testnode37.html?test=drop3' | ||
assert_element_present 'drop33_26' | ||
assert_element_present 'drop33_12' | ||
# Unlink | ||
click "css=#drop33_26 img[alt=remove]" | ||
wait_for_element_not_present "drop33_26" | ||
click "css=#drop33_12 img[alt=remove]" | ||
wait_for_element_not_present "drop33_12" | ||
click 'css=#drop33_26 img[alt=remove]' | ||
wait_for_element_not_present 'drop33_26' | ||
click 'css=#drop33_12 img[alt=remove]' | ||
wait_for_element_not_present 'drop33_12' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.