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
16 changes: 8 additions & 8 deletions src/JoomlaBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public function installExtensionFromFolder($path, $type = 'Extension')
$this->debug('I enter the Path');
$this->fillField(['id' => 'install_directory'], $path);
$this->click(['id' => 'installbutton_directory']);
$this->waitForText('was successful', 'TIMEOUT', ['id' => 'system-message-container']);
$this->waitForText('was successful', TIMEOUT, ['id' => 'system-message-container']);
$this->debug("$type successfully installed from $path");
}

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

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

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

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

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

// Open the category
$this->wait(1);
$this->waitForElement(['link' => $menuCategory], 'TIMEOUT');
$this->waitForElement(['link' => $menuCategory], TIMEOUT);
$this->click(['link' => $menuCategory]);

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

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

/**
Expand Down