From a79fb54d7037cbae63016cf1a3398e5805ac15ae Mon Sep 17 00:00:00 2001 From: javier gomez Date: Mon, 10 Aug 2015 19:03:52 +0200 Subject: [PATCH] #45 Wait for element change in Multilingual install too --- src/JoomlaBrowser.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 1c8759b..9adbb1f 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -160,8 +160,6 @@ public function installJoomlaRemovingInstallationFolder() $I->click(['xpath' => "//input[@value='Remove installation folder']"]); $I->debug('I wait for Removing Installation Folder button to become disabled'); // @todo https://github.com/joomla-projects/joomla-browser/issues/45 - $I->wait(2); - /* $I->waitForElementChange( ['xpath' => "//input[@name='instDefault']"], function(WebDriverElement $el) { @@ -169,7 +167,7 @@ function(WebDriverElement $el) { }, 60 ); - */ + $I->debug('Joomla is now installed'); $I->see('Congratulations! Joomla! is now installed.',['xpath' => '//h3']); } @@ -213,7 +211,13 @@ public function installJoomlaMultilingualSite($languages = array()) $I->waitForText('Congratulations! Joomla! is now installed.', 60, ['xpath' => '//h3']); $this->debug('Removing Installation Folder'); $I->click(['xpath' => "//input[@value='Remove installation folder']"]); - $I->waitForElementVisible(['xpath' => "//input[@value='Installation folder successfully removed']"],60); + $I->waitForElementChange( + ['xpath' => "//input[@name='instDefault']"], + function(WebDriverElement $el) { + return !$el->isEnabled(); + }, + 60 + ); $this->debug('Joomla is now installed'); $I->see('Congratulations! Joomla! is now installed.',['xpath' => '//h3']); }