Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
WebTestCase Class Reference
Inheritance diagram for WebTestCase:
CreateJournalTest FunctionalDOIPubIdPluginTest FunctionalImportExportBaseTestCase FunctionalLucenePluginBaseTestCase FunctionalUrnPubIdPluginTest IssuesTest LogOutTest PKPContentBaseTestCase PKPCreateUsersTest PKPInstallationTest SectionsTest WorkflowSearchTest

Static Public Member Functions

static setUpBeforeClass ()
 

Protected Member Functions

 addTag ($controlPrefix, $value)
 
 findSubmissionAsEditor ($username, $password=null, $title)
 
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logAuthorIn ()
 
 logIn ($username, $password=null)
 
 logOut ()
 
 register ($data)
 
 setUp ()
 
 submitAjaxForm ($formId)
 
 tearDown ()
 
 typeText ($box, $letters)
 
 typeTinyMCE ($controlPrefix, $value)
 
 uploadFile ($file, $inputSelector= '//input[@type="file"]', $buttonSelector= '//input[@value=\'Upload\']')
 
 verified ()
 
 verifyAndOpen ($url)
 
 waitJQuery ()
 

Detailed Description

Base test class for Selenium functional tests.

Definition at line 18 of file WebTestCase.inc.php.

Member Function Documentation

WebTestCase::addTag (   $controlPrefix,
  $value 
)
protected

Add a tag to a TagIt-enabled control

Parameters
$controlPrefixstring Prefix of control name
$valuestring Value of new tag

Definition at line 326 of file WebTestCase.inc.php.

WebTestCase::getAffectedTables ( )
protected

Override this method if you want to backup/restore tables before/after the test.

Returns
array|PKP_TEST_ENTIRE_DB A list of tables to backup and restore.

Definition at line 34 of file WebTestCase.inc.php.

Referenced by setUp(), and tearDown().

WebTestCase::logAuthorIn ( )
protected

Log in as author user.

Definition at line 305 of file WebTestCase.inc.php.

References logIn().

WebTestCase::register (   $data)
protected

Self-register a new user account.

Parameters
$dataarray

Definition at line 135 of file WebTestCase.inc.php.

WebTestCase::setUp ( )
protected

Definition at line 52 of file WebTestCase.inc.php.

References getAffectedTables(), DAORegistry\getDAO(), and Config\getVar().

static WebTestCase::setUpBeforeClass ( )
static

Definition at line 41 of file WebTestCase.inc.php.

WebTestCase::submitAjaxForm (   $formId)
protected

Save an Ajax form, waiting for the loading sprite to be hidden to continue the test execution.

Parameters
$formLocatorString

Definition at line 273 of file WebTestCase.inc.php.

WebTestCase::tearDown ( )
protected

Definition at line 100 of file WebTestCase.inc.php.

References getAffectedTables(), and Config\getVar().

WebTestCase::typeText (   $box,
  $letters 
)
protected

Types a text into an input field.

This is done using low-level methods in a way to simulate actual key-press events that can trigger autocomplete events or similar.

Parameters
$boxstring the locator of the box
$lettersstring the text to type

Definition at line 237 of file WebTestCase.inc.php.

WebTestCase::typeTinyMCE (   $controlPrefix,
  $value 
)
protected

Type a value into a TinyMCE control.

Parameters
$controlPrefixstring Prefix of control name
$valuestring Value to enter into control

Definition at line 316 of file WebTestCase.inc.php.

Referenced by PKPContentBaseTestCase\createSubmission(), PKPContentBaseTestCase\performReview(), and CreateJournalTest\testCreateJournal().

WebTestCase::uploadFile (   $file,
  $inputSelector = '//input[@type="file"]',
  $buttonSelector = '//input[@value=\'Upload\']' 
)
protected

Upload a file using an input type=file.

Parameters
$filestring Path to the file
$inputSelectorstring Selenium selector for file input control
$buttonSelectorstring Selenium selector for upload button

Definition at line 292 of file WebTestCase.inc.php.

Referenced by PKPContentBaseTestCase\createSubmission(), and WorkflowSearchTest\testLayoutEditorSearch().

WebTestCase::verified ( )
protected

Check for verification errors and clean the verification error list.

Definition at line 207 of file WebTestCase.inc.php.

Referenced by FunctionalLucenePluginConfigTest\testPluginActivation(), and verifyAndOpen().

WebTestCase::waitJQuery ( )
protected

Wait for active JQuery requests to complete.

Definition at line 333 of file WebTestCase.inc.php.

Referenced by logOut().


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