Created
August 27, 2013 17:52
-
-
Save mykecameron/6356750 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
def create_issue_through_ui(issue_name) | |
wait_until_scope_available '.new-issue #new-issue' | |
link = page.find :css, '.new-issue #new-issue' | |
link.click | |
wait_until_scope_available '#edit-issue-title-form input.issue-title-input' | |
input = page.find :css, '#edit-issue-title-form input.issue-title-input' | |
input.set issue_name | |
save_button = page.find :css, '#edit-issue-title-form .call-to-action' | |
save_button.click | |
wait_until_scope_available ".issue-tab.active:contains(\"#{issue_name}\")" | |
end | |
def save_note(note) | |
wait_until_scope_exists 'textarea#issue_note_body' | |
text_area = page.find :css, 'textarea#issue_note_body' | |
text_area.set note | |
save_button = page.find :css, '#save-note' | |
save_button.click | |
wait_until_scope_exists ".issue-note .note:contains(\"#{note}\")" | |
end | |
When /^I create an Issue "([^"]*)" with note "([^"]*)"$/ do |issue, note| | |
create_issue_through_ui(issue) | |
save_note(note) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment