A normalized download captured by Fluffy.wait_for/3,4 with
Fluffy.Event.download/2.
Assertion constructors accept the capture key and return a Fluffy.Expect
value for Fluffy.expect/2. Capture waits for the event; assertions inspect
the retained result. Options follow Fluffy.Expect.
Summary
Assertions
Expects the complete downloaded bytes to equal the supplied binary; no text decoding is performed.
Expects the captured download's content type to equal the supplied value.
Expects the download size in bytes.
Expects the captured download's suggested filename to equal the supplied value.
Expects the captured download URL to match a string, regex, or structured components.
Types
Assertions
@spec to_have_content(term(), binary(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the complete downloaded bytes to equal the supplied binary; no text decoding is performed.
@spec to_have_content_type(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured download's content type to equal the supplied value.
@spec to_have_size(term(), non_neg_integer(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the download size in bytes.
@spec to_have_suggested_filename(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured download's suggested filename to equal the supplied value.
@spec to_have_url(term(), Fluffy.Page.url_expectation(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured download 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.