As test data, an account of the registry has shared one of its files (by its path from the top; uploaded from the fixtures when it does not have it) with another account of the registry, through the server's sharing API. The file and the share are removed after the scenario.
Examples
Given "user" has shared the file "meeting-notes.md" with "editor"
Given "user" has shared the file "Project files/team-photo.png" with "editor"
Given "editor" has shared the file "annual-report.pdf" with "user"
And "user" has shared the file "budget.txt" with "administrator"
Given "administrator" has shared the file "meeting-notes.md" with "user"
Pattern
Given(/^"([^"]*)" has shared the file "([^"]*)" with "([^"]*)"$/, …)
Part of @webship-js/nextcloud-steps (github.com/webship/nextcloud-steps), a step pack for Webship-js 2.0.x.