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

Public Member Functions

 testRankingWeightEffect ()
 
 testRankingWeightSelector ()
 

Protected Member Functions

 getAffectedTables ()
 
- 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 custom ranking feature of the lucene plug-in.

See Also
LucenePlugin

FEATURE: custom ranking

Definition at line 24 of file FunctionalLucenePluginCustomRankingTest.php.

Member Function Documentation

FunctionalLucenePluginCustomRankingTest::getAffectedTables ( )
protected
FunctionalLucenePluginCustomRankingTest::testRankingWeightEffect ( )

SCENARIO: ranking weight editing and effect GIVEN I disabled the custom ranking feature AND I executed a search that shows four articles from four different sections with ranking weights such that their ranking is uniquely defined as 1) "article 1", 2) "article 2", 3) "article 3", 4) "article 4" [e.g. '+ranking +("article 1"^1.5 "article 2"^1.3 "article 3"^1.1 "article 4")'] AND I saved a ranking weight "rank lower" for the section of article 1 AND I saved a ranking weight "normal" for the section of article 2 AND I saved a ranking weight "rank higher" for the section of article 3 AND I saved a ranking weight "never show" for the section of article 4 WHEN I enable the custom ranking feature AND I re-execute the exact same search THEN I'll no longer see "article 4" in the result set AND I'll see the ranking order of the remaining articles reversed: 1) "article 3", 2) "article 2", 3) "article 1".

Definition at line 93 of file FunctionalLucenePluginCustomRankingTest.php.

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

FunctionalLucenePluginCustomRankingTest::testRankingWeightSelector ( )

SCENARIO: ranking weight selector GIVEN I enabled the custom ranking feature WHEN I go to the section editing page THEN I see a drop down box with custom ranking factors: "never show", "rank lower", "normal" and "rank higher" AND the ranking weight "normal" is selected by default.

Definition at line 49 of file FunctionalLucenePluginCustomRankingTest.php.

References DAORegistry\getDAO(), WebTestCase\logIn(), and WebTestCase\verifyAndOpen().


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