Skip to content

Commit 1ac3eed

Browse files
committed
Merge remote-tracking branch 'origin/develop' into codeStyle-92
# Conflicts: # src/JoomlaBrowser.php
2 parents 922a083 + c923e7f commit 1ac3eed

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/JoomlaBrowser.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Codeception\Module\WebDriver;
1212

1313
/**
14-
* Joomla Browser class to perform test suits for joomla.
14+
* Joomla Browser class to perform test suits for Joomla.
1515
*
1616
* @since 1.0
1717
*/
@@ -139,11 +139,10 @@ public function installJoomla()
139139

140140
// Install Joomla CMS');
141141

142-
// @todo: activate the filesystem module
143-
144142
$this->debug('I open Joomla Installation Configuration Page');
145143
$I->amOnPage('/installation/index.php');
146-
$this->debug('I check that FTP tab is not present in installation. Otherwise it means that I have not enough permissions to install joomla and execution will be stoped');
144+
$this->debug('I check that FTP tab is not present in installation. Otherwise it means that I have not enough '
145+
. 'permissions to install joomla and execution will be stoped');
147146
$I->dontSeeElement(['id' => 'ftp']);
148147

149148
// I Wait for the text Main Configuration, meaning that the page is loaded
@@ -324,6 +323,7 @@ public function setErrorReportingToDevelopment()
324323
* @note: doAdminLogin() before
325324
*
326325
* @deprecated since Joomla 3.4.4-dev. Use installExtensionFromFolder($path, $type = 'Extension') instead.
326+
*
327327
* @return void
328328
*/
329329
public function installExtensionFromDirectory($path, $type = 'Extension')
@@ -350,11 +350,7 @@ public function installExtensionFromFolder($path, $type = 'Extension')
350350
$I->click(['link' => 'Install from Folder']);
351351
$this->debug('I enter the Path');
352352
$I->fillField(['id' => 'install_directory'], $path);
353-
354-
// @todo: we need to find a better locator for the following Install button
355-
356-
// Install button
357-
$I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton3()')]"]);
353+
$I->click(['id' => 'installbutton_directory']);
358354
$I->waitForText('was successful', '60', ['id' => 'system-message-container']);
359355
$this->debug("$type successfully installed from $path");
360356
}
@@ -377,10 +373,7 @@ public function installExtensionFromUrl($url, $type = 'Extension')
377373
$I->click(['link' => 'Install from URL']);
378374
$this->debug('I enter the url');
379375
$I->fillField(['id' => 'install_url'], $url);
380-
381-
// @todo: we need to find a better locator for the following Install button
382-
// Install button
383-
$I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton4()')]"]);
376+
$I->click(['id' => 'installbutton_url']);
384377
$I->waitForText('was successful', '30', ['id' => 'system-message-container']);
385378

386379
if ($type == 'Extension')
@@ -550,7 +543,6 @@ public function doAdministratorLogout()
550543
$I->click(['xpath' => "//li[@class='dropdown open']/ul[@class='dropdown-menu']//a[text() = 'Logout']"]);
551544
$I->waitForElement(['id' => 'mod-login-username'], 60);
552545
$I->waitForText('Log in', 60, ['xpath' => "//fieldset[@class='loginform']//button"]);
553-
554546
}
555547

556548
/**
@@ -604,6 +596,7 @@ public function uninstallExtension($extensionName)
604596
$I->waitForElement(['id' => 'manageList'], '30');
605597
$I->click(['xpath' => "//input[@id='cb0']"]);
606598
$I->click(['xpath' => "//div[@id='toolbar-delete']/button"]);
599+
$I->acceptPopup();
607600
$I->waitForText('was successful', '30', ['id' => 'system-message-container']);
608601
$I->see('was successful', ['id' => 'system-message-container']);
609602
$I->searchForItem($extensionName);
@@ -717,15 +710,17 @@ private function searchResultLanguageName($languageName)
717710
* @param string $module The full name of the module
718711
* @param string $position The template position of a module. Right position by default
719712
*
720-
* @return void
713+
* @return void
721714
*/
722715
public function setModulePosition($module, $position = 'position-7')
723716
{
724717
$I = $this;
725718
$I->amOnPage('administrator/index.php?option=com_modules');
726719
$I->searchForItem($module);
727720
$I->click(['link' => $module]);
728-
$I->waitForText($module, 30, ['css' => 'H3']);
721+
$I->waitForText("Modules: $module", 30, ['css' => 'h1.page-title']);
722+
$I->click(['link' => 'Module']);
723+
$I->waitForElement(['id' => 'general'], 30);
729724
$I->selectOptionInChosen('Position', $position);
730725
$I->click(['xpath' => "//div[@id='toolbar-apply']/button"]);
731726
$I->waitForText('Module successfully saved', 30, ['id' => 'system-message-container']);
@@ -873,6 +868,7 @@ public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Ma
873868
$I->debug("Open the menu types iframe");
874869
$I->click(['link' => "Select"]);
875870
$I->waitForElement(['id' => 'menuTypeModal'], '60');
871+
$I->wait(1);
876872
$I->switchToIFrame("Menu Item Type");
877873

878874
$I->debug("Open the menu category: $menuCategory");

0 commit comments

Comments
 (0)