-
Sean Doyle authored
Introduce the `ActionText::RichTextEditorTest` to exercise Action Text's integration with Active Storage. First, assert that Action Text renders an Active Storage blob preview of the image within the `<trix-editor>` element prior to persisting the rich-text record. Next, assert that Active Storage renders the uploaded file within the rendered rich-text content. In addition to expanding System Test coverage, this commit also alters the existing `ActionText::SystemTestHelperTest` coverage to utilize Capybara's built-in [:element][] selector as an alternative to CSS. The `:element` selector supports arbitrary keyword arguments as HTML attribute filters. For example, `input: true` as a filter translates to asserting the presence of any `[input]` attribute. Similarly, it enables assertions with Ruby strings instead of interpolating Ruby strings **into** CSS selectors. [:element]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Selector
Sean Doyle authoredIntroduce the `ActionText::RichTextEditorTest` to exercise Action Text's integration with Active Storage. First, assert that Action Text renders an Active Storage blob preview of the image within the `<trix-editor>` element prior to persisting the rich-text record. Next, assert that Active Storage renders the uploaded file within the rendered rich-text content. In addition to expanding System Test coverage, this commit also alters the existing `ActionText::SystemTestHelperTest` coverage to utilize Capybara's built-in [:element][] selector as an alternative to CSS. The `:element` selector supports arbitrary keyword arguments as HTML attribute filters. For example, `input: true` as a filter translates to asserting the presence of any `[input]` attribute. Similarly, it enables assertions with Ruby strings instead of interpolating Ruby strings **into** CSS selectors. [:element]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Selector
Loading