File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
test/lightning_web/live/run_live Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -621,4 +621,32 @@ defmodule LightningWeb.RunLive.ComponentsTest do
621621 )
622622 |> Enum . any? ( )
623623 end
624+
625+ describe "bulk_rerun_modal/1" do
626+ test "handles missing workflow in humanize_search_params" do
627+ workflow = insert ( :simple_workflow )
628+ workflows = [ { "Test Workflow" , workflow . id } ]
629+
630+ filters = % Lightning.WorkOrders.SearchParams {
631+ workflow_id: Ecto.UUID . generate ( )
632+ }
633+
634+ html =
635+ render_component ( & Components . bulk_rerun_modal / 1 ,
636+ id: "bulk-rerun-modal" ,
637+ show: true ,
638+ all_selected?: true ,
639+ selected_count: 5 ,
640+ page_number: 1 ,
641+ pages: 2 ,
642+ total_entries: 10 ,
643+ filters: filters ,
644+ workflows: workflows
645+ )
646+
647+ assert html =~ "Run Selected Work Orders"
648+ assert html =~ "You've selected all 5 work orders"
649+ refute html =~ "for #{ workflow . name } workflow"
650+ end
651+ end
624652end
You can’t perform that action at this time.
0 commit comments