Koha/t/db_dependent
Jonathan Druart ba41b7da79 Bug 10807: Add an authority search history for the OPAC
Like biblio, this feature provides an authority search history.
This history is available for connected and disconnected user.
If the user is not logged in Koha, the history is stored in an
anonymous user sessin.

The search history feature is now factorized in a new module.

This patch adds:
- 1 new db field search_history.type. It permits to distinguish the
  search type (biblio or authority).
- 1 new module C4::Search::History. It deals with 2 different storages:
  DB or cookie
- 2 new UT files: t/Search/History.t and t/db_dependent/Search/History.t
- 1 new behavior: the 'Search history' link (on the top-right corner of
  the screen) is always displayed.

Test plan:
 1/ Switch on the 'EnableOpacSearchHistory' syspref.
 2/ Go on the opac and log out.
 3/ Launch some biblio and authority searches.
 4/ Go on your search history page.
 5/ Check that all yours searches are displayed.
 6/ Click on some links and check that results are consistent.
 7/ Delete your biblio history searches.
 8/ Delete your authority searches history searches.
 9/ Launch some biblio and authority searches
10/ Delete all your history (cross on the top-right corner)
11/ Check that all your history search is empty.
12/ Launch some biblio and authority searches.
13/ Login to your account.
14/ Check that all previous searches are displayed.
15/ Launch some biblio and authority searches.
16/ Check that these previous searches are displayed under "Current
session".
17/ Play with the 4 delete links (current / previous and biblio /
authority).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All patches together pass QA script and tests.
Also, new tests in t/db_dependent/ pass.

