Then the layer "Rectangle" should be a component

Assert that a layer is a component (a main component, its icon in the layer tree) or a variant, or is not.

Examples

Then the layer "Rectangle" should be a component
Then the layer "Value 1" should be a variant
And the layer "Value 2" should be a variant
Then the layer "Ellipse" should not be a component
Then the layer "Board" should be a component

Pattern

Then(/^the layer "([^"]*)" should( not)? be a (component|variant)$/, …)

Part of @webship-js/penpot-steps (github.com/webship/penpot-steps), a step pack for Webship-js 2.0.x.