Assert a warning message is, or is not, visible and, when a text is given, that it contains that text: the severity core uses for "this worked, but you should know something", such as the notices of the status report and of the module pages. Found by aria-label="Warning message", then the .messages--warning class of core's themes, or the "warning message" named selector.
Examples
Then I should see a warning message
And we should see a warning
Then should see a warning message
And I should see the warning message "Update notifications are not enabled."
Then we should not see a warning message
Pattern
Then(/^(I |we )*should( not)* see (?:a|the) warning(?: message)?(?: "([^"]*)")?$/, …)
Part of @webship-js/drupal-cms-steps (github.com/webship/drupal-cms-steps), a step pack for Webship-js 2.0.x.