defmodule LambentExWeb.DevicesTest do
use LambentExWeb.ConnCase
import Phoenix.LiveViewTest
test "a multi-channel tasmota is listed rather than taking the page down", %{conn: conn} do
{:ok, live, _html} = live(conn, "/cfg/devices")
# trimmed from what a three channel tasmota reports: POWER1..3, no POWER
send(
live.pid,
{:devices_pub,
%{
"tasmota_F10E32" => %{
"Channel1" => 0,
"Color" => "02FF80",
"POWER1" => "OFF",
"POWER2" => "ON",
"POWER3" => "OFF",
"dname" => "default",
"name" => nil,
"place" => nil,
"type" => "mqtt-tasmota"
}
}}
)
html = render(live)
assert html =~ "tasmota_F10E32"
assert html =~ "MQTT (default)"
end
end
neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
816 B · text
History
9c0fc16