blacklight 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +0 -6
- data/Gemfile +5 -0
- data/README.md +1 -1
- data/Rakefile +0 -1
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/autofocus.js +16 -0
- data/app/assets/javascripts/blacklight/blacklight.js +1 -0
- data/app/assets/javascripts/blacklight/bookmark_toggle.js +2 -5
- data/app/assets/javascripts/blacklight/checkbox_submit.js +3 -6
- data/app/assets/javascripts/blacklight/core.js +24 -1
- data/app/assets/javascripts/blacklight/css_dropdowns.js +2 -2
- data/app/assets/javascripts/blacklight/facet_expand_contract.js +4 -3
- data/app/assets/javascripts/blacklight/lightbox_dialog.js +7 -1
- data/app/assets/javascripts/blacklight/search_context.js +1 -1
- data/app/assets/javascripts/blacklight/select_submit.js +1 -1
- data/app/assets/javascripts/blacklight/zebra_stripe.js +1 -1
- data/app/assets/stylesheets/blacklight/_blacklight_base.css.scss +1 -0
- data/app/assets/stylesheets/blacklight/_catalog.css.scss +5 -0
- data/app/assets/stylesheets/blacklight/_facets.css.scss +6 -0
- data/app/assets/stylesheets/blacklight/_group.css.scss +14 -0
- data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +1 -0
- data/app/controllers/bookmarks_controller.rb +2 -2
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +41 -24
- data/app/helpers/blacklight/catalog_helper_behavior.rb +48 -28
- data/app/helpers/blacklight/facets_helper_behavior.rb +9 -75
- data/app/models/record_mailer.rb +1 -16
- data/app/views/bookmarks/index.html.erb +2 -0
- data/app/views/catalog/_bookmark_control.html.erb +3 -4
- data/app/views/catalog/_document.html.erb +2 -1
- data/app/views/catalog/_document_header.html.erb +6 -3
- data/app/views/catalog/_email_form.html.erb +0 -7
- data/app/views/catalog/_facet_layout.html.erb +1 -1
- data/app/views/catalog/_group_default.html.erb +12 -0
- data/app/views/catalog/_index_default.html.erb +1 -1
- data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -3
- data/app/views/catalog/_paginate_compact.html.erb +2 -2
- data/app/views/catalog/_results_pagination.html.erb +2 -2
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/catalog/_sms_form.html.erb +1 -21
- data/app/views/catalog/_thumbnail_default.html.erb +5 -0
- data/app/views/catalog/email_sent.html.erb +9 -0
- data/app/views/catalog/index.atom.builder +7 -8
- data/app/views/catalog/index.html.erb +6 -3
- data/app/views/catalog/librarian_view.html.erb +1 -1
- data/app/views/catalog/sms_sent.html.erb +9 -0
- data/app/views/feedback/complete.html.erb +2 -0
- data/app/views/feedback/show.html.erb +7 -5
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +1 -1
- data/app/views/layouts/blacklight.html.erb +1 -2
- data/app/views/saved_searches/index.html.erb +2 -0
- data/app/views/search_history/index.html.erb +1 -1
- data/blacklight.gemspec +1 -1
- data/config/locales/blacklight.en.yml +11 -0
- data/config/locales/blacklight.fr.yml +15 -1
- data/gemfiles/rails3.gemfile +7 -0
- data/gemfiles/rails4.gemfile +7 -0
- data/lib/blacklight.rb +1 -0
- data/lib/blacklight/catalog.rb +101 -56
- data/lib/blacklight/configuration.rb +1 -1
- data/lib/blacklight/controller.rb +7 -4
- data/lib/blacklight/facet.rb +79 -0
- data/lib/blacklight/routes.rb +0 -1
- data/lib/blacklight/solr/document.rb +4 -0
- data/lib/blacklight/solr/document/marc_export.rb +1 -1
- data/lib/blacklight/solr_helper.rb +39 -8
- data/lib/blacklight/solr_response.rb +35 -3
- data/lib/blacklight/solr_response/facets.rb +4 -0
- data/lib/blacklight/solr_response/group.rb +33 -0
- data/lib/blacklight/solr_response/group_response.rb +49 -0
- data/lib/blacklight/solr_response/pagination_methods.rb +27 -0
- data/lib/blacklight/user.rb +30 -32
- data/lib/generators/blacklight/assets_generator.rb +3 -1
- data/lib/generators/blacklight/blacklight_generator.rb +28 -125
- data/lib/generators/blacklight/marc_generator.rb +66 -0
- data/lib/generators/blacklight/models_generator.rb +113 -0
- data/lib/generators/blacklight/templates/alternate_controller.rb +9 -0
- data/lib/generators/blacklight/templates/config/solr.yml +0 -2
- data/lib/generators/blacklight/templates/solr_document.rb +1 -13
- data/lib/railties/all_tests.rake +5 -8
- data/spec/controllers/catalog_controller_spec.rb +185 -113
- data/spec/features/alternate_controller_spec.rb +34 -0
- data/spec/features/bookmarks_spec.rb +58 -0
- data/spec/features/did_you_mean_spec.rb +135 -0
- data/spec/features/librarian_view_spec.rb +13 -0
- data/spec/features/record_view_spec.rb +37 -0
- data/spec/features/saved_searches_spec.rb +47 -0
- data/spec/features/search_filters_spec.rb +137 -0
- data/spec/features/search_history_spec.rb +75 -0
- data/spec/features/search_pagination_spec.rb +91 -0
- data/spec/features/search_results_spec.rb +68 -0
- data/spec/features/search_sort_spec.rb +20 -0
- data/spec/features/search_spec.rb +108 -0
- data/spec/helpers/blacklight_helper_spec.rb +45 -2
- data/spec/helpers/catalog_helper_spec.rb +134 -1
- data/spec/helpers/facets_helper_spec.rb +8 -0
- data/spec/lib/blacklight/solr_response/group_response_spec.rb +78 -0
- data/spec/lib/blacklight/solr_response/group_spec.rb +70 -0
- data/spec/lib/blacklight_solr_response_spec.rb +11 -5
- data/spec/lib/blacklight_user_spec.rb +22 -41
- data/spec/lib/solr_helper_spec.rb +73 -1
- data/spec/models/record_mailer_spec.rb +3 -3
- data/spec/models/{solr_docment_spec.rb → solr_document_spec.rb} +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/support/features.rb +7 -0
- data/spec/support/features/session_helpers.rb +22 -0
- data/spec/test_app_templates/Gemfile.extra +0 -4
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -6
- data/spec/test_app_templates/lib/tasks/blacklight_test_app.rake +1 -9
- data/spec/views/catalog/_facets.html.erb_spec.rb +2 -1
- data/tasks/blacklight.rake +0 -10
- metadata +49 -58
- data/features/bookmarks.feature +0 -68
- data/features/did_you_mean.feature +0 -123
- data/features/librarian_view.feature +0 -18
- data/features/record_view.feature +0 -40
- data/features/saved_searches.feature +0 -49
- data/features/search.feature +0 -83
- data/features/search_filters.feature +0 -119
- data/features/search_history.feature +0 -85
- data/features/search_pagination.feature +0 -53
- data/features/search_results.feature +0 -61
- data/features/search_sort.feature +0 -27
- data/features/step_definitions/bookmarks_steps.rb +0 -6
- data/features/step_definitions/error_steps.rb +0 -5
- data/features/step_definitions/general_steps.rb +0 -50
- data/features/step_definitions/record_view_steps.rb +0 -12
- data/features/step_definitions/saved_searches_steps.rb +0 -19
- data/features/step_definitions/search_facets_steps.rb +0 -29
- data/features/step_definitions/search_history_steps.rb +0 -9
- data/features/step_definitions/search_pagination_steps.rb +0 -29
- data/features/step_definitions/search_result_steps.rb +0 -115
- data/features/step_definitions/search_steps.rb +0 -118
- data/features/step_definitions/user_steps.rb +0 -5
- data/features/step_definitions/web_steps.rb +0 -217
- data/features/support/env.rb +0 -65
- data/features/support/paths.rb +0 -48
- data/features/support/selectors.rb +0 -40
- data/lib/railties/blacklight_cucumber.rake +0 -126
- data/lib/solrmarc.log.1 +0 -854
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
@did_you_mean
|
|
2
|
-
Feature: Did You Mean
|
|
3
|
-
As a user
|
|
4
|
-
In order to get great search results
|
|
5
|
-
I want to get "did you mean" suggestions for poor queries
|
|
6
|
-
|
|
7
|
-
Scenario: All Fields search - No Results with spelling suggestion
|
|
8
|
-
When I am on the home page
|
|
9
|
-
And I fill in "q" with "politica"
|
|
10
|
-
And I select "All Fields" from "search_field"
|
|
11
|
-
And I press "search"
|
|
12
|
-
Then I should see "Did you mean"
|
|
13
|
-
When I follow "policy"
|
|
14
|
-
Then I should get results
|
|
15
|
-
|
|
16
|
-
Scenario: Title search - No Results with spelling suggestion
|
|
17
|
-
When I am on the home page
|
|
18
|
-
# yehudiyam is one letter away from a title word
|
|
19
|
-
And I fill in "q" with "yehudiyam"
|
|
20
|
-
And I select "Title" from "search_field"
|
|
21
|
-
And I press "search"
|
|
22
|
-
Then I should see "Did you mean"
|
|
23
|
-
When I follow "yehudiyim"
|
|
24
|
-
Then I should get results
|
|
25
|
-
And I should see select list "select#search_field" with "Title" selected
|
|
26
|
-
|
|
27
|
-
Scenario: Author search - No Results with spelling suggestion
|
|
28
|
-
When I am on the home page
|
|
29
|
-
# shirma is one letter away from an author word
|
|
30
|
-
And I fill in "q" with "shirma"
|
|
31
|
-
And I select "Author" from "search_field"
|
|
32
|
-
And I press "search"
|
|
33
|
-
Then I should see "Did you mean"
|
|
34
|
-
When I follow "sharma"
|
|
35
|
-
Then I should get results
|
|
36
|
-
And I should see select list "select#search_field" with "Author" selected
|
|
37
|
-
|
|
38
|
-
Scenario: Subject search - No Results with spelling suggestion
|
|
39
|
-
When I am on the home page
|
|
40
|
-
# shirma is one letter away from an author word
|
|
41
|
-
And I fill in "q" with "wome"
|
|
42
|
-
And I select "Subject" from "search_field"
|
|
43
|
-
And I press "search"
|
|
44
|
-
Then I should see "Did you mean"
|
|
45
|
-
When I follow "women"
|
|
46
|
-
Then I should get results
|
|
47
|
-
And I should see select list "select#search_field" with "Subject" selected
|
|
48
|
-
|
|
49
|
-
Scenario: No Results - and no close spelling suggestions
|
|
50
|
-
When I am on the home page
|
|
51
|
-
And I fill in "q" with "ooofda ooofda"
|
|
52
|
-
And I press "search"
|
|
53
|
-
Then I should not see "Did you mean"
|
|
54
|
-
|
|
55
|
-
Scenario: No Results - multiword query should be separate links
|
|
56
|
-
When I am on the home page
|
|
57
|
-
And I fill in "q" with "politica boo"
|
|
58
|
-
And I select "All Fields" from "search_field"
|
|
59
|
-
And I press "search"
|
|
60
|
-
Then I should see "Did you mean"
|
|
61
|
-
When I follow "policy"
|
|
62
|
-
Then I should get results
|
|
63
|
-
|
|
64
|
-
Scenario: No Results - multiword query
|
|
65
|
-
When I am on the home page
|
|
66
|
-
And I fill in "q" with "politica boo"
|
|
67
|
-
And I select "All Fields" from "search_field"
|
|
68
|
-
And I press "search"
|
|
69
|
-
Then I should see "Did you mean"
|
|
70
|
-
When I follow "bon"
|
|
71
|
-
Then I should get results
|
|
72
|
-
|
|
73
|
-
Scenario: Num Results low enough to warrant spelling suggestion
|
|
74
|
-
Given I am on the home page
|
|
75
|
-
# ayaz gives a single results; bya gives more
|
|
76
|
-
And I fill in "q" with "ayaz"
|
|
77
|
-
And I press "search"
|
|
78
|
-
Then I should get results
|
|
79
|
-
And I should see "Did you mean"
|
|
80
|
-
When I follow "bya"
|
|
81
|
-
Then I should get results
|
|
82
|
-
|
|
83
|
-
Scenario: Too many results for spelling suggestion
|
|
84
|
-
Given I am on the home page
|
|
85
|
-
# histori gives 9 results in 30 record demo index
|
|
86
|
-
And I fill in "q" with "histori"
|
|
87
|
-
And I press "search"
|
|
88
|
-
Then I should not see "Did you mean"
|
|
89
|
-
|
|
90
|
-
Scenario: Exact Threshold number of results for spelling suggestion
|
|
91
|
-
Given I am on the home page
|
|
92
|
-
# polit gives 5 results in 30 record demo index - 5 is default cutoff
|
|
93
|
-
And I fill in "q" with "polit"
|
|
94
|
-
And I press "search"
|
|
95
|
-
Then I should see "Did you mean"
|
|
96
|
-
|
|
97
|
-
## can't get this to work with solr 3.4
|
|
98
|
-
## (something to do with the stemming for search fields vs dictionary fields)
|
|
99
|
-
## rsolr-ext doesn't expose enough of the solr return to filter within Blacklight either
|
|
100
|
-
# Scenario: Same number of results as spelling suggestion
|
|
101
|
-
# Given I am on the home page
|
|
102
|
-
# # den gives 1 result in 30 record demo index - suggestion don is 1 result also
|
|
103
|
-
# And I fill in "q" with "den"
|
|
104
|
-
# And I press "search"
|
|
105
|
-
# Then I should not see "Did you mean"
|
|
106
|
-
|
|
107
|
-
Scenario: Multiple terms should have individual links, not single query link
|
|
108
|
-
Given I am on the home page
|
|
109
|
-
And I fill in "q" with "politica boo"
|
|
110
|
-
And I press "search"
|
|
111
|
-
Then I should see "Did you mean"
|
|
112
|
-
And I should see "policy"
|
|
113
|
-
And I should see "bon"
|
|
114
|
-
And I should not see "policy bon"
|
|
115
|
-
|
|
116
|
-
Scenario: Repeated terms should only give a single suggestion
|
|
117
|
-
Given I am on the home page
|
|
118
|
-
And I fill in "q" with "boo boo"
|
|
119
|
-
And I press "search"
|
|
120
|
-
Then I should see "Did you mean"
|
|
121
|
-
And I should see "bon"
|
|
122
|
-
And I should not see "bon bon"
|
|
123
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Feature: Librarian view
|
|
2
|
-
In order to verify that we are showing the librarian view
|
|
3
|
-
As a user
|
|
4
|
-
I want to see raw data
|
|
5
|
-
|
|
6
|
-
Scenario: MARC
|
|
7
|
-
Given I am on the document page for id 2009373513
|
|
8
|
-
When I follow "Librarian View"
|
|
9
|
-
Then I should see "Librarian View"
|
|
10
|
-
And I should see "LEADER 01213nam a22003614a 4500"
|
|
11
|
-
And I should see "100"
|
|
12
|
-
And I should see "Lin, Xingzhi."
|
|
13
|
-
And I should see "6|"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
@record
|
|
2
|
-
Feature: Record View
|
|
3
|
-
In order to verify the information on the record view (CatalogController#show)
|
|
4
|
-
As a user
|
|
5
|
-
I want to see the appropriate information in context to the records being viewed
|
|
6
|
-
|
|
7
|
-
# DHF: Note, I removed the within 'dt' and 'dd' below - while possible to make it work
|
|
8
|
-
# it doesn't seem in line with the user-perspective nature of these cucumber tests
|
|
9
|
-
# and it also doesn't seem to add anything of value to test for these - but rather
|
|
10
|
-
# makes the test more brittle.
|
|
11
|
-
|
|
12
|
-
Scenario: Normal record
|
|
13
|
-
Given I am on the document page for id 2007020969
|
|
14
|
-
Then I should see "Title:"
|
|
15
|
-
And I should see "Strong Medicine speaks"
|
|
16
|
-
And I should see "Subtitle:"
|
|
17
|
-
And I should see "a Native American elder has her say : an oral history"
|
|
18
|
-
And I should see "Author:"
|
|
19
|
-
And I should see "Hearth, Amy Hill, 1958-"
|
|
20
|
-
And I should see "Format:"
|
|
21
|
-
And I should see "Book"
|
|
22
|
-
And I should see "Call number:"
|
|
23
|
-
And I should see "E99.D2 H437 2008"
|
|
24
|
-
And I should see link rel=alternate tags
|
|
25
|
-
|
|
26
|
-
Scenario: Blank titles do not show up
|
|
27
|
-
Given I am on the document page for id 2008305903
|
|
28
|
-
Then I should not see "More Information:"
|
|
29
|
-
|
|
30
|
-
Scenario: Vernacular record
|
|
31
|
-
Given I am on the document page for id 2009373513
|
|
32
|
-
Then I should see /次按驟變/
|
|
33
|
-
And I should see /林行止/
|
|
34
|
-
And I should see /臺北縣板橋市/
|
|
35
|
-
|
|
36
|
-
Scenario: a document is requested doesn't exist in solr
|
|
37
|
-
Given I am on the document page for id this_id_does_not_exist
|
|
38
|
-
Then I should get a status code 404
|
|
39
|
-
And I should see "Sorry, you have requested a record that doesn't exist."
|
|
40
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
@saved_searches
|
|
2
|
-
Feature: Saved Searches Page
|
|
3
|
-
As a user
|
|
4
|
-
In order see searches I've saved and reuse them
|
|
5
|
-
I want a page that shows my saved searches
|
|
6
|
-
|
|
7
|
-
Scenario: Menu Link
|
|
8
|
-
Given I am logged in as "user1"
|
|
9
|
-
When I am on the home page
|
|
10
|
-
Then I should see "Saved Searches"
|
|
11
|
-
When I follow "Saved Searches"
|
|
12
|
-
Then I should be on the saved searches page
|
|
13
|
-
And I should see a stylesheet
|
|
14
|
-
|
|
15
|
-
Scenario: No Searches
|
|
16
|
-
Given I am logged in as "user1"
|
|
17
|
-
Given no previous searches
|
|
18
|
-
When I go to the saved searches page
|
|
19
|
-
Then I should see "You have no saved searches"
|
|
20
|
-
|
|
21
|
-
# Scenario: Saved Searches not logged in
|
|
22
|
-
# When I go to the saved searches page
|
|
23
|
-
# Then I should see "Sign in"
|
|
24
|
-
|
|
25
|
-
Scenario: Saved Searches
|
|
26
|
-
Given I am logged in as "user1"
|
|
27
|
-
And "user1" has saved a search with term "book"
|
|
28
|
-
When I go to the saved searches page
|
|
29
|
-
Then I should see "Your saved searches"
|
|
30
|
-
And I should see "book"
|
|
31
|
-
|
|
32
|
-
Scenario: Deleting a Saved Search
|
|
33
|
-
Given I am logged in as "user1"
|
|
34
|
-
And "user1" has saved a search with term "book"
|
|
35
|
-
And I am on the saved searches page
|
|
36
|
-
Then I should see a "delete" button
|
|
37
|
-
When I press "delete"
|
|
38
|
-
Then I should see "Successfully removed that saved search."
|
|
39
|
-
|
|
40
|
-
Scenario: Clearing Saved Searches
|
|
41
|
-
Given I am logged in as "user1"
|
|
42
|
-
And "user1" has saved a search with term "book"
|
|
43
|
-
And "user1" has saved a search with term "dang"
|
|
44
|
-
And I am on the saved searches page
|
|
45
|
-
Then I should see "Clear Saved Searches"
|
|
46
|
-
When I follow "Clear Saved Searches"
|
|
47
|
-
Then I should see "Cleared your saved searches."
|
|
48
|
-
And I should see "You have no saved searches"
|
|
49
|
-
|
data/features/search.feature
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
@search
|
|
2
|
-
Feature: Search
|
|
3
|
-
In order to find documents
|
|
4
|
-
As a user
|
|
5
|
-
I want to enter terms, select fields, and select number of results per page
|
|
6
|
-
|
|
7
|
-
Scenario: Search Page
|
|
8
|
-
When I go to the catalog page
|
|
9
|
-
Then I should see a search field
|
|
10
|
-
And I should see a selectable list with field choices
|
|
11
|
-
And I should see a "search" button
|
|
12
|
-
And I should not see the "startOverLink" element
|
|
13
|
-
And I should see "Welcome!"
|
|
14
|
-
And I should see a stylesheet
|
|
15
|
-
|
|
16
|
-
Scenario: Search Page's type of search ("fielded search") choices
|
|
17
|
-
When I am on the home page
|
|
18
|
-
Then I should see select list "select#search_field" with field labels "All Fields, Title, Author, Subject"
|
|
19
|
-
|
|
20
|
-
Scenario: Submitting a Search
|
|
21
|
-
When I am on the home page
|
|
22
|
-
And I fill in "q" with "history"
|
|
23
|
-
And I select "All Fields" from "search_field"
|
|
24
|
-
And I press "search"
|
|
25
|
-
Then I should be on "the catalog page"
|
|
26
|
-
And I should see an rss discovery link
|
|
27
|
-
And I should see an atom discovery link
|
|
28
|
-
And I should see opensearch response metadata tags
|
|
29
|
-
And I should see "You searched for:"
|
|
30
|
-
And I should see "All Fields"
|
|
31
|
-
And I should see "history"
|
|
32
|
-
And I should see select list "select#search_field" with "All Fields" selected
|
|
33
|
-
And I should see "1."
|
|
34
|
-
And I should see "2."
|
|
35
|
-
And I should see "3."
|
|
36
|
-
And I should see "Sort by"
|
|
37
|
-
|
|
38
|
-
Scenario: Submitting a Search with specific field selected
|
|
39
|
-
When I am on the home page
|
|
40
|
-
And I fill in "q" with "inmul"
|
|
41
|
-
And I select "Title" from "search_field"
|
|
42
|
-
And I press "search"
|
|
43
|
-
Then I should be on "the catalog page"
|
|
44
|
-
And I should see "You searched for:"
|
|
45
|
-
And I should see "Title"
|
|
46
|
-
And I should see "inmul"
|
|
47
|
-
And I should see select list "select#search_field" with "Title" selected
|
|
48
|
-
And I should see "1."
|
|
49
|
-
And I should see "1 to 1 of 1"
|
|
50
|
-
|
|
51
|
-
Scenario: Results Page Shows Vernacular (Linked 880) Fields
|
|
52
|
-
Given I am on the home page
|
|
53
|
-
And I fill in "q" with "history"
|
|
54
|
-
When I press "search"
|
|
55
|
-
Then I should see /次按驟變/
|
|
56
|
-
|
|
57
|
-
Scenario: Results Page Shows Call Numbers
|
|
58
|
-
Given I am on the home page
|
|
59
|
-
And I fill in "q" with "history"
|
|
60
|
-
When I press "search"
|
|
61
|
-
Then I should see "Call number:"
|
|
62
|
-
And I should see "DK861.K3 V5"
|
|
63
|
-
|
|
64
|
-
Scenario: Results Page Has Sorting Available
|
|
65
|
-
Given I am on the home page
|
|
66
|
-
And I fill in "q" with "history"
|
|
67
|
-
When I press "search"
|
|
68
|
-
Then I should see the sort dropdown with values "relevance, year, author, title"
|
|
69
|
-
|
|
70
|
-
Scenario: Can clear a search
|
|
71
|
-
When I am on the home page
|
|
72
|
-
And I fill in "q" with "history"
|
|
73
|
-
And I press "search"
|
|
74
|
-
Then I should be on "the catalog page"
|
|
75
|
-
And I should see "You searched for:"
|
|
76
|
-
And I should see "All Fields"
|
|
77
|
-
And I should see "history"
|
|
78
|
-
And the "q" field should contain "history"
|
|
79
|
-
When I follow "Start Over"
|
|
80
|
-
Then I should be on "the catalog page"
|
|
81
|
-
And I should see "Welcome!"
|
|
82
|
-
And the "q" field should not contain "history"
|
|
83
|
-
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
Feature: Search Filters
|
|
2
|
-
In order constrain searches
|
|
3
|
-
As a user
|
|
4
|
-
I want to filter search results via facets on the search page
|
|
5
|
-
|
|
6
|
-
Scenario: Filter a blank search
|
|
7
|
-
Given I am on the home page
|
|
8
|
-
When I follow "Tibetan"
|
|
9
|
-
Then I should see "1 - 6 of 6"
|
|
10
|
-
And I should see the applied facet "Language" with the value "Tibetan 6"
|
|
11
|
-
When I follow "India"
|
|
12
|
-
Then I should see "1 - 2 of 2"
|
|
13
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
14
|
-
And I should see the applied facet "Region" with the value "India 2"
|
|
15
|
-
|
|
16
|
-
Scenario: Search with no filters applied
|
|
17
|
-
When I am on the home page
|
|
18
|
-
And I fill in "q" with "bod"
|
|
19
|
-
And I press "search"
|
|
20
|
-
Then I should be on "the catalog page"
|
|
21
|
-
And I should see "1 - 3 of 3"
|
|
22
|
-
And I should not see "No Keywords"
|
|
23
|
-
And I should see "You searched for:"
|
|
24
|
-
And I should see "All Fields"
|
|
25
|
-
And I should see "bod"
|
|
26
|
-
|
|
27
|
-
Scenario: Search with filters applied
|
|
28
|
-
When I am on the home page
|
|
29
|
-
And I fill in "q" with "history"
|
|
30
|
-
And I press "search"
|
|
31
|
-
Then I should be on "the catalog page"
|
|
32
|
-
And I should see "1 - 9 of 9"
|
|
33
|
-
And I should not see "No Keywords"
|
|
34
|
-
And I should see "You searched for:"
|
|
35
|
-
And I should see "All Fields"
|
|
36
|
-
And I should see "history"
|
|
37
|
-
When I follow "Tibetan"
|
|
38
|
-
Then I should see "1 - 2 of 2"
|
|
39
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
40
|
-
And I should see "All Fields"
|
|
41
|
-
And I should see "history"
|
|
42
|
-
When I follow "2004"
|
|
43
|
-
Then I should see "1 to 1 of 1"
|
|
44
|
-
And I should see "You searched for:"
|
|
45
|
-
And I should see the applied facet "Language" with the value "Tibetan 1"
|
|
46
|
-
And I should see the applied facet "Publication Year" with the value "2004 1"
|
|
47
|
-
|
|
48
|
-
Scenario: Apply and remove filters
|
|
49
|
-
Given I am on the home page
|
|
50
|
-
When I follow "Tibetan"
|
|
51
|
-
And I should see "Language"
|
|
52
|
-
And I should see "Tibetan 6"
|
|
53
|
-
And I should see "[remove]"
|
|
54
|
-
When I follow "remove"
|
|
55
|
-
Then I should not see "You searched for:"
|
|
56
|
-
And I should not see "Language: Tibetan [remove]"
|
|
57
|
-
And I should see "Welcome!"
|
|
58
|
-
|
|
59
|
-
Scenario: Changing search term should retain filters
|
|
60
|
-
When I am on the home page
|
|
61
|
-
And I fill in "q" with "history"
|
|
62
|
-
And I press "search"
|
|
63
|
-
Then I should be on "the catalog page"
|
|
64
|
-
And I should see "You searched for:"
|
|
65
|
-
And I should see "history"
|
|
66
|
-
When I follow "Tibetan"
|
|
67
|
-
Then I should see "You searched for:"
|
|
68
|
-
And I should see "history"
|
|
69
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
70
|
-
When I follow "2004"
|
|
71
|
-
And I should see "You searched for:"
|
|
72
|
-
And I should see "history"
|
|
73
|
-
And I should see the applied facet "Language" with the value "Tibetan 1"
|
|
74
|
-
And I should see the applied facet "Publication Year" with the value "2004 1"
|
|
75
|
-
When I fill in "q" with "china"
|
|
76
|
-
And I press "search"
|
|
77
|
-
Then I should be on "the catalog page"
|
|
78
|
-
And I should see "All Fields"
|
|
79
|
-
And I should see "china"
|
|
80
|
-
And I should see the applied facet "Language" with the value "Tibetan 1"
|
|
81
|
-
And I should see the applied facet "Publication Year" with the value "2004 1"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Scenario: Sorting results should retain filters
|
|
85
|
-
When I am on the home page
|
|
86
|
-
And I fill in "q" with "history"
|
|
87
|
-
And I press "search"
|
|
88
|
-
Then I should be on "the catalog page"
|
|
89
|
-
And I should see "You searched for:"
|
|
90
|
-
And I should see "history"
|
|
91
|
-
When I follow "Tibetan"
|
|
92
|
-
And I should see "You searched for:"
|
|
93
|
-
And I should see "history"
|
|
94
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
95
|
-
When I sort by "title"
|
|
96
|
-
Then I should be on "the catalog page"
|
|
97
|
-
And I should see "You searched for:"
|
|
98
|
-
And I should see "history"
|
|
99
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Scenario: Changing per page number should retain filters
|
|
103
|
-
When I am on the home page
|
|
104
|
-
And I fill in "q" with "history"
|
|
105
|
-
And I press "search"
|
|
106
|
-
Then I should be on "the catalog page"
|
|
107
|
-
And I should see "You searched for:"
|
|
108
|
-
And I should see "history"
|
|
109
|
-
When I follow "Tibetan"
|
|
110
|
-
And I should see "You searched for:"
|
|
111
|
-
And I should see "All Fields"
|
|
112
|
-
And I should see "history"
|
|
113
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
114
|
-
When I show 20 per page
|
|
115
|
-
Then I should be on "the catalog page"
|
|
116
|
-
And I should see "You searched for:"
|
|
117
|
-
And I should see "history"
|
|
118
|
-
And I should see the applied facet "Language" with the value "Tibetan 2"
|
|
119
|
-
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@search_history
|
|
2
|
-
Feature: Search History Page
|
|
3
|
-
As a user
|
|
4
|
-
In order see searches I've used and reuse them
|
|
5
|
-
I want a page that shows my (unique) search history from this session
|
|
6
|
-
|
|
7
|
-
Scenario: Menu Link
|
|
8
|
-
When I am on the home page
|
|
9
|
-
Then I should see "History"
|
|
10
|
-
When I go to the search history page
|
|
11
|
-
And I should see a stylesheet
|
|
12
|
-
|
|
13
|
-
Scenario: Have No Searches
|
|
14
|
-
Given no previous searches
|
|
15
|
-
When I go to the search history page
|
|
16
|
-
Then I should see "You have no search history"
|
|
17
|
-
|
|
18
|
-
Scenario: Have Searches
|
|
19
|
-
Given I have done a search with term "book"
|
|
20
|
-
When I go to the search history page
|
|
21
|
-
Then I should see "Your recent searches"
|
|
22
|
-
And I should see "book"
|
|
23
|
-
And I should not see "dang"
|
|
24
|
-
Given I have done a search with term "dang"
|
|
25
|
-
When I go to the search history page
|
|
26
|
-
Then I should see "dang"
|
|
27
|
-
And I should see "book"
|
|
28
|
-
|
|
29
|
-
Scenario: Clearing Search History
|
|
30
|
-
Given I have done a search with term "book"
|
|
31
|
-
And I have done a search with term "dang"
|
|
32
|
-
And I am on the search history page
|
|
33
|
-
Then I should see "Clear Search History"
|
|
34
|
-
When I follow "Clear Search History"
|
|
35
|
-
Then I should see "Cleared your search history."
|
|
36
|
-
And I should see "You have no search history"
|
|
37
|
-
Then I should not see "book"
|
|
38
|
-
And I should not see "dang"
|
|
39
|
-
|
|
40
|
-
Scenario: Saving a Search when logged in
|
|
41
|
-
Given I am logged in as "user1"
|
|
42
|
-
And I have done a search with term "book"
|
|
43
|
-
And I am on the search history page
|
|
44
|
-
Then I should see a "save" button
|
|
45
|
-
When I press "save"
|
|
46
|
-
Then I should see "Successfully saved your search."
|
|
47
|
-
And I should be on the search history page
|
|
48
|
-
And I should see a "forget" button
|
|
49
|
-
|
|
50
|
-
# Scenario: Saving a Search when not logged in
|
|
51
|
-
# Given I have done a search with term "book"
|
|
52
|
-
# And I am on the search history page
|
|
53
|
-
# Then I should see a "save" button
|
|
54
|
-
# When I press "save"
|
|
55
|
-
# Then I should see "Sign in"
|
|
56
|
-
|
|
57
|
-
Scenario: Un-Saving a Search when logged in
|
|
58
|
-
Given I am logged in as "user1"
|
|
59
|
-
And I have done a search with term "book"
|
|
60
|
-
And I am on the search history page
|
|
61
|
-
Then I should see a "save" button
|
|
62
|
-
When I press "save"
|
|
63
|
-
Then I should see "Successfully saved your search."
|
|
64
|
-
And I should be on the search history page
|
|
65
|
-
And I should see a "forget" button
|
|
66
|
-
When I press "forget"
|
|
67
|
-
Then I should see "Successfully removed that saved search."
|
|
68
|
-
And I should be on the search history page
|
|
69
|
-
And I should see a "save" button
|
|
70
|
-
|
|
71
|
-
Scenario: Visiting Search History with saved searches after logging out
|
|
72
|
-
Given I am logged in as "user1"
|
|
73
|
-
And I have done a search with term "book"
|
|
74
|
-
And I am on the search history page
|
|
75
|
-
Then I should see a "save" button
|
|
76
|
-
When I press "save"
|
|
77
|
-
Then I should see "Successfully saved your search."
|
|
78
|
-
And I should be on the search history page
|
|
79
|
-
And I should see a "forget" button
|
|
80
|
-
When I follow "Log Out"
|
|
81
|
-
Then I should see "Login"
|
|
82
|
-
And I should not see "user1"
|
|
83
|
-
When I go to the search history page
|
|
84
|
-
Then I should not see "book"
|
|
85
|
-
|