@@ -496,7 +496,10 @@ defmodule LightningWeb.WorkflowLive.IndexTest do
496
496
live ( conn , ~p" /projects/#{ project . id } /w?q=nonexistent" )
497
497
498
498
assert html =~
499
- "No workflows found matching "nonexistent". Try a different search term."
499
+ "No workflows found matching "nonexistent". Try a different search term or"
500
+
501
+ assert html =~
502
+ "<a href=\" /projects/#{ project . id } /w/new\" data-phx-link=\" redirect\" data-phx-link-state=\" push\" class=\" link\" >\n create a new one"
500
503
end
501
504
end
502
505
@@ -641,7 +644,7 @@ defmodule LightningWeb.WorkflowLive.IndexTest do
641
644
{ :ok , _view , html } = live ( conn , ~p" /projects/#{ project . id } /w" )
642
645
643
646
assert html =~
644
- "No workflows found. Create your first workflow to get started ."
647
+ "No workflows found.\n <a href= \" /projects/ #{ project . id } /w/new \" data-phx-link= \" redirect \" data-phx-link-state= \" push \" class= \" link \" > \n Create one \n </a> \n to start automating ."
645
648
end
646
649
647
650
test "shows appropriate empty state message when search has no results" , % {
@@ -665,23 +668,26 @@ defmodule LightningWeb.WorkflowLive.IndexTest do
665
668
{ :ok , view , html } = live ( conn , ~p" /projects/#{ project . id } /w" )
666
669
667
670
assert html =~
668
- "No workflows found. Create your first workflow to get started ."
671
+ "No workflows found.\n <a href= \" /projects/ #{ project . id } /w/new \" data-phx-link= \" redirect \" data-phx-link-state= \" push \" class= \" link \" > \n Create one \n </a> \n to start automating ."
669
672
670
673
html =
671
674
view
672
675
|> element ( "input[name='search_workflows']" )
673
676
|> render_keyup ( % { value: "nonexistent" } )
674
677
675
678
assert html =~
676
- "No workflows found matching "nonexistent". Try a different search term."
679
+ "No workflows found matching "nonexistent". Try a different search term or"
680
+
681
+ assert html =~
682
+ "<a href=\" /projects/#{ project . id } /w/new\" data-phx-link=\" redirect\" data-phx-link-state=\" push\" class=\" link\" >\n create a new one"
677
683
678
684
html =
679
685
view
680
686
|> element ( "#clear_search_button" )
681
687
|> render_click ( )
682
688
683
689
assert html =~
684
- "No workflows found. Create your first workflow to get started ."
690
+ "No workflows found.\n <a href= \" /projects/ #{ project . id } /w/new \" data-phx-link= \" redirect \" data-phx-link-state= \" push \" class= \" link \" > \n Create one \n </a> \n to start automating ."
685
691
end
686
692
end
687
693
0 commit comments