# Iamvery Elixir

[![Build Status](]( [![](](

A set of Elixir utilities for myself and others.
Using this Hex package as a test bed for ideas that may be eventually spun off as separate projects or open source contributions.

## Installation

If [available in Hex](, the package can be installed
by adding `iamvery` to your list of dependencies in `mix.exs`:

def deps do
    {:iamvery, "~> 0.8.0", only: :test}

Documentation can be generated with [ExDoc](
and published on [HexDocs]( Once published, the docs can
be found at <>.

## Phoenix LiveView Test Helpers

I've put together a set of test helper functions for testing Phoenix LiveView.
For more details on this pattern, see the [blog post][live-view-helpers-blog].

As a quick example, the helpers let you go from:

import Phoenix.LiveViewTest

test "live view", %{conn: conn} do
  {:ok, live, html} = live(conn, "/")
  assert html =~ "New"
  assert live |> element("") |> render_click() =~ "Enter new"
  assert_patch(live, "/new")
  {:ok, _, html} = live |> form(".form", @attrs) |> render_submit() |> follow_redirect(conn)
  assert html =~ "success"


use Iamvery.Phoenix.LiveView.TestHelpers

test "live view", %{conn: conn} do
  start(conn, "/")
  |> assert_html("New")
  |> click("")
  |> assert_html("Enter new")
  |> assert_path("/new")
  |> submit_form(".form", @attrs)
  |> assert_html("success")

## Copyright and License

Copyright (c) 2022, Jay Hayes.

Source code is licensed under the [MIT License](