Capybara::Session with non-existant driver should raise an error Capybara::Driver::Terminus it should behave like driver #visit should move to another page should show the correct URL #body should return text reponses should return the full response html encoding of response between ascii and utf8 should be valid with html entities should be valid without html entities #find with xpath selector should extract node texts should extract node attributes should extract boolean node attributes should allow retrieval of the value should allow assignment of field value should extract node tag name should extract node visibility should extract node checked state should extract node selected state should return document text on /html selector it should behave like driver with header support should make headers available through response_headers it should behave like driver with status code support should make the status code available through status_code it should behave like driver with javascript support #find should find dynamically changed nodes #drag_to should drag and drop an object #evaluate_script should return the value of the executed script it should behave like driver with resynchronization support #find with synchronization turned on should wait for all ajax requests to finish with resynchronization turned off should not wait for ajax requests to finish with short synchronization timeout should raise an error it should behave like driver with frame support #within_frame should find the div in frameOne should find the div in FrameTwo should find the text div in the main window after finding text in frameOne should find the text div in the main window after finding text in frameTwo it should behave like driver with support for window switching #within_window should find the div in firstPopup should find the div in secondPopup should find the divs in both popups should find the div in the main window after finding a div in a popup it should behave like driver with cookies support #reset! should set and clean cookies it should behave like driver with infinite redirect detection should follow 5 redirects should not follow more than 5 redirects Capybara::Session with terminus driver it should behave like session should encode complex field names, like array[][value] #visit should fetch a response from the driver #body should return the unmodified page body #html should return the unmodified page body #source should return the unmodified page source #reset_session! removes cookies resets current host resets current path resets page body it should behave like all #all should find all elements using the given locator should return an empty array when nothing was found should accept an XPath instance with css selectors should find all elements using the given selector should find all elements when given a list of selectors with xpath selectors should find the first element using the given locator with css as default selector should find the first element using the given locator with visible filter should only find visible nodes should only find invisible nodes within a scope should find any element using the given locator it should behave like first #first should find the first element using the given locator should return nil when nothing was found should accept an XPath instance with css selectors should find the first element using the given selector with xpath selectors should find the first element using the given locator with css as default selector should find the first element using the given locator with visible filter should only find visible nodes if true given should include invisible nodes if false given with prefer visible elements should find invisible elements if no visible element exists should prefer visible elements over invisible elements should return the first invisible element if no visible elements exist find visible links normally without prefer visible elements should find invisible elements if no visible element exists should not prefer visible elements over invisible elements within a scope should find the first element using the given locator it should behave like attach_file #attach_file with normal form should set a file path by id (FAILED - 1) should set a file path by label (FAILED - 2) with multipart form should set a file path by id (FAILED - 3) should set a file path by label (FAILED - 4) should not break if no file is submitted should send content type text/plain when uploading a text file (FAILED - 5) should send content type image/jpeg when uploading an image (FAILED - 6) should not break when using HTML5 multiple file input (FAILED - 7) with a locator that doesn't exist should raise an error with a path that doesn't exist should raise an error it should behave like check #check should check a checkbox by id should check a checkbox by label 'checked' attribute should be true if checked should be false if unchecked checking should not change an already checked checkbox should check an unchecked checkbox unchecking should not change an already unchecked checkbox should uncheck a checked checkbox with a locator that doesn't exist should raise an error it should behave like choose #choose should choose a radio button by id should choose a radio button by label with a locator that doesn't exist should raise an error it should behave like click_link_or_button #click should click on a link should click on a button should click on a button with no type attribute should be aliased as click_on with a locator that doesn't exist should raise an error it should behave like click_button #click_button should serialize and send valueless buttons that were clicked should not send image buttons that were not clicked should serialize and send GET forms should follow redirects should post pack to the same URL when no action given should post pack to the same URL when blank action given with multiple values with the same name should use the latest given value with a form that has a relative url as an action should post to the correct url with a form that has no action specified should post to the correct url with value given on a submit button on a form with HTML5 fields should serialise and submit search fields should serialise and submit email fields should serialise and submit url fields should serialise and submit tel fields should serialise and submit color fields on an HTML4 form should serialize and submit text fields should escape fields when submitting should serialize and submit password fields should serialize and submit hidden fields should not serialize fields from other forms should submit the button that was clicked, but not other buttons should serialize radio buttons should serialize check boxes should serialize text areas should serialize select tag with values should serialize select tag without values should serialize first option for select tag with no selection should not serialize a select tag without options should not submit disabled fields with id given on a submit button should submit the associated form should work with partial matches with title given on a submit button should submit the associated form should work with partial matches with alt given on an image button should submit the associated form should work with partial matches with value given on an image button should submit the associated form should work with partial matches with id given on an image button should submit the associated form with title given on an image button should submit the associated form should work with partial matches with text given on a button defined by <button> tag should submit the associated form should work with partial matches should prefer exact matches over partial matches with id given on a button defined by <button> tag should submit the associated form should serialize and send GET forms with value given on a button defined by <button> tag should submit the associated form should work with partial matches should prefer exact matches over partial matches with title given on a button defined by <button> tag should submit the associated form should work with partial matches with a locator that doesn't exist should raise an error it should behave like click_link #click_link should follow redirects should follow redirects should add query string to current URL with naked query string should do nothing on anchor links should do nothing on URL+anchor links for the same page should follow link on URL+anchor links for a different page raise an error with links with no href with id given should take user to the linked page with text given should take user to the linked page should accept partial matches should prefer exact matches over partial matches with title given should take user to the linked page should accept partial matches should prefer exact matches over partial matches with alternative text given to a contained image should take user to the linked page should take user to the linked page should prefer exact matches over partial matches with a locator that doesn't exist should raise an error it should behave like fill_in #fill_in should fill in a text field by id should fill in a text field by name should fill in a text field by label without for should fill in a url field by label without for should favour exact label matches over partial matches should fill in a textarea by id should fill in a textarea by label should fill in a textarea by name should fill in a password field by id should fill in a field with a custom type should fill in a field without a type should fill in a text field respecting its maxlength attribute should fill in a password field by name should fill in a password field by label should fill in a password field by name should prefer exact matches over partial matches should throw an exception if a hash containing 'with' is not provided with ignore_hidden_fields should not find a hidden field with a locator that doesn't exist should raise an error it should behave like find_button #find_button should find any field should raise error if the field doesn't exist it should behave like find_field #find_field should find any field should raise error if the field doesn't exist should be aliased as 'field_labeled' for webrat compatibility it should behave like find_link #find_link should find any field should raise error if the field doesn't exist it should behave like find_by_id #find_by_id should find any element by id should raise error if no element with id is found it should behave like find #find should find the first element using the given locator should find the first element using the given locator and options should raise ElementNotFound with specified fail message if nothing was found should raise ElementNotFound with a useful default message if nothing was found should accept an XPath instance and respect the order of paths the returned node should act like a session object should scope CSS selectors with css selectors should find the first element using the given locator with id selectors should find the first element using the given locator with xpath selectors should find the first element using the given locator with custom selector should use the custom selector with custom selector with :for option should use the selector when it matches the :for option with custom selector with failure_message option should raise an error with the failure message if the element is not found should pass the selector as the second argument with css as default selector should find the first element using the given locator within a scope should find the first element using the given locator it should behave like has_content #has_content? should be true if the given content is on the page at least once should be true if scoped to an element which has the content should be false if scoped to an element which does not have the content should ignore tags should ignore extra whitespace and newlines should be false if the given content is not on the page should handle single quotes in the content should handle double quotes in the content should handle mixed single and double quotes in the content #has_no_content? should be false if the given content is on the page at least once should be false if scoped to an element which has the content should be true if scoped to an element which does not have the content should ignore tags should be true if the given content is not on the page should handle single quotes in the content should handle double quotes in the content should handle mixed single and double quotes in the content it should behave like has_css #has_css? should be true if the given selector is on the page should be false if the given selector is not on the page should respect scopes with between should be true if the content occurs within the range given should be false if the content occurs more or fewer times than range should be false if the content isn't on the page at all with count should be true if the content is on the page the given number of times should be false if the content occurs the given number of times should be false if the content isn't on the page at all should coerce count to an integer with maximum should be true when content occurs same or fewer times than given should be false when content occurs more times than given should be false if the content isn't on the page at all should coerce maximum to an integer with minimum should be true when content occurs same or more times than given should be false when content occurs fewer times than given should be false if the content isn't on the page at all should coerce minimum to an integer with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched #has_no_css? should be false if the given selector is on the page should be true if the given selector is not on the page should respect scopes with between should be false if the content occurs within the range given should be true if the content occurs more or fewer times than range should be true if the content isn't on the page at all with count should be false if the content is on the page the given number of times should be true if the content is on the page the given number of times should be true if the content isn't on the page at all should coerce count to an integer with maximum should be false when content occurs same or fewer times than given should be true when content occurs more times than given should be true if the content isn't on the page at all should coerce maximum to an integer with minimum should be false when content occurs more times than given should be true when content occurs fewer times than given should be true if the content isn't on the page at all should coerce minimum to an integer with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched it should behave like has_css #has_css? should be true if the given selector is on the page should be false if the given selector is not on the page should respect scopes with between should be true if the content occurs within the range given should be false if the content occurs more or fewer times than range should be false if the content isn't on the page at all with count should be true if the content is on the page the given number of times should be false if the content occurs the given number of times should be false if the content isn't on the page at all should coerce count to an integer with maximum should be true when content occurs same or fewer times than given should be false when content occurs more times than given should be false if the content isn't on the page at all should coerce maximum to an integer with minimum should be true when content occurs same or more times than given should be false when content occurs fewer times than given should be false if the content isn't on the page at all should coerce minimum to an integer with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched #has_no_css? should be false if the given selector is on the page should be true if the given selector is not on the page should respect scopes with between should be false if the content occurs within the range given should be true if the content occurs more or fewer times than range should be true if the content isn't on the page at all with count should be false if the content is on the page the given number of times should be true if the content is on the page the given number of times should be true if the content isn't on the page at all should coerce count to an integer with maximum should be false when content occurs same or fewer times than given should be true when content occurs more times than given should be true if the content isn't on the page at all should coerce maximum to an integer with minimum should be false when content occurs more times than given should be true when content occurs fewer times than given should be true if the content isn't on the page at all should coerce minimum to an integer with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched it should behave like has_selector #has_selector? should be true if the given selector is on the page should be false if the given selector is not on the page should use default selector should respect scopes with count should be true if the content is on the page the given number of times should be false if the content is on the page the given number of times should be false if the content isn't on the page at all with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched #has_no_selector? should be false if the given selector is on the page should be true if the given selector is not on the page should use default selector should respect scopes with count should be false if the content is on the page the given number of times should be true if the content is on the page the wrong number of times should be true if the content isn't on the page at all with text should discard all matches where the given string is contained should discard all matches where the given regexp is matched it should behave like has_xpath #has_xpath? should be true if the given selector is on the page should be false if the given selector is not on the page should use xpath even if default selector is CSS should respect scopes with count should be true if the content is on the page the given number of times should be false if the content is on the page the given number of times should be false if the content isn't on the page at all with text should discard all matches where the given string is not contained should discard all matches where the given regexp is not matched #has_no_xpath? should be false if the given selector is on the page should be true if the given selector is not on the page should use xpath even if default selector is CSS should respect scopes with count should be false if the content is on the page the given number of times should be true if the content is on the page the wrong number of times should be true if the content isn't on the page at all with text should discard all matches where the given string is contained should discard all matches where the given regexp is matched it should behave like has_link #has_link? should be true if the given link is on the page should be false if the given link is not on the page #has_no_link? should be false if the given link is on the page should be true if the given link is not on the page it should behave like has_button #has_button? should be true if the given button is on the page should be false if the given button is not on the page #has_no_button? should be true if the given button is on the page should be false if the given button is not on the page it should behave like has_field #has_field should be true if the field is on the page should be false if the field is not on the page with value should be true if a field with the given value is on the page should be false if the given field is not on the page should be true after the field has been filled in with the given value should be false after the field has been filled in with a different value #has_no_field should be false if the field is on the page should be true if the field is not on the page with value should be false if a field with the given value is on the page should be true if the given field is not on the page should be false after the field has been filled in with the given value should be true after the field has been filled in with a different value #has_checked_field? should be true if a checked field is on the page should be false if an unchecked field is on the page should be false if no field is on the page should be true after an unchecked checkbox is checked should be false after a checked checkbox is unchecked should be true after an unchecked radio button is chosen should be false after another radio button in the group is chosen #has_no_checked_field? should be false if a checked field is on the page should be true if an unchecked field is on the page should be true if no field is on the page #has_unchecked_field? should be false if a checked field is on the page should be true if an unchecked field is on the page should be false if no field is on the page should be false after an unchecked checkbox is checked should be true after a checked checkbox is unchecked should be false after an unchecked radio button is chosen should be true after another radio button in the group is chosen #has_no_unchecked_field? should be true if a checked field is on the page should be false if an unchecked field is on the page should be true if no field is on the page it should behave like has_select #has_select? should be true if the field is on the page should be false if the field is not on the page with selected value should be true if a field with the given value is on the page should be false if the given field is not on the page should be true after the given value is selected should be false after a different value is selected should be true after the given values are selected should be false after one of the values is unselected with options should be true if a field with the given options is on the page should be false if the given field is not on the page #has_no_select? should be false if the field is on the page should be true if the field is not on the page with selected value should be false if a field with the given value is on the page should be true if the given field is not on the page should be false after the given value is selected should be true after a different value is selected should be false after the given values are selected should be true after one of the values is unselected with options should be false if a field with the given options is on the page should be true if the given field is not on the page it should behave like has_table #has_table? should be true if the field is on the page should be false if the field is not on the page with rows should be true if a table with the given rows is on the page should be true if the given rows are incomplete should be false if the given table is not on the page should be false if the given rows contain incorrect elements should be false if the given rows are incorrectly ordered should be false if the only some of the given rows are correct should be false if the given rows are out of order #has_no_table? should be false if the field is on the page should be true if the field is not on the page with rows should be false if a table with the given rows is on the page should be false if the given rows are incomplete should be true if the given table is not on the page should be true if the given rows contain incorrect elements should be true if the given rows are incorrectly ordered should be true if the only some of the given rows are correct should be true if the given rows are out of order it should behave like select #select should return value of the first option should return value of the selected option should return the value attribute rather than content if present should select an option from a select box by id should select an option from a select box by label should select an option without giving a select box should favour exact matches to option labels should escape quotes should obey from show match labels with preceding or trailing whitespace with a locator that doesn't exist should raise an error with an option that doesn't exist should raise an error with multiple select should return an empty value should return value of the selected options should select one option should select multiple options should remain selected if already selected should return value attribute rather than content if present it should behave like text #text should print the text of the page with css as default selector should print the text of the page it should behave like uncheck #uncheck should uncheck a checkbox by id should uncheck a checkbox by label it should behave like unselect #unselect with multiple select should unselect an option from a select box by id should unselect an option without a select box should unselect an option from a select box by label should favour exact matches to option labels should escape quotes with single select should raise an error with a locator that doesn't exist should raise an error with an option that doesn't exist should raise an error it should behave like within #within with CSS selector should click links in the given scope should accept additional options with XPath selector should click links in the given scope with the default selector should use XPath with the default selector set to CSS should use CSS with click_link should click links in the given scope should raise an error if the scope is not found on the page should restore the scope when an error is raised with nested scopes should respect the inner scope should respect the outer scope with forms should fill in a field and click a button #within_fieldset should restrict scope to a fieldset given by id should restrict scope to a fieldset given by legend #within_table should restrict scope to a fieldset given by id should restrict scope to a fieldset given by legend it should behave like current_url #current_url should return the current url #current_path should show the correct location it should behave like current_host #current_host is affected by visiting a page directly returns to the app host when visiting a relative url is affected by setting Capybara.app_host is unaffected by following a relative link is affected by following an absolute link is unaffected by posting through a relative form is affected by posting through an absolute form it should behave like session with headers support #response_headers should return response headers it should behave like session with status code support #status_code should return response codes it should behave like session with javascript support all JS specs Node#drag_to should drag and drop an object #find should allow triggering of custom JS events #body should return the current state of the page #source should return the original, unmodified source of the page #evaluate_script should evaluate the given script and return whatever it produces #execute_script should execute the given script and return nothing #find should wait for asynchronous load #wait_until should wait for block to return true should raise Capybara::TimeoutError if block doesn't return true within timeout should accept custom timeout in seconds should default to Capybara.default_wait_time before timeout #click_link_or_button should wait for asynchronous load #click_link should wait for asynchronous load #click_button should wait for asynchronous load #fill_in should wait for asynchronous load #check should trigger associated events #has_xpath? should wait for content to appear #has_no_xpath? should wait for content to disappear #has_css? should wait for content to appear #has_no_xpath? should wait for content to disappear #has_content? should wait for content to appear #has_no_content? should wait for content to disappear 498 examples, 7 failures