Skip to content

Commit 27b9fb8

Browse files
committed
add .iex.exs for a11y test development
1 parent ca29b95 commit 27b9fb8

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.iex.exs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defmodule Run do
2+
def playground do
3+
IO.puts("Starting Phoenix Playground...")
4+
5+
PhoenixPlayground.start(
6+
live: PetalComponentsWeb.A11yLive,
7+
open_browser: true,
8+
live_reload: true
9+
)
10+
end
11+
end

lib/petal_components_web/a11y_live.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ defmodule PetalComponentsWeb.A11yLive do
33
A LiveView to test the accessibility of Petal Components using `:a11y_audit`.
44
55
It's worth noting that this view is ugly because classes defined with @apply
6-
are not able to be processed for Phoenix Playground at this time.
6+
are not able to be processed for Phoenix Playground at this time (as far as I can tell).
77
88
To run locally:
99
$ iex -S mix
10-
iex> PhoenixPlayground.start(live: PetalComponentsWeb.A11yLive)
10+
iex> Run.playground()
1111
"""
1212
use Phoenix.LiveView
1313
use PetalComponents

test/test_helper.exs

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Application.put_env(:wallaby, :base_url, "http://localhost:4000")
2222

2323
# Teardown code
2424
ExUnit.after_suite(fn res ->
25-
IO.inspect(res, label: "Test result!")
2625
%{failures: no_of_failures} = res
2726
passed? = no_of_failures == 0
2827
PhoenixPlaygroundHelper.shutdown()

0 commit comments

Comments
 (0)