rails-jsdom 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ require_relative "test_helper"
2
+
3
+ module RailsJsdom
4
+ # Base class for interaction tests. It is an
5
+ # `ActionDispatch::IntegrationTest` that includes RailsJsdom::TestHelper, so
6
+ # fixtures, sign-in helpers that post to your session controller,
7
+ # `perform_enqueued_jobs` and every Rails assertion work as usual.
8
+ #
9
+ # class ProjectFilterInteractionTest < RailsJsdom::TestCase
10
+ # setup do
11
+ # sign_in_as users(:owner)
12
+ # visit projects_path
13
+ # end
14
+ #
15
+ # test "filtering by name leaves one card visible" do
16
+ # fill_in "search", with: "Billing"
17
+ #
18
+ # assert_dom "[data-project-filter-target=card]:not([hidden])", count: 1
19
+ # end
20
+ # end
21
+ #
22
+ # After each test the page is discarded; the Node process stays up for the
23
+ # next test in the same worker.
24
+ class TestCase < ActionDispatch::IntegrationTest
25
+ include TestHelper
26
+
27
+ teardown { RailsJsdom.bridge.reset }
28
+ end
29
+ end