Skip to content

Commit 9c1208f

Browse files
authored
Merge pull request #151 from puneet0191/fix-timeout-issue
Wrong Changes on Timeout
2 parents f344389 + 2667634 commit 9c1208f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/JoomlaBrowser.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public function installExtensionFromFolder($path, $type = 'Extension')
419419
$this->debug('I enter the Path');
420420
$this->fillField(['id' => 'install_directory'], $path);
421421
$this->click(['id' => 'installbutton_directory']);
422-
$this->waitForText('was successful', 'TIMEOUT', ['id' => 'system-message-container']);
422+
$this->waitForText('was successful', TIMEOUT, ['id' => 'system-message-container']);
423423
$this->debug("$type successfully installed from $path");
424424
}
425425

@@ -994,36 +994,36 @@ public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Ma
994994
{
995995
$this->debug("I open the menus page");
996996
$this->amOnPage('administrator/index.php?option=com_menus&view=menus');
997-
$this->waitForText('Menus', 'TIMEOUT', ['css' => 'H1']);
997+
$this->waitForText('Menus', TIMEOUT, ['css' => 'H1']);
998998
$this->checkForPhpNoticesOrWarnings();
999999

10001000
$this->debug("I click in the menu: $menu");
10011001
$this->click(['link' => $menu]);
1002-
$this->waitForText('Menus: Items', 'TIMEOUT', ['css' => 'H1']);
1002+
$this->waitForText('Menus: Items', TIMEOUT, ['css' => 'H1']);
10031003
$this->checkForPhpNoticesOrWarnings();
10041004

10051005
$this->debug("I click new");
10061006
$this->click("New");
1007-
$this->waitForText('Menus: New Item', 'TIMEOUT', ['css' => 'h1']);
1007+
$this->waitForText('Menus: New Item', TIMEOUT, ['css' => 'h1']);
10081008
$this->checkForPhpNoticesOrWarnings();
10091009
$this->fillField(['id' => 'jform_title'], $menuTitle);
10101010

10111011
$this->debug("Open the menu types iframe");
10121012
$this->click(['link' => "Select"]);
1013-
$this->waitForElement(['id' => 'menuTypeModal'], 'TIMEOUT');
1013+
$this->waitForElement(['id' => 'menuTypeModal'], TIMEOUT);
10141014
$this->wait(1);
10151015
$this->switchToIFrame("Menu Item Type");
10161016

10171017
$this->debug("Open the menu category: $menuCategory");
10181018

10191019
// Open the category
10201020
$this->wait(1);
1021-
$this->waitForElement(['link' => $menuCategory], 'TIMEOUT');
1021+
$this->waitForElement(['link' => $menuCategory], TIMEOUT);
10221022
$this->click(['link' => $menuCategory]);
10231023

10241024
$this->debug("Choose the menu item type: $menuItem");
10251025
$this->wait(1);
1026-
$this->waitForElement(['xpath' => "//a[contains(text()[normalize-space()], '$menuItem')]"], 'TIMEOUT');
1026+
$this->waitForElement(['xpath' => "//a[contains(text()[normalize-space()], '$menuItem')]"], TIMEOUT);
10271027
$this->click(['xpath' => "//div[@id='collapseTypes']//a[contains(text()[normalize-space()], '$menuItem')]"]);
10281028
$this->debug('I switch back to the main window');
10291029
$this->switchToIFrame();
@@ -1034,7 +1034,7 @@ public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Ma
10341034
$this->debug('I save the menu');
10351035
$this->click("Save");
10361036

1037-
$this->waitForText('Menu item successfully saved', 'TIMEOUT', ['id' => 'system-message-container']);
1037+
$this->waitForText('Menu item successfully saved', TIMEOUT, ['id' => 'system-message-container']);
10381038
}
10391039

10401040
/**

0 commit comments

Comments
 (0)