Create a course in a category, the way an administrator does: course management, the category, "Create new course", the full name and the short name, then "Save and return". The step waits for the category to list it.
Examples
When I create the course "Throwaway course" with the short name "THROW1" in the category "Test courses"
When we create the course "Second throwaway course" with the short name "THROW2" in the category "Test courses"
And I create the course "Throwaway course" with the short name "THROW1" in the category "Test courses"
Given I create the course "Throwaway course" with the short name "THROW1" in the category "Category 1"
When we create the course "Throwaway course" with the short name "THROW1" in the category "Test courses"
Pattern
When(/^(I |we )*create the course "([^"]*)" with the short name "([^"]*)" in the category "([^"]*)"$/, …)
Part of @webship-js/moodle-steps (github.com/webship/moodle-steps), a step pack for Webship-js 2.0.x.