Skip to content

Commit

Permalink
Adds behat tests passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
agentrickard committed Feb 6, 2020
1 parent 68b76e2 commit d2e5d11
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions features/drupal-8-search-filters.feature
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
@javascript
Feature: Drupal 8 search filers
Feature: Federated search filers
As a site visitor
I want to search the Drupal 8 sites
I want to search the federated sites
And I want to filter my results
So that I can find relevant information more quickly

Scenario: Filter by type
Given I visit "/search-app?search=pasta"
Given I visit "/search-app?search=terrier"
And I wait for "1" second
# When I expand the "Type" filter
When I click the "#solr-list-facet-ss_federated_type" element
# When I select the "Article" filter
And I check "Article"
Then I should see the text "The umami guide to our favorite mushrooms"
And I should not see the text "Super easy vegetarian pasta bake"
Then I should see the text "Jack Russell Terrier"
And I should see the text "English Terrier"
And I should see the text "Irish Terrier"

Scenario: Filter by site - D8 single
Given I visit "/search-app?search=pasta"
Given I visit "/search-app?search=terrier"
And I wait for "1" second
# When I expand the "Site Name" filter
When I click the "#solr-list-facet-sm_site_name" element
# When I select the "Federated Search Demo (D8, single)" filter
And I check "Federated Search Demo (D8, single)"
Then I should see the text "Federated Search Demo (D8, single)"
And I should not see the text "Federated Search Demo (D8, domain one)"
# When I select the "Federated Search Drupal 8" filter
And I check "Federated Search Drupal 8"
Then I should see the text "Federated Search Drupal 8"
And I should see the text "Jack Russell Terrier"
And I should see the text "Boston Terrier"
And I should not see the text "Drupal 7 - Federated Search"
And I should not see the text "Federated Search Domain 3"

Scenario: Filter by site - D8 domain
Given I visit "/search-app?search=pasta"
Given I visit "/search-app?search=terrier"
And I wait for "1" second
# When I expand the "Site Name" filter
When I click the "#solr-list-facet-sm_site_name" element
# When I select the "Federated Search Demo (D8, domain one)" filter
And I check "Federated Search Demo (D8, domain one)"
Then I should see the text "Federated Search Demo (D8, domain one)"
And I should not see the text "Federated Search Demo (D8, single)"
# When I select the "Federated Search Domain 3" filter
And I check "Federated Search Domain 3"
Then I should see the text "Federated Search Domain 3"
And I should see the text "Norfolk Terrier"
And I should see the text "Federated Search Drupal 8"
And I should not see the text "Drupal 7 - Federated Search"

0 comments on commit d2e5d11

Please sign in to comment.