@@ -120,7 +120,7 @@ def self.add_child
120120 evaluate_ruby ( "TestComponent2.add_child" )
121121 page . should have_content ( "parent has 3 children" )
122122 end
123-
123+
124124 it "preserves the order of children" do
125125 isomorphic do
126126 ChildModel . class_eval do
@@ -211,7 +211,7 @@ class TestComponent3 < HyperComponent
211211 ChildModel . create ( child_attribute : :foo , test_model : TestModel . find ( 1 ) )
212212 page . should have_content ( 'child id = 2' )
213213 ChildModel . find ( 1 ) . destroy
214- sleep 0.1 # necessary for poltergeist to work with pusher faker
214+ sleep 0.1 # necessary for chrome driver to work with pusher faker
215215 page . should_not have_content ( 'child id = 1' , wait : 2 )
216216 end
217217
@@ -228,7 +228,7 @@ class TestComponent3 < HyperComponent
228228 evaluate_ruby do
229229 ChildModel . find ( 1 ) . destroy
230230 end
231- sleep 0.1 # necessary for poltergeist to work with pusher faker
231+ sleep 0.1 # necessary for chrome driver to work with pusher faker
232232 page . should_not have_content ( 'child id = 1' , wait : 2 )
233233 end
234234
@@ -242,10 +242,14 @@ class TestComponent3 < HyperComponent
242242 FactoryBot . create ( :child_model , test_model : m )
243243
244244 mount "TestComponent3" do
245+ class InnerComponent < HyperComponent
246+ param :child
247+ render { LI { "child id = #{ @Child . id } #{ @Child . test_model . test_attribute } " } }
248+ end
245249 class TestComponent3 < HyperComponent
246250 render ( OL ) do
247251 TestModel . all [ 0 ] . child_models . each do |child |
248- LI { " child id = #{ child . id } " }
252+ InnerComponent ( child : child )
249253 end
250254 end
251255 end
@@ -257,8 +261,9 @@ class TestComponent3 < HyperComponent
257261 ChildModel . create ( child_attribute : :foo , test_model : TestModel . find ( 1 ) )
258262 page . should have_content ( 'child id = 2' )
259263 ChildModel . find ( 1 ) . destroy
260- sleep 0.1 # necessary for poltergeist to work with pusher faker
264+ sleep 0.1 # necessary for chrome driver to work with pusher faker
261265 page . should_not have_content ( 'child id = 1' , wait : 2 )
266+ page . should have_content ( 'child id = 2' )
262267 end
263268
264269 it "will update when sent from the client" do
@@ -275,7 +280,7 @@ class TestComponent3 < HyperComponent
275280
276281 ChildModel . find ( 1 ) . destroy
277282 end
278- sleep 0.1 # necessary for poltergeist to work with pusher faker
283+ sleep 0.1 # necessary for chrome driver to work with pusher faker
279284 page . should_not have_content ( 'child id = 1' , wait : 2 )
280285 end
281286
0 commit comments