Issue Summary
Problem/Motivation
(why the issue was filed, steps to reproduce the problem, etc.)
Behat's greedy matching means that the sitewide search seems to get found before the searches on all other pages, which makes us write extra step definitions each time that conflict arises. That's extra work we don't probably want to maintain.
Example URLs
The Views exposed filters at https://drupal.org/project/doobie and https://drupal.org/project/issues/doobie
Proposed resolution
(description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch)
I have implemented a step to allow us to target the sitewide searchWhen I search sitewide for ""
I'm hoping that we could write a step that looks something like:When I enter the term "" and press "" that excludes a match against the sitewide search's id tag.
If we include a comment beneath the step definition explaining the intent of the step it will appear with the -di output so people will undertand what it's intended for.
- Update #1681444: Problem with the submit button existing more than once in the same page. (search.feature project_search.feature) when this is implemented (and grep for the word search in the feature files)
- Remove the more static step definitions
Comments
#1
Tagging for inclusion in sprint 2
#2
#3
Attached is the patch file for the above step definition. The patch contains a sample feature that calls the step. The new step definition is like this:
When I fill in "doobie" for "Search for"
And I press "Search" in the "content" region
Then .............
Someone please review and let me know your thoughts.
#4
I was thinking of something more generic even than this, but as soon as I looked at the label-less search field on the issue sidebar, I think your strategy here is the right approach for now. Thanks for taking this forward.
Unfortunately, the patch isn't applying cleanly:
error: while searching for:}else
throw new Exception("No options/texts specified");
}
}
#5
Here's the updated patch.
#6
Committed, thanks!
#7
tagging for sprint 4
#8
Automatically closed -- issue fixed for 2 weeks with no activity.