Upload an image or a document from a file, as a person does on the library's upload page: the file chosen (it is sent at once), then the title it gets (in place of the file's name) and, when given, its collection, then "Update". A file is found in the project's tests/assets/ folder, else among this pack's fixtures (webship-test-loaf.png, webship-test-recipe.pdf).
Examples
When I upload the image "webship-test-loaf.png" with the title "Webship test loaf"
When I upload the document "webship-test-recipe.pdf" with the title "Webship test recipe"
And I upload the image "webship-test-loaf.png" with the title "Webship test loaf" to the collection "Other"
When we upload the document "webship-test-recipe.pdf" with the title "Webship test recipe" to the collection "Recipes"
When I upload the image "webship-test-loaf.png" with the title "Webship test focal point"
Pattern
When(/^(?:I|we) upload the (image|document) "([^"]*)" with the title "([^"]*)"(?: to the collection "([^"]*)")?$/, …)
Part of @webship-js/wagtail-steps (github.com/webship/wagtail-steps), a step pack for Webship-js 2.0.x.