Skip to content

Commit ff80560

Browse files
committed
[imp] Removed $I->wait(1)
1 parent e995df7 commit ff80560

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/JoomlaBrowser.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -674,35 +674,33 @@ public function displayModuleOnAllPages($module)
674674
/**
675675
* Creates a menu item with the Joomla menu manager, only working for menu items without additional required fields
676676
*
677-
* @param string $menuTitle - The menu title
678-
* @param string $menuCategory - The category of the menu type (for example Weblinks)
679-
* @param string $menuItem - The menu item type / link text (for example List all Web Link Categories)
680-
* @param string $menu - The menu where the item should be created
677+
* @param string $menuTitle The menu item title
678+
* @param string $menuCategory The category of the menu type (for example Weblinks)
679+
* @param string $menuItem The menu item type / link text (for example List all Web Link Categories)
680+
* @param string $menu The menu where the item should be created
681681
*/
682682
public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = "Main Menu")
683683
{
684684
$I = $this;
685685
$I->amOnPage('administrator/index.php?option=com_menus&view=menus');
686686
$I->waitForText('Menus', '30', ['css' => 'H1']);
687-
$I->wait(1);
688687

689688
// Choose the right menu
690689
$I->click(['xpath' => "//*[@id=\"menuList\"]/tbody/tr/td[2]/a[contains(text(), '" . $menu . "')]"]);;
691690
$I->waitForText('Menus: Items', '30', ['css' => 'H1']);
692691

693692
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.add')\"]"]);
694-
$I->waitForText('Menus: New Item','30', ['css' => 'h1']);
693+
$I->waitForText('Menus: New Item', '30', ['css' => 'h1']);
695694
$I->fillField(['id' => 'jform_title'], $menuTitle);
696695

697696
// Menu type (modal)
698697
$I->click(['xpath' => "//a[@href=\"#menuTypeModal\"]"]);
699-
$I->waitForElement('.iframe','30');
698+
$I->waitForElement('.iframe', '30');
700699
$I->switchToIFrame("Menu Item Type");
701700

702701
// Open the category
703702
$I->waitForElementVisible(['link' => $menuCategory], '30');
704703
$I->click(['link' => $menuCategory]);
705-
$I->wait(1);
706704

707705
// Choose the menu item
708706
$I->waitForElementVisible(['xpath' => "//a[contains(text(), '" . $menuItem . "')]"], 60);

0 commit comments

Comments
 (0)