Created
September 16, 2011 12:35
-
-
Save chromeragnarok/1222029 to your computer and use it in GitHub Desktop.
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
// JS Stuffs here | |
$("#add-new").droppable({ | |
accept: ".draggable-stuffs", | |
drop: handleDrop | |
}).tipsy({title: 'data-tooltip'}); | |
# some web steps to be called on your cukes... | |
When /^I drag room "([^"]*)" to the add-new zone$/ do |room_title| | |
javascript = <<-eos | |
var ui = { draggable: $("#{room_div_id}")}; | |
handleAddNewDrop($.Event("drop"), ui); | |
eos | |
page.execute_script javascript | |
end | |
When /^I change the group\-box number (\d+) title to "([^"]*)"$/ do |order, new_title| | |
javascript = <<-eos | |
var selectedGroupBox = $($(".group-box")[#{order}]); | |
selectedGroupBox.find(".edit").click(); | |
selectedGroupBox.find("input").val("#{new_title}"); | |
selectedGroupBox.find("input").blur(); | |
eos | |
page.execute_script javascript | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment