@@ -103,7 +103,7 @@ defmodule ElixirConsoleWeb.ConsoleLiveTest do
103103 { :ok , view , _html } = live ( conn , "/" )
104104
105105 input = element ( view , "#command_input input" )
106- render_keydown ( input , % { "key" => "Tab" , "value" => "Enum.co" , "caret_position" => 7 } )
106+ render_hook ( input , :suggest , % { "value" => "Enum.co" , "caret_position" => 7 } )
107107
108108 html = render ( view )
109109
@@ -114,7 +114,7 @@ defmodule ElixirConsoleWeb.ConsoleLiveTest do
114114 { :ok , view , _html } = live ( conn , "/" )
115115
116116 input = element ( view , "#command_input input" )
117- render_keydown ( input , % { "key" => "Tab" , "value" => "Enum.conc" , "caret_position" => 9 } )
117+ render_hook ( input , :suggest , % { "value" => "Enum.conc" , "caret_position" => 9 } )
118118
119119 html = render ( view )
120120
@@ -128,12 +128,7 @@ defmodule ElixirConsoleWeb.ConsoleLiveTest do
128128 { :ok , view , _html } = live ( conn , "/" )
129129
130130 input = element ( view , "#command_input input" )
131-
132- render_keydown ( input , % {
133- "key" => "Tab" ,
134- "value" => "Enum.co([1,2]) - 2" ,
135- "caret_position" => 7
136- } )
131+ render_hook ( input , :suggest , % { "value" => "Enum.co([1,2]) - 2" , "caret_position" => 7 } )
137132
138133 html = render ( view )
139134
@@ -146,11 +141,7 @@ defmodule ElixirConsoleWeb.ConsoleLiveTest do
146141 input = element ( view , "#command_input input" )
147142
148143 html =
149- render_keydown ( input , % {
150- "key" => "Tab" ,
151- "value" => "Enum.conc([1,2], [3])" ,
152- "caret_position" => 9
153- } )
144+ render_hook ( input , :suggest , % { "value" => "Enum.conc([1,2], [3])" , "caret_position" => 9 } )
154145
155146 assert html =~ ~r/ \< input .* data-input_value\= "Enum.concat\( \[ 1,2\] , \[ 3\] \) "/
156147 assert html =~ ~r/ \< input .* data-caret_position\= "11"/
0 commit comments