When I submit the text "Found a defect in the login form." for the assignment "Testing diary"

Submit online text to an assignment of the scenario's course, the way a student does: "Add submission" (or "Edit submission" when there is one), the text typed into the "Online text" editor, then "Save changes". The browser ends on the assignment's page.

Examples

When I submit the text "Found a defect in the login form." for the assignment "Testing diary"
When we submit the text "The search returns nothing for an empty query." for the assignment "Testing diary"
And I submit the text "A short entry." for the assignment "Testing diary"
Given I submit the text "Found a defect in the login form." for the assignment "Testing diary"
When we submit the text "A second entry." for the assignment "Testing diary"

Pattern

When(/^(I |we )*submit the text "([^"]*)" for the assignment "([^"]*)"$/, …)

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