Skip to content

Commit

Permalink
apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenDE committed Feb 17, 2024
1 parent 48501ce commit 24bcb24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"e2e:test": "mix assets.build && cd test/e2e && npx playwright test",
"js:test": "cd assets && npm install && npm run test",
"test": "npm run js:test && npm run e2e:test",
"cover:merge": "node js-coverage.mjs",
"cover:merge": "node test/e2e/merge-coverage.mjs",
"cover": "npm run test && npm run cover:merge",
"cover:report": "npx monocart show-report cover/merged-js/index.html"
}
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions test/e2e/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Application.put_env(:phoenix_live_view, Phoenix.LiveViewTest.E2E.Endpoint,
debug_errors: false
)

pid = self()
Process.register(self(), :e2e_helper)

defmodule Phoenix.LiveViewTest.E2E.ErrorHTML do
def render(template, _), do: Phoenix.Controller.status_message_from_template(template)
Expand Down Expand Up @@ -114,7 +114,7 @@ defmodule Phoenix.LiveViewTest.E2E.Endpoint do
defp health_check(conn, _opts), do: conn

defp halt(%{request_path: "/halt"}, _opts) do
send(unquote(pid), :halt)
send(:e2e_helper, :halt)
# this ensure playwright waits until the server force stops
Process.sleep(:infinity)
end
Expand All @@ -136,7 +136,7 @@ unless IEx.started?() do
# reading from stdin
spawn(fn ->
IO.read(:stdio, :line)
send(pid, :halt)
send(:e2e_helper, :halt)
end)

receive do
Expand Down

0 comments on commit 24bcb24

Please sign in to comment.