# `PhoenixTest.Playwright.Case`
[🔗](https://github.com/ftes/phoenix_test_playwright/blob/v0.15.0/lib/phoenix_test/playwright/case.ex#L4)

ExUnit case module to assist with browser based tests.
`PhoenixTest.Playwright` and `PhoenixTest.Playwright.Config` explain
how to use and configure this module.

If the default setup behaviour and order does not suit you, consider
- using config opt `browser_context_opts`, which are passed to `PlaywrightEx.Browser.new_context/2`
- using config opt `browser_page_opts`, which are passed to `PlaywrightEx.BrowserContext.new_page/2`
- implementing your own `Case` (the setup functions in this module are public for your convenience)

# `do_setup`

Merges the ExUnit context with `PhoenixTest.Playwright.Config` opts.
Uses the result to create a new browser context and page.
Adds `:conn` to the context.

# `do_setup_all`

Merges the ExUnit context with `PhoenixTest.Playwright.Config` opts.
Uses the result to launch the browser.
Adds `:browser_id` to the context.

# `new_session`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
