Fluffy.Navigation (Fluffy v0.2.0)

Copy Markdown View Source

Assertions for navigation results captured by Fluffy.Event.navigation/2.

Pass the capture key as the first argument and execute the returned assertion with Fluffy.expect/2. Capture waits for the event; assertions inspect its retained result. Options follow Fluffy.Expect.

Summary

Assertions

Expects the captured navigation source URL to match a string, regex, or structured components.

Expects the captured navigation's status to equal the supplied value.

Expects the captured navigation URL to match a string, regex, or structured components.

Assertions

to_have_from_url(key, expected, options \\ [])

@spec to_have_from_url(term(), Fluffy.Page.url_expectation(), [Fluffy.Expect.option()]) ::
  Fluffy.Expect.t()

Expects the captured navigation source URL to match a string, regex, or structured components.

Strings match exactly and regexes match against the complete captured URL. Relative strings are not resolved. Structured keywords use the same path, query, and fragment rules as Fluffy.Page.to_have_url/2.

to_have_status(key, expected, options \\ [])

@spec to_have_status(term(), integer(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()

Expects the captured navigation's status to equal the supplied value.

to_have_url(key, expected, options \\ [])

Expects the captured navigation URL to match a string, regex, or structured components.

Strings match exactly and regexes match against the complete captured URL. Relative strings are not resolved. Structured keywords use the same path, query, and fragment rules as Fluffy.Page.to_have_url/2.