Then the discussion "A question about flaky tests" in the forum "Class discussion" should have the reply "Wait on the page, not on the clock."

Assert that a discussion of a forum of the scenario's course has, or does not have, a reply holding a text, from the account the step names (a handle of the users registry, or a full name) when it names one.

Examples

Then the discussion "A question about flaky tests" in the forum "Class discussion" should have the reply "Wait on the page, not on the clock."
Then the discussion "A question about flaky tests" in the forum "Class discussion" should not have the reply "Wait on the clock."
And the discussion "Study group" in the forum "Class discussion" should have the reply "I join." from "student"
Then the discussion "A question about flaky tests" in the forum "Class discussion" should have the reply "Wait on the page, not on the clock." from "teacher"
But the discussion "Study group" in the forum "Class discussion" should not have the reply "I join." from "teacher"

Pattern

Then(/^the discussion "([^"]*)" in the forum "([^"]*)" should( not)* have the reply "([^"]*)"(?: from "([^"]*)")?$/, …)

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