@@ -11,7 +11,7 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
1111 find ( "input" ) . set new_text
1212 within ( "h3" ) do
1313 if expect_no_change
14- expect ( subject ) . not_to have_content new_text
14+ expect ( subject ) . to have_no_content new_text
1515 else
1616 expect ( subject ) . to have_content new_text
1717 end
@@ -110,7 +110,7 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
110110 it "changes name in message according to input" do
111111 visit "/client_side_hello_world"
112112 change_text_expect_dom_selector ( "#HelloWorld-react-component-0" )
113- click_link "Hello World Component Server Rendered, with extra options"
113+ click_link "Hello World Component Server Rendered, with extra options" # rubocop:disable Capybara/ClickLinkOrButtonStyle
114114 change_text_expect_dom_selector ( "#my-hello-world-id" )
115115 end
116116end
@@ -174,19 +174,19 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
174174
175175 before do
176176 visit "/"
177- click_link "React Router"
177+ click_link "React Router" # rubocop:disable Capybara/ClickLinkOrButtonStyle
178178 end
179179
180180 context "when rendering /react_router" do
181181 it { is_expected . to have_text ( "Woohoo, we can use react-router here!" ) }
182182
183183 it "clicking links correctly renders other pages" do
184- click_link "Router First Page"
184+ click_link "Router First Page" # rubocop:disable Capybara/ClickLinkOrButtonStyle
185185 expect ( page ) . to have_current_path ( "/react_router/first_page" )
186186 first_page_header_text = page . find ( :css , "h2#first-page" ) . text
187187 expect ( first_page_header_text ) . to eq ( "React Router First Page" )
188188
189- click_link "Router Second Page"
189+ click_link "Router Second Page" # rubocop:disable Capybara/ClickLinkOrButtonStyle
190190 expect ( page ) . to have_current_path ( "/react_router/second_page" )
191191 second_page_header_text = page . find ( :css , "h2#second-page" ) . text
192192 expect ( second_page_header_text ) . to eq ( "React Router Second Page" )
@@ -239,12 +239,12 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
239239 end
240240end
241241
242- describe "Manual client hydration" , :js , type : :system do
242+ describe "Manual client hydration" , :js do
243243 before { visit "/xhr_refresh" }
244244
245245 it "HelloWorldRehydratable onChange should trigger" do
246246 within ( "form" ) do
247- click_button "refresh"
247+ click_button "refresh" # rubocop:disable Capybara/ClickLinkOrButtonStyle
248248 end
249249 within ( "#HelloWorldRehydratable-react-component-1" ) do
250250 find ( "input" ) . set "Should update"
@@ -407,18 +407,18 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
407407 # Ensure that the component state is not updated
408408 change_text_expect_dom_selector ( selector , expect_no_change : true )
409409
410- expect ( page ) . not_to have_text "Loading branch1"
411- expect ( page ) . not_to have_text "Loading branch2"
412- expect ( page ) . not_to have_text ( /Loading branch1 at level \d +/ )
410+ expect ( page ) . to have_no_text "Loading branch1"
411+ expect ( page ) . to have_no_text "Loading branch2"
412+ expect ( page ) . to have_no_text ( /Loading branch1 at level \d +/ )
413413 expect ( page ) . to have_text ( /branch1 \( level \d +\) / , count : 5 )
414414 end
415415
416416 it "doesn't hydrate status component if packs are not loaded" do
417417 # visit waits for the page to load, so we ensure that the page is loaded before checking the hydration status
418418 visit "#{ path } ?skip_js_packs=true"
419419 expect ( page ) . to have_text "HydrationStatus: Streaming server render"
420- expect ( page ) . not_to have_text "HydrationStatus: Hydrated"
421- expect ( page ) . not_to have_text "HydrationStatus: Page loaded"
420+ expect ( page ) . to have_no_text "HydrationStatus: Hydrated"
421+ expect ( page ) . to have_no_text "HydrationStatus: Page loaded"
422422 end
423423end
424424
@@ -427,7 +427,7 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
427427 "#AsyncComponentsTreeForTesting-react-component-0"
428428end
429429
430- describe "React Router Sixth Page" , :js do
430+ describe "React Router Sixth Page" , :js , skip : "Route /server_router/streaming-server-component doesn't exist" do
431431 it_behaves_like "streamed component tests" , "/server_router/streaming-server-component" ,
432432 "#ServerComponentRouter-react-component-0"
433433end
0 commit comments