Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
FunctionalEditingTest Class Reference

Inherits FunctionalEditingBaseTestCase.

Public Member Functions

 __construct ($name=NULL, array $data=array(), $dataName= '')
 
 _enablePushProcessing ()
 
 _retrievePullIndexingXml ()
 
 testChangeDocument ()
 
 testDeleteDocument ()
 
 testDocumentUpload ()
 
 testPullIndexing ()
 

Protected Member Functions

 getAffectedTables ()
 
 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from FunctionalEditingBaseTestCase
 editMetadata ($articleId, $newTitle)
 
 getAffectedTables ()
 
 publishArticle ($articleId)
 
 setUp ()
 
 submitArticle ($title= 'Editing test article')
 
 unpublishArticle ($articleId)
 
 uploadGalley ($articleId, $galleyFile, $fileLabel)
 
 uploadSuppFile ($articleId, $suppFile, $title)
 
- Protected Member Functions inherited from WebTestCase
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ()
 
 setUp ()
 
 tearDown ()
 
 verified ()
 
 verifyAndOpen ($url)
 

Detailed Description

Integration/Functional test for the OJS editing process.

See Also
SubmissionEditHandler
LucenePlugin

NB: Currently we use this only to test the effects of editing on the Lucene index. But we place the test class here so that it can be re-used in case parts of the editing process itself should be tested later.

Definition at line 27 of file FunctionalEditingTest.php.

Constructor & Destructor Documentation

FunctionalEditingTest::__construct (   $name = NULL,
array  $data = array(),
  $dataName = '' 
)

Constructor

Definition at line 35 of file FunctionalEditingTest.php.

Member Function Documentation

FunctionalEditingTest::_enablePushProcessing ( )

Enable push indexing so that we can immediately check indexing success.

Definition at line 411 of file FunctionalEditingTest.php.

References DAORegistry\getDAO().

Referenced by testChangeDocument(), testDeleteDocument(), and testDocumentUpload().

FunctionalEditingTest::_retrievePullIndexingXml ( )

Call the pull indexing web service and return the result.

Definition at line 420 of file FunctionalEditingTest.php.

Referenced by testPullIndexing().

FunctionalEditingTest::getAffectedTables ( )
protected
See Also
WebTestCase::getAffectedTables()

Definition at line 50 of file FunctionalEditingTest.php.

FunctionalEditingTest::setUp ( )
protected
See Also
WebTestCase::setUp()

Definition at line 59 of file FunctionalEditingTest.php.

FunctionalEditingTest::tearDown ( )
protected
See Also
WebTestCase::tearDown()

Definition at line 66 of file FunctionalEditingTest.php.

FunctionalEditingTest::testChangeDocument ( )

SCENARIO: Change document (push): publication GIVEN An article contains the word "noodles" in its title BUT is not currently published AND the article does not currently appear in the search result list for "noodles" in its title WHEN I publish the article THEN I will immediately see it appear in the result list of a title search for "noodles".

SCENARIO: Change document (push): meta-data GIVEN An article does not contain the word "peppermint" in its title AND it does not appear in a title search for the word "peppermint" WHEN I change its title to contain the word "peppermint" THEN I will immediately see the article appear in the result list of a title search for the word "peppermint".

SCENARIO: Change document (push): add galley see document upload test cases above.

SCENARIO: Change document (push): delete galley GIVEN An article galley contains a word not contained in any other galley of the article, say "pdftestarticle" AND the article appears in the full-text search result list for "pdftestarticle" WHEN I delete this galley from the article THEN I will immediately see the article disappear from the "pdftestarticle" full-text search result list.

SCENARIO: Change document (push): add supplementary file GIVEN None of an article's supplementary files contains the word "pdftest" in its full text AND none of an article's supplementary files contains the word "spinach" in its title AND a supplementary file search for the phrase "doctest AND spinach" gives no result WHEN I add a supplementary file to the article that contains the word "pdftest" in its full text and "spinach" in its title THEN I will immediately see the article appear in the "pdftest AND spinach" supplementary file search result list.

SCENARIO: Change document (push): delete supplementary file GIVEN An article's supplementary file contains a word not contained in any other supplementary file of the article, say "noodles". AND the article appears in the supplementary file search result list for "noodles" WHEN I delete this supplementary file from the article THEN I will immediately see the article disappear from the "noodles" supplementary file search result list.

SCENARIO: Change document (push): unpublish article GIVEN An article contains the word "noodles" in its title AND is currently published AND the article currently appears in the search result list for "noodles" in its title WHEN I unpublish the article THEN I will immediately see it disappear from the result list of a title search for "noodles".

Definition at line 216 of file FunctionalEditingTest.php.

References _enablePushProcessing(), and WebTestCase\verifyAndOpen().

FunctionalEditingTest::testDeleteDocument ( )

SCENARIO: Change document (push): delete article GIVEN An article contains the word "noodles" in its title AND is currently published AND the article currently appears in the search result list for "noodles" in its title WHEN I delete the article THEN I will immediately see it disappear from the result list of a title search for "noodles".

Definition at line 307 of file FunctionalEditingTest.php.

References _enablePushProcessing().

FunctionalEditingTest::testDocumentUpload ( )

SCENARIO OUTLINE: Document upload: supported galley formats GIVEN I am looking at the galley upload page WHEN I upload a galley in {document format} THEN the document is immediately available in the index.

EXAMPLES:

document format

plain text HTML PDF MS Word 97 and later MS Word 2010 and later Open-/LibreOffice ePub

NB: solr cannot index PostScript files. We may implement PS to PDF conversion later on to close that gap.

Definition at line 98 of file FunctionalEditingTest.php.

References _enablePushProcessing(), and WebTestCase\improveException().

FunctionalEditingTest::testPullIndexing ( )

FEATURE: pull indexing (OJS side only)

BACKGROUND: GIVEN I enabled the pull indexing feature

SCENARIO: publishing or changing an article WHEN I publish or change an article BUT I do not unpublish the article THEN an article setting "dirty" will be set to "1" which indicates that the article must be re-indexed AND the article will appear in the public XML web service for pull-indexing BUT the article will not be marked for deletion.

SCENARIO: unpublishing an article WHEN I unpublish a previously published article THEN an article setting "dirty" will be set to "1" which means that the article must be deleted from the index AND the article will appear in the public XML web service for pull-indexing. AND the article will be marked for deletion.

SCENARIO: pull request WHEN the server receives a pull request THEN all articles appearing in the request will be marked "clean" once the request was successfully transferred to the server side.

For a specification of server side processing and for a full picture of pull processing, please see http://pkp.sfu.ca/wiki/index.php/OJSdeSearchConcept#Pull_Processing.

Definition at line 363 of file FunctionalEditingTest.php.

References _retrievePullIndexingXml(), and DAORegistry\getDAO().


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