Skip to content

Commit fa55dcd

Browse files
committed
parallel testing install extension
1 parent 77dc045 commit fa55dcd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/JoomlaBrowser.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,43 @@ public function installExtensionFromUrl($url, $type = 'Extension')
457457
}
458458
}
459459

460+
/**
461+
* Installs a Extension in Joomla using the file upload option
462+
*
463+
* @param string $file Path to the file in the _data folder
464+
* @param string $type Type of Extension
465+
*
466+
* {@internal doAdminLogin() before}
467+
*
468+
* @return void
469+
*/
470+
public function installExtensionFromFileUpload($file, $type = 'Extension')
471+
{
472+
$this->amOnPage('/administrator/index.php?option=com_installer');
473+
$this->waitForText('Extensions: Install', '30', array('css' => 'H1'));
474+
$this->click(array('link' => 'Upload Package File'));
475+
476+
$this->debug('I make sure legacy uploader is visible');
477+
$this->executeJS('document.getElementById("legacy-uploader").style.display="block";');
478+
479+
$this->debug('I enter the file input');
480+
$this->attachFile(array('id' => 'install_package'), $file);
481+
482+
$this->waitForText('was successful', '30', array('id' => 'system-message-container'));
483+
if ($type == 'Extension')
484+
{
485+
$this->debug('Extension successfully installed.');
486+
}
487+
if ($type == 'Plugin')
488+
{
489+
$this->debug('Installing plugin was successful.');
490+
}
491+
if ($type == 'Package')
492+
{
493+
$this->debug('Installation of the package was successful.');
494+
}
495+
}
496+
460497
/**
461498
* Function to check for PHP Notices or Warnings
462499
*

0 commit comments

Comments
 (0)