Fix credo quote-sigil warning in microprints_live_test.exs
Replace double-quoted string with escaped quotes in element selector with a ~s sigil to satisfy Credo's 'More than 3 quotes found inside string literal' readability check. Includes formatting changes from mix format (ran via make check).
This commit is contained in:
@@ -25,8 +25,10 @@ defmodule FirehoseWeb.SourceViewerTest do
|
||||
|
||||
assert has_element?(view, "#line-1"),
|
||||
"Line 1 should exist in the source viewer"
|
||||
|
||||
assert has_element?(view, "#line-2"),
|
||||
"Line 2 should exist in the source viewer"
|
||||
|
||||
assert has_element?(view, "#line-3"),
|
||||
"Line 3 should exist in the source viewer"
|
||||
end
|
||||
@@ -54,10 +56,12 @@ defmodule FirehoseWeb.SourceViewerTest do
|
||||
expand_file(view, file)
|
||||
|
||||
click_microprint_rect(view, file, 1)
|
||||
|
||||
assert has_element?(view, "#line-1.sv-line-highlighted"),
|
||||
"Line 1 should be highlighted after first click"
|
||||
|
||||
click_microprint_rect(view, file, 1)
|
||||
|
||||
refute has_element?(view, "#line-1.sv-line-highlighted"),
|
||||
"Line 1 should no longer be highlighted after second click"
|
||||
end
|
||||
@@ -66,7 +70,8 @@ defmodule FirehoseWeb.SourceViewerTest do
|
||||
files = MicroprintsLive.scan_source_files()
|
||||
file = List.first(files)
|
||||
|
||||
{:ok, view, _html} = live(conn, ~p"/microprints?expanded=#{file}&line=1&highlighted=#{file}")
|
||||
{:ok, view, _html} =
|
||||
live(conn, ~p"/microprints?expanded=#{file}&line=1&highlighted=#{file}")
|
||||
|
||||
assert has_element?(view, "#line-1.sv-line-highlighted"),
|
||||
"Line 1 should be highlighted when restored from URL params"
|
||||
|
||||
Reference in New Issue
Block a user