Tested in all 4 OPAC themes, being logged in and anonymous.
Anonymous search history will be appended to personal search
history after logging in.
Also verified that cleanup_database still purges search history,
now also including the authority searchs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 02:32:27 +00:00
..
Acquisition Bug 7288: (follow-up) add unit test for is_linked_to_subscriptions flag 2014-04-21 05:16:29 +00:00
Circulation Bug 10859: (follow-up) GetIssues.t - Execute unit tests in a transaction 2014-04-21 05:30:25 +00:00
data Bug 11096: add regression tests for indexing/retrieving large MARC records 2014-02-28 19:48:37 +00:00
Koha
Labels
LDAP
Members
Record
Reports
Search Bug 10807: Add an authority search history for the OPAC 2014-05-05 02:32:27 +00:00
Serials Bug 12003: Do not calculate next pubdate for irregular subscriptions 2014-04-18 20:57:51 +00:00
www
00-strict.t Bug 7844: (follow-up) don't test koha.psgi for ability to compile (yet) 2014-04-29 19:34:23 +00:00
Accounts.t
Acquisition.t Bug 11027: (follow-up) update unit test to reflect new columns returned by GetLateOrders 2014-04-21 04:39:04 +00:00
Amazon.t
Auth.t Bug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie 2014-01-10 16:55:37 +00:00
Auth_with_cas.t
AuthoritiesMarc.t Bug 11797: add regression test 2014-04-15 16:01:24 +00:00
BackgroundJob.t
Barcodes.t
Biblio.t Bug 11912: (follow-up) Use the common way to mock syspref 2014-04-19 18:41:43 +00:00
Bookseller.t Bug 12048: add regression test 2014-04-18 20:45:58 +00:00
Borrower_Debarments.t Bug 12134: (follow-up) fix one of the IsDebarred() tests 2014-04-28 17:08:00 +00:00
Branch.t
Budgets.t Bug 7180: QA followup 2014-05-04 19:52:06 +00:00
Category.t Bug 11543: (followup) add one more test 2014-01-15 19:58:30 +00:00
check_sysprefs.t
Circulation.t Bug 7413: (follow-up) add direct unit tests 2014-04-08 23:05:13 +00:00
Circulation_Branch.t
Circulation_issue.t Bug 10694: (follow-up) remove truncate table from test case 2014-05-02 22:00:45 +00:00
Circulation_Issuingrule.t Bug 7413: Unit test 2014-04-07 18:28:58 +00:00
Circulation_issuingrules.t Bug 11934: (follow-up) tidy up whitespace 2014-03-13 15:18:49 +00:00
Circulation_OfflineOperation.t
Circulation_transfers.t Bug 11470: fix occassional spurious test failure in Circulation_transfers.t 2014-01-06 05:31:21 +00:00
ClassSource.t
Context.t Bug 11701: (follow-up) move unit tests to t/db_dependent 2014-03-25 14:41:07 +00:00
CourseReserves.t
Csv.t
External_BakerTaylor.t
Heading_MARC21.t
Holds.t Bug 10452: [QA Followup] - Unit tests 2014-03-10 18:15:33 +00:00
HoldsQueue.t Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy 2014-04-18 15:23:23 +00:00
Holidays.t
ILSDI_Services.t
Installer.t Bug 11541: (follow-up) move Installer.t to t/db_dependent 2014-01-14 21:43:56 +00:00
Items.t Bug 11518: (follow-up) Make unit tests pass 2014-04-29 15:06:24 +00:00
KitchenSinkPlugin.kpz
Koha.t
Koha_Authority.t
Koha_borrower_modifications.t
Koha_Database.t Bug 11906: regression test for using DBIC to store & fetch UTF8 strings 2014-03-27 14:44:39 +00:00
Koha_template_plugin_Branches.t Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases 2014-02-19 16:40:06 +00:00
Koha_template_plugin_KohaDates.t
Languages.t Bug 10986: (follow-up) add unit tests for getLanguages() and language filter 2014-04-19 17:34:34 +00:00
Letters.t Bug 9016: Create a message for each transport type. 2014-05-02 20:29:16 +00:00
Linker_FirstMatch.t
Log.t
MarcModificationTemplates.t
Members.t Bug 6739: (follow-up) add unit tests for GetMemberDetails()->{is_expired} 2014-05-05 02:07:32 +00:00
Members_columns.t
MungeMarcPrice.t Bug 9593: (follow-up) don't make currency.isocode required 2014-05-04 22:21:17 +00:00
NewsChannels.t Bug 7567: (follow-up) make tests of get_opac_new more readable 2014-04-07 18:14:20 +00:00
Overdues.t Bug 11696: ensure that print overdue notices use the print template 2014-05-02 20:29:21 +00:00
PatronLists.t
Plugins.t
Ratings.t
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reports_Guided.t Bug 9915: (follow-up) use SQL placeholders 2014-04-20 22:54:09 +00:00
ReportsGuided.t
Reserves.t Bug 10845: (follow-up) update how a test case counts print hold available notices 2014-05-02 20:29:19 +00:00
rollingloans.t
RotatingCollections.t
Search.t Bug 11334: (follow-up) teach the search tests to mock the DisplayLibraryFacets syspref 2014-04-30 03:29:46 +00:00
Search_SearchHistory.t
Serials.t Bug 11689: (follow-up) fix warnings generated when running Serials.t 2014-04-18 21:10:39 +00:00
Serials_2.t Bug 12098: (follow-up) deal with FIXMEs in t/db_dependent/Serials_2.t 2014-04-18 20:46:00 +00:00
Service.t
ShelfBrowser.t
SIP_ILS.t
SQLHelper.t
SuggestionEngine_ExplodedTerms.t
Suggestions.t Bug 11466: (follow-up) add additional test 2014-05-04 23:24:06 +00:00
sysprefs.t
Tags.t
UploadedFile.t
VirtualShelves.t Bug 9032: (follow-up) restore documented intepretation of virtualshelfshares.sharedate 2014-04-20 22:52:21 +00:00
VirtualShelves_Page.t
XISBN.t Bug 11439: (follow-up) adjust for change in list returned by OCLC XISBN 2014-01-30 15:48:48 +00:00
zebra_config.pl Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00