Group the layers that are selected (Ctrl+G): a layer "Group" holds them and is selected.
Examples
When I group the selection
When we group the selection
And I group the selection
Then I group the selection
When I group the selection
Pattern
When(/^(?:I|we) group the selection$/, …)
Part of @webship-js/penpot-steps (github.com/webship/penpot-steps), a step pack for Webship-js 2.0.x.