When I search the site for "hello world"

Open the search results for a term, through the site's own search URL (/?s=term). It tests the results template and the search itself on any theme, with or without a search form on the page. To test the form, use "I use the search form to search for".

Examples

When I search the site for "hello world"
When we search for "contact"
And search the site for "example"
When we search the site for "Sample title"
And I search for "widgets"

Pattern

When(/^(I |we )*search (?:the site )?for "([^"]*)?"$/, …)

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