The Sharing tab of a file or folder of the list shows a share with an account (by its display name) — or does not; with a permission given, the share has it ("View only", "Can edit").
Examples
Then "meeting-notes.md" should be shared with "editor"
Then "meeting-notes.md" should be shared with "editor" as "View only"
Then "meeting-notes.md" should not be shared with "editor"
And "Project files" should be shared with "user" as "Can edit"
Then "team-photo.png" should not be shared with "administrator"
Pattern
Then(/^"([^"]*)" should( not)? be shared with "([^"]*)"(?: as "([^"]*)")?$/, …)
Part of @webship-js/nextcloud-steps (github.com/webship/nextcloud-steps), a step pack for Webship-js 2.0.x.