Conversation
test/integration/element_test.exs
Outdated
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
There should be no more than 1 consecutive blank lines.
test/integration/element_test.exs
Outdated
| end | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
There should be no more than 1 consecutive blank lines.
test/integration/element_test.exs
Outdated
| assert {:ok, 1} == set_html(socket, "#my_element", "<p>Hello, World!</p> ") | ||
| end | ||
|
|
||
|
|
There was a problem hiding this comment.
There should be no more than 1 consecutive blank lines.
test/integration/element_test.exs
Outdated
| end | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
There should be no more than 1 consecutive blank lines.
test/integration/element_test.exs
Outdated
| assert visible_text(out) == "inner outer clicked" | ||
| end | ||
|
|
||
|
|
There was a problem hiding this comment.
There should be no more than 1 consecutive blank lines.
grych
left a comment
There was a problem hiding this comment.
Fix the spec, and please fix the ebert complains.
lib/drab/element.ex
Outdated
|
|
||
| Returns number of updated element. | ||
| """ | ||
| @spec set_html(Phoenix.Socket.t(), String.t(), String.t()) :: Drab.Core.result() | no_return |
There was a problem hiding this comment.
should be spec for set_html! (with bang)
test/integration/element_test.exs
Outdated
|
|
||
| test "set_html" do | ||
| socket = drab_socket() | ||
| assert {:ok, 1} == set_html(socket, "#my_element", "<p>Hello, World!</p> ") |
There was a problem hiding this comment.
Would be nice to check also if it was actually set, so after set_html check something like:
assert %{"#my_element" => %{"innerHTML" => "<p>Hello, World!</p>"}} == query_one!(socket, "#my_element", :innerHTML}
|
I'm back, I'm going to fix everything |
|
Ebert has finished reviewing this Pull Request and has found:
But beware that this branch is 56 commits behind the You can see more details about this review at https://ebertapp.io/github/grych/drab/pulls/134. |
Let me know if you need a more extensive test for this feature