@@ -13,7 +13,7 @@ defmodule E2eWeb.AdminLiveTest do
1313 terms: true ,
1414 level: 5 ,
1515 currency: "eur" ,
16- tags: "alpha, beta"
16+ tags: [ "alpha" , " beta"]
1717 }
1818 @ update_attrs % {
1919 name: "some updated name" ,
@@ -22,7 +22,7 @@ defmodule E2eWeb.AdminLiveTest do
2222 terms: true ,
2323 level: 3 ,
2424 currency: "usd" ,
25- tags: "gamma, delta"
25+ tags: [ "gamma" , " delta"]
2626 }
2727 @ invalid_attrs % {
2828 name: "" ,
@@ -32,7 +32,7 @@ defmodule E2eWeb.AdminLiveTest do
3232 terms: false ,
3333 level: 1 ,
3434 currency: "" ,
35- tags: ""
35+ tags: [ "" ]
3636 }
3737 @ invalid_attrs_edit % {
3838 name: "" ,
@@ -41,7 +41,7 @@ defmodule E2eWeb.AdminLiveTest do
4141 terms: false ,
4242 level: 5 ,
4343 currency: "eur" ,
44- tags: "alpha, beta"
44+ tags: [ "alpha" , " beta"]
4545 }
4646
4747 defp create_admin ( _ ) do
@@ -215,7 +215,7 @@ defmodule E2eWeb.AdminLiveTest do
215215 "terms" => "false" ,
216216 "level" => "42" ,
217217 "currency" => "eur" ,
218- "tags" => "alpha, beta"
218+ "tags" => [ "alpha" , " beta"]
219219 }
220220
221221 html = render_change ( form_live , "validate" , % { "admin" => attrs } )
@@ -236,7 +236,7 @@ defmodule E2eWeb.AdminLiveTest do
236236 "name" => "h" ,
237237 "country" => "" ,
238238 "currency" => "" ,
239- "tags" => "" ,
239+ "tags" => [ "" ] ,
240240 "birth_date" => "" ,
241241 "signature" => "" ,
242242 "terms" => "false" ,
@@ -260,7 +260,7 @@ defmodule E2eWeb.AdminLiveTest do
260260 "name" => "updated" ,
261261 "country" => "fra" ,
262262 "currency" => "eur" ,
263- "tags" => "alpha, beta" ,
263+ "tags" => [ "alpha" , " beta"] ,
264264 "birth_date" => "" ,
265265 "signature" => "" ,
266266 "terms" => "false" ,
@@ -291,10 +291,10 @@ defmodule E2eWeb.AdminLiveTest do
291291 ~r/ <input\b (?=[^>]*\b type="text")(?=[^>]*\b name="admin\[ currency\] ")[^>]*\b data-part="hidden-input"/
292292
293293 assert html =~
294- ~r/ <input\b (?=[^>]*\b type="text ")(?=[^>]*\b name="admin\[ tags\] ")[^>]*\b data-part="value -input"/
294+ ~r/ <input\b (?=[^>]*\b type="hidden ")(?=[^>]*\b name="admin\[ tags\] \[ \] ")[^>]*\b data-part="array -input"/
295295
296296 refute html =~
297- ~r/ <input\b (?=[^>]*\b type="hidden")(?=[^>]*\b name="admin\[ (country|currency|tags )\] ")/
297+ ~r/ <input\b (?=[^>]*\b type="hidden")(?=[^>]*\b name="admin\[ (country|currency)\] ")/
298298 end
299299 end
300300end
0 commit comments