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 search
When 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.

Comments

eliza411’s picture

Issue summary: View changes

Changing the proposed step words

eliza411’s picture

Issue tags: +sprint 2

Tagging for inclusion in sprint 2

kssundar’s picture

Assigned: Unassigned » kssundar
Status: Active » Needs work
kssundar’s picture

Issue summary: View changes

Adding what to update when this lands

kssundar’s picture

Status: Needs work » Needs review
StatusFileSize
new4.17 KB

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.

eliza411’s picture

Status: Needs review » Needs work

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");
  }
}
kssundar’s picture

Status: Needs work » Needs review
StatusFileSize
new3.98 KB

Here's the updated patch.

eliza411’s picture

Status: Needs review » Fixed

Committed, thanks!

pradeeprkara’s picture

Issue tags: +sprint 4

tagging for sprint 4

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Adding two example URLs