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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
# | |
# A DRY Capybara helper method that can be used in multiple Capybara features (specs). | |
# Place this file in spec/support; the file name can be arbitrary (e.g. you can name your file anything). | |
module CapybaraHelpers | |
def sign_up | |
visit signup_path # '/signup' | |
within(".form-container") do | |
fill_in 'Name', with: 'Gene Angelo' | |
fill_in 'User Name', with: 'gangelo' | |
fill_in 'Email', with: 'iluv@cake.com' |
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
# Warning: This is NOT a replacement for your current ~/.bash_profile file. The below script | |
# is meant to be added to the bottom of your current ~/.bash_profile file. | |
# | |
# APPEND (do not replace!) the below script to your current ~/.bash_profile file. | |
# | |
# | |
# Requirements |
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
Description: | |
When signing up as a new user, in "/signup," the "Create User" button will postback to "/users." Not that big a deal, until the submitted form fails validation, in which case the postback url will be "/users." I don't like going to "/signup," only to see "/users" if my form fails validation. | |
The following is what I did to remedy this, seems simple, but am not sure if there is a "better" way? Suggestions? |
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
<% In your View. Note: :rel=>"nofollow" so that it's not crawled. %> | |
<%= link_to "Tooltip Link Text (Just Mouse Over)", "javascript:void(0);", | |
:id => "tooltip_id", :rel => "nofollow", :title => "This is the Tooltip Popup Text." %> |
NewerOlder