Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/JoomlaBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ protected function instantiateLocator()
* @param string|null $password Optional password. If not passed the one in acceptance.suite.yml will be used
*
* @return void
*
* @since 3.0.0
*/
public function doAdministratorLogin($user = null, $password = null)
Expand Down Expand Up @@ -143,6 +144,7 @@ public function doAdministratorLogin($user = null, $password = null)
* @param string|null $password Optional password. If not passed the one in acceptance.suite.yml will be used
*
* @return void
*
* @since 3.0.0
*/
public function doFrontEndLogin($user = null, $password = null)
Expand Down Expand Up @@ -195,6 +197,7 @@ public function doFrontendLogout()
* Installs Joomla
*
* @return void
*
* @since 3.0.0
*/
public function installJoomla()
Expand Down Expand Up @@ -284,6 +287,7 @@ public function installJoomla()
* Install Joomla removing the Installation folder at the end of the execution
*
* @return void
*
* @since 3.0.0
*/
public function installJoomlaRemovingInstallationFolder()
Expand All @@ -308,6 +312,7 @@ public function installJoomlaRemovingInstallationFolder()
* @example: $this->installJoomlaMultilingualSite(['Spanish', 'French']);
*
* @return void
*
* @since 3.0.0
*/
public function installJoomlaMultilingualSite($languages = array())
Expand Down Expand Up @@ -408,7 +413,6 @@ public function installExtensionFromDirectory($path, $type = 'Extension')
*/
public function installExtensionFromFolder($path, $type = 'Extension')
{

$this->amOnPage('/administrator/index.php?option=com_installer');
$this->waitForText('Extensions: Install', '30', ['css' => 'H1']);
$this->click(['link' => 'Install from Folder']);
Expand Down Expand Up @@ -460,8 +464,8 @@ public function installExtensionFromUrl($url, $type = 'Extension')
/**
* Installs a Extension in Joomla using the file upload option
*
* @param string $file Path to the file in the _data folder
* @param string $type Type of Extension
* @param string $file Path to the file in the _data folder
* @param string $type Type of Extension
*
* {@internal doAdminLogin() before}
*
Expand All @@ -480,14 +484,17 @@ public function installExtensionFromFileUpload($file, $type = 'Extension')
$this->attachFile(array('id' => 'install_package'), $file);

$this->waitForText('was successful', '30', array('id' => 'system-message-container'));

if ($type == 'Extension')
{
$this->debug('Extension successfully installed.');
}

if ($type == 'Plugin')
{
$this->debug('Installing plugin was successful.');
}

if ($type == 'Package')
{
$this->debug('Installation of the package was successful.');
Expand Down Expand Up @@ -533,7 +540,6 @@ public function checkForPhpNoticesOrWarnings($page = null)
*/
public function selectOptionInRadioField($label, $option)
{

$this->debug("Trying to select the $option from the $label");
$label = $this->findField(['xpath' => "//label[contains(normalize-space(string(.)), '$label')]"]);
$radioId = $label->getAttribute('for');
Expand Down Expand Up @@ -650,7 +656,6 @@ public function selectMultipleOptionsInChosen($label, $options)
$selectID = $select->getAttribute('id');
$chosenSelectID = $selectID . '_chzn';


foreach ($options as $option)
{
$this->debug("I open the $label chosen selector");
Expand Down Expand Up @@ -798,7 +803,6 @@ public function checkExistenceOf($name)
*/
public function checkAllResults()
{

$this->debug("Selecting Checkall button");
$this->click(['xpath' => "//thead//input[@name='checkall-toggle' or @name='toggle']"]);
}
Expand All @@ -812,7 +816,6 @@ public function checkAllResults()
*/
public function installLanguage($languageName)
{

$this->amOnPage('administrator/index.php?option=com_installer&view=languages');
$this->debug('I check for Notices and Warnings');
$this->checkForPhpNoticesOrWarnings();
Expand Down Expand Up @@ -869,6 +872,7 @@ public function setModulePosition($module, $position = 'position-7')
* @param string $module The full name of the module
*
* @return void
*
* @since 3.0.0
*/
public function publishModule($module)
Expand All @@ -886,6 +890,7 @@ public function publishModule($module)
* @param string $module The full name of the module
*
* @return void
*
* @since 3.0.0
*/
public function displayModuleOnAllPages($module)
Expand All @@ -908,6 +913,7 @@ public function displayModuleOnAllPages($module)
* @param string $button The full name of the button
*
* @return void
*
* @since 3.0.0
*/
public function clickToolbarButton($button)
Expand Down