When I set the category of the task to "Bug"

Set the open task's category through its sidebar's "Edit the task": the category, then Save.

Examples

When I set the category of the task to "Bug"
When we set the category of the task to "Bug"
And I set the category of the task to "Bug"
And we set the category of the task to "Bug"
Then I set the category of the task to "Bug"

Pattern

When(/^(I |we )*set the category of the task to "([^"]*)"$/, …)

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