Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lessthanseventy committed Apr 14, 2023
1 parent 8202d73 commit 0db6bde
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,41 @@ end

## Usage

Simply call Excessibility.html_snapshot() and pass it either a Phoenix Conn or a
Wallaby Session. It will produce an html file named with the module and line
number it was called from.
Simply call Excessibility.html_snapshot() and pass it any of:

The module also includes a mix task that you can call to run pa11y against the
snapshots. `MIX_ENV=test mix excessibility`
- a Phoenix Conn
- a Wallaby Session
- a LiveViewTest View struct

## Default Configuration
It will produce an html file named with the module and line number of where it
was called from.

You can pass an optional argument of `open_browser?: true` to open the snapshot
in your browser.

```elixir
thing
|> html_snapshot(open_browser?: true)
```

The module also includes a mix task that you can call to run
[pa11y](https://github.com/pa11y/pa11y) against the snapshots.
`MIX_ENV=test mix excessibility`

## Default Configuration

```elixir
config :excessibility,
:assets_task, "assets.deploy",
:pa11y_path, "/assets/node_modules/pa11y/bin/pa11y.js",
:output_path, "test/excessibility"
```

## Pa11y Configuration

See the [pa11y documentation](https://github.com/pa11y/pa11y#configuration) for
configuration options.

Documentation can be generated with
[ExDoc](https://github.com/elixir-lang/ex_doc) and published on
[HexDocs](https://hexdocs.pm). Once published, the docs can be found at
Expand Down

0 comments on commit 0db6bde

Please sign in to comment.