- Add
Pages.get_context
andPages.put_context
functions.
- Require Elixir 1.16 or greater.
- Drop support for Elixir 1.15. Test against Elixir 1.18.
- Relax version of
Phoenix.LiveView
to allow usage with1.0.0
.
- Relax version of
HtmlQuery
to anything greater than2.0.0
. Note that depending on the version ofHtmlQuery
, the output of forms may be different.
- Implement
c:Pages.Driver.open_browser/1
forPages.Driver.LiveView
.
- Add default context to
Pages.new
to avoid breaking change to API. - Fix ability to call
Pages.visit
on an existing page.
- Add a "context" map to the drivers to store whatever information test authors find useful.
- Fix case where new live view redirects back through a conn to another live view.
Pages.update_form
andPages.submit_form
may be called without a schema, by passingattrs
as a complete nested keyword or map of params.
Breaking changes:
c:Pages.Driver.submit_form/4
and c:Pages.Driver.submit_form/5
will always receive a map or keyword list of
attributes consisting of hidden fields to modify during submission. If one is only using Pages
top-level functions,
this should be safe—only calls directly to driver modules should be affected.
- Correctly follow
navigate
attribute on a component when navigating from live to dead view.
update_form/4
on conn behaves like live views, where unreferenced inputs are unset.- Conn driver form functions handle select, radio, and checkbox inputs.
- Implement
c:Pages.Driver.update_form/4
,c:Pages.Driver.submit_form/4
, andc:Pages.Driver.submit_form/2
forPages.Driver.Conn
with text inputs. - Implement
c:Pages.Driver.rerender/1
forPages.Driver.Conn
. - Visiting a conn without calling new goes directly to that path without first loading
/
.
- Improved detection of navigation between controllers and live views.
- Allow
Pages.visit/2
to be called with aPlug.Conn
.
- Fix documentation links to
Phoenix.LiveView
andPhoenix.HTML
.
- Loosen version restrictions for gestalt.
- Readme updates
- Verify support for Elixir 1.17.0.
- Breaking: Drop support for Elixir older than 1.15.0.
- Add
Pages.handle_redirect/1
and callback inPages.Driver.LiveView
, for cases whenhandle_info/2
may issue a redirect to the client. - Breaking change: Drop support for Elixir 1.13.
- Retain connect params (including sessions, for instance) when redirecting from a LiveView.
- Recycle the conn when redirecting (not live_redirecting) from a LiveView.
- Update documentation for
Pages.Driver.LiveView.live_redirect/2
to note how to set up tests for live redirects to work between live sessions.
- Update
HtmlQuery
dependency to a new major version.
- Add
t:Pages.result/0
to reflect that any function may return an error. - Pages return
{:error, :external, url}
when given a non-local URL.
- Add options to
Pages.update_form/5
, with ability to specify the field:target
.
- Add necessary configuration to readme.
- When a LiveView page navigates to a controller page,
{:error, :nosession}
may be returned when accessing the page via LiveViewTest functions. In that case, we reinitialize our page—it comes back as at:Pages.Driver.Conn.t/0
.
- Ensure connect params persists through clicks and trigger actions.
- Navigating between pages automatically retains any params set via
Phoenix.LiveViewTest.put_connect_params/2
. - Add
Pages.clear_connect_params/1
for manually resetting connect params on a page.
Pages.render_hook/4
includes an optional keyword of options.target: selector
sends the event to a nested live component.- LiveView page can handle a non-liveview redirect.
Pages.submit_form
takes an optional 5th parameter which can be used to set hidden fields.
- Conn driver automatically follows 301 redirects.
- The
title
param inPages.click
is now optional. Thanks Andrew! - Added
Pages.render_hook/3
andPages.render_upload/4
. Thanks Andrew!
- Properly handle LiveView redirects. Thanks Andrew!
- Handle multiple redirects in a row in a LiveView.
- Add
Pages.render_change/3
which is similar toPhoenix.LiveViewTest.render_change/2
.
- Use phoenix 1.6.14 in development to handle audit warning.
Pages.with_child_component/3
raises aPages.Error
if no child is found.
- Documentation of drivers links back towards
Pages
.
- Add text to documentation for interacting wth forms and sub-components.
- Recycle the
conn
before starting a new live view.
- Relax phoenix_live_view version restriction to allow for v0.18
- Fix callback definition for
c:Pages.Driver.click/4
.
Pages.click
can accept a:post
param to click on links whose data-method is "post"
- Documentation updates.
- Add
Pages.with_child_component/3
for acting on nested live views.
- Remove unused explicit dependency on Floki.
- Support LiveView 0.17.10, and allow future updates.
- Support LiveView 0.16 as well as 0.17.
- Extract
Pages.Html
andPages.Css
into newhtml_query
hex package.
Pages.Driver.LiveView
response handlers catch more cases:live_redirect
loads directly into anotherPages.Driver.LiveView
:redirect
loads callsPages.new/1
, as the next page may not be a live viewPages.Driver.LiveView.live_redirect/2
handles case where the next page loads.
- add
Pages.Driver.LiveView.live_redirect/2
- add
t:Floki.html_node/1
to possiblet:Pages.Html.html/0
types.
- add
Pages.rerender
to re-render the page.
- relax compatibility requirements of
Moar
package version.
Pages.Driver.LiveView.visit/2
handles redirect responses.
- Update
Moar
dependency to v1.0.0.
- Replace
Euclid
dependency withMoar
- Breaking change: remove
scope
parameter inPages.Html
. DisambiguatePages.Html.find
intofind
,find!
, andall
. Finder must be called before passing into other functions such asattr
. - Add docs
- Initial release