-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from palantirnet/feature/behat-tests
PL-32: Demo Functional tests using Behat.
- Loading branch information
Showing
8 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@javascript | ||
Feature: Drupal 7 search | ||
As a site visitor | ||
I want to search the Drupal 7 sites | ||
So that I can content from other sites | ||
|
||
Scenario: Search for "terrier" | ||
Given I visit "/search-app?search=terrier" | ||
When I wait for "1" second | ||
Then I should see the text "English Terrier" | ||
And I should see the text "Drupal 7 - Federated Search" | ||
And I should see the text "Federated Search Domain 3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@javascript | ||
Feature: Federated search filers | ||
As a site visitor | ||
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=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 "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=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 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=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 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@javascript | ||
Feature: Drupal 8 search | ||
As a site visitor | ||
I want to search the Drupal 8 sites | ||
So that I can read recipes | ||
|
||
Scenario: Search for "terrier" | ||
Given I visit "/search-app?search=terrier" | ||
And I wait for "1" second | ||
Then I should see the text "Jack Russell Terrier" | ||
And I should see the text "Federated Search Drupal 8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,5 @@ | |
- { role: mysql } | ||
- { role: apache } | ||
- { role: solr-cors } | ||
- { role: selenium-webdriver } | ||
- { role: drush } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
- name: Create directory for Selenium | ||
become: yes | ||
file: | ||
path: /usr/local/share/selenium | ||
state: directory | ||
|
||
- name: Selenium | ||
become: yes | ||
get_url: | ||
url: https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar | ||
dest: /usr/local/share/selenium/selenium-server-standalone.jar | ||
|
||
- name: Create directory for Chromedriver | ||
become: yes | ||
file: | ||
path: /usr/local/share/chromedriver | ||
state: directory | ||
|
||
- name: Download Chromedriver | ||
become: yes | ||
unarchive: | ||
remote_src: yes | ||
src: https://chromedriver.storage.googleapis.com/72.0.3626.7/chromedriver_linux64.zip | ||
dest: /usr/local/share/chromedriver | ||
mode: "+x" | ||
|
||
- name: "Install Chrome - Ensure Google linux signing key present" | ||
become: yes | ||
apt_key: | ||
url: https://dl-ssl.google.com/linux/linux_signing_key.pub | ||
|
||
- name: "Install Chrome - Ensure Google Chrome repo present" | ||
become: yes | ||
apt_repository: | ||
repo: "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | ||
filename: "google-chrome" | ||
state: present | ||
update_cache: yes | ||
|
||
- name: Install Chrome | ||
become: yes | ||
apt: | ||
name: google-chrome-stable |