This file contains hidden or 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_on('Link Text') # Click either a link or a button | |
click_on('Button Value') |
This file contains hidden or 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
# coffeescript rules | |
# Pagination is sticked with model | |
# | |
# Server should response in that way: | |
# { | |
# articles: [{category_id:null, id:308,…}, {category_id:null, id:307,…}, {category_id:null, id:306,…},…] | |
# pagination: {total:34, page:2, per_page:15, cat_id:-1, source_id:-1} | |
# } | |
# To achieve this controller should look like (using will_paginate gem): | |
# per_page = params[:per_page].to_i || 15 |