Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
FunctionalLucenePluginFacetingTest Class Reference
Inheritance diagram for FunctionalLucenePluginFacetingTest:
FunctionalLucenePluginBaseTestCase WebTestCase

Public Member Functions

 testEmptyResultSet ()
 
 testFacetFilterSelection ()
 
 testFacetingFilterNavigation ()
 
 testFilteredCategories ()
 
 testHideEmptyCategoriesAndNonSelectiveFacets ()
 
 testMultipleFacetFilterSelection ()
 
 testOnlyShowFacetsInTheUiLanguage ()
 

Protected Member Functions

 getAffectedTables ()
 
 setUp ()
 
- Protected Member Functions inherited from FunctionalLucenePluginBaseTestCase
 simpleSearch ($searchPhrase, $searchField= 'query', $articles=array(), $notArticles=array(), $locale= 'en_US', $journal= 'lucene-test')
 
 simpleSearchAcrossJournals ($searchTerm, $locale= 'en_US')
 
- Protected Member Functions inherited from WebTestCase
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ()
 
 setUp ()
 
 tearDown ()
 
 verified ()
 
 verifyAndOpen ($url)
 

Detailed Description

Integration/Functional test for the "faceting" feature of the lucene plug-in.

See Also
LucenePlugin

FEATURE: faceting

Definition at line 24 of file FunctionalLucenePluginFacetingTestCase.php.

Member Function Documentation

FunctionalLucenePluginFacetingTest::getAffectedTables ( )
protected
FunctionalLucenePluginFacetingTest::setUp ( )
protected
FunctionalLucenePluginFacetingTest::testEmptyResultSet ( )

SCENARIO: empty result set WHEN I execute a search query that produces no results (e.g. "+nonexistent keyword") THEN I do not see a faceting block plugin.

Definition at line 178 of file FunctionalLucenePluginFacetingTestCase.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginFacetingTest::testFacetFilterSelection ( )

SCENARIO OUTLINE: facet filter selection GIVEN I executed a search query returning the articles with {id 1} and {id 2} (e.g. "lucene doi") WHEN I click on {facet filter} THEN I'll see a refined result list containing the article with {id 1} BUT I'll no longer see the article with {id 2} in the result AND I'll see the selected facet as a filter above the result set with the text "{facet filter}" AND the category of {facet filter} no longer appears in the facet filter navigation block.

EXAMPLES:

id 1 | id 2 | facet filter

3 | 4 | discipline: "exotic food" 1 | 3 | keyword: "22a10 general topological groups" 4 | 3 | method/approach: "personal experience" 4 | 3 | coverage: "the 21st century" 3 | 4 | publication date: "2012" 3 | 1 | journal: "lucene-test" 3 | 4 | author: "authorname, second a"

Definition at line 231 of file FunctionalLucenePluginFacetingTestCase.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginFacetingTest::testFacetingFilterNavigation ( )

SCENARIO: faceting filter navigation WHEN I execute a cross-journal search that produces results with articles that contain meta-data for all facet categories (e.g. "lucene doi") THEN I see a faceting block plugin wich offers the categories "Discipline", "Keyword", "Method/Approach", "Coverage", "Publication Month", "Journal" and "Author" AND I'll see one or more clickable faceting filters below each category.

SCENARIO: disabled categories GIVEN I disable one of the keyword categories in the journal setup (e.g. 'discipline') WHEN I execute a cross-journal search that produces results with articles that contain meta-data for all facet categories (e.g. "lucene doi") THEN I see a faceting block plugin which does not show the disabled category.

Definition at line 84 of file FunctionalLucenePluginFacetingTestCase.php.

References DAORegistry\getDAO(), and FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginFacetingTest::testFilteredCategories ( )

SCENARIO: filtered categories WHEN I execute a search query that filters on one of the enabled facet categories (e.g. publication date) THEN the filtered category will not show up in the facets block plugin BUT all other categories are still available.

Definition at line 195 of file FunctionalLucenePluginFacetingTestCase.php.

FunctionalLucenePluginFacetingTest::testHideEmptyCategoriesAndNonSelectiveFacets ( )

SCENARIO: hide empty categories and non-selective facets WHEN I execute a cross-journal search that produces results with articles that do not contain meta-data for all facet categories or contain the same meta-data for all articles in the result set (e.g. "+(ranking some) test") THEN I see a faceting block plugin wich offers the categories that contain selective facets (e.g. "Discipline" and "Author") BUT the categories that contain no choices (e.g. "Keyword", "Method/Approach" and "Coverage") AND facets that would produce the same result set if selected (e.g. the non-selective facet "lucene-test") will not be listed.

Definition at line 114 of file FunctionalLucenePluginFacetingTestCase.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginFacetingTest::testMultipleFacetFilterSelection ( )

SCENARIO: multiple facet filter selection GIVEN I executed a search originally containing the articles with the ids 1, 3 and 4 BUT I selected a publication date facet "2011" so that the article with id 3 is no longer in the result set WHEN I select an additional journal facet "lucene-test" THEN I will only see the article with id 4 in the remaining result set. AND I'll see the selected facets above the result set with the text "filtered by: publ. date: ... [X], journal: ... [X]" AND I'll no longer see the publ. date or journal categories in the facet filter navigation block.

SCENARIO: facet filter deletion GIVEN I executed a faceted search with a publication date and a journal facet AND the result set contains the article with id 4 but not articles 1 or 3 WHEN I click the "Delete"-buttons near to the publication date filters above the result list THEN I'll see articles 3 and 4 in the result set AND I'll see the publication date category in the filter navigation block.

Definition at line 324 of file FunctionalLucenePluginFacetingTestCase.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginFacetingTest::testOnlyShowFacetsInTheUiLanguage ( )

SCENARIO OUTLINE: only show facets in the UI language WHEN I select {locale} as my UI language AND I execute a search that produces results with articles that contain selective keyword meta-data (e.g. "lucene doi") THEN I see a faceting block plugin wich offers {facets} only for the selected {locale}

EXAMPLES:

locale | facets

de_DE | 22A10 generelle gopologische gruppen en_US | 22A10 general topological groups

Definition at line 151 of file FunctionalLucenePluginFacetingTestCase.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().


The documentation for this class was generated from the following file: