rails-dom-testing
rails-dom-testing copied to clipboard
Extracting DomAssertions and SelectorAssertions from ActionView.
We’re using [Cloudflare’s ESI include functionality](https://blog.cloudflare.com/edge-side-includes-with-cloudflare-workers/) and in our Rails tests we’re trying to check for the presence of the ESI tags like so: ```ruby assert_select 'esi:include[src="/foo"]' ``` Unfortunately this...
This seems consistent with the `assert_select` API... 👍 / 👎 ?
This would allow you to do something like... `assert_dom_equal rendered.at('.header'), "Rails Is Omakase"`
Given a page like so: ```html Users ... Total: 4781 ``` It's pretty reasonable to write something like this: ```ruby get "/users" assert_select "h1", "Users" assert_select ".total", User.count ``` However,...
The example `assert_select "feed[xmlns='http://www.w3.org/2005/Atom']"` fails against matching XML content. It succeeds when the same body is returned with a `text/html` content-type. Gist to reproduce the issue: https://gist.github.com/dnrce/1ce455ef4c3fbfff8fca43dea13da148 This example usage...
- **Add macos to supported platforms in Gemfile.lock** - **Add failing test for assert_dom collapsing whitespace** - **Add strict parameter to assert_dom** Fixes #121 Adds a `:strict` key to the...
- **Add macos to supported platforms in Gemfile.lock** - **Add failing test for assert_dom collapsing whitespace** - **Collapse whitespace from :text but not :html** Fixes #121 This PR is my...
In one of my views I have this: ```ruby × ``` My formatter automatically breaks this onto new lines like so: ```ruby × ``` Because of this, running a test...