Skip to content

Commit 82fe814

Browse files
committed
Update errorReporting to use selectInChosen
1 parent 5618d4b commit 82fe814

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/JoomlaBrowser.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public function installJoomla()
8888

8989
$I->debug('I select en-GB as installation language');
9090
$I->selectOptionInChosen('Select Language', 'English (United Kingdom)');
91-
$I->wait(1);
9291
$this->debug('I fill Site Name');
9392
$I->fillField(['id' => 'jform_site_name'], 'Joomla CMS test');
9493
$this->debug('I fill Site Description');
@@ -163,12 +162,7 @@ public function setErrorReportingToDevelopment()
163162
$this->debug('I open the Server Tab');
164163
$I->click(['link' => 'Server']);
165164
$this->debug('I wait for error reporting dropdown');
166-
$I->waitForElementVisible(['xpath' => "//div[@id='jform_error_reporting_chzn']/a"]); // Error reporting Dropdown
167-
$this->debug('I click on error reporting dropdown');
168-
$I->click(['xpath' => "//div[@id='jform_error_reporting_chzn']/a"]);
169-
$this->debug('I click on development option');
170-
$I->click(['xpath' => "//div[@id='jform_error_reporting_chzn']/div/ul/li[contains(text(), 'Development')]"]); // Development
171-
$I->wait(1);
165+
$I->selectOptionInChosen('Error Reporting', 'Development');
172166
$this->debug('I click on save');
173167
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('config.save.application.apply')\"]"]);
174168
$this->debug('I wait for global configuration being saved');
@@ -231,5 +225,6 @@ public function selectOptionInChosen($label, $option)
231225
$I->click(['xpath' => "//div[@id='$chosenSelectID']/a/div/b"]);
232226
$this->debug("I select $option");
233227
$I->click(['xpath' => "//div[@id='$chosenSelectID']//li[text()='$option']"]);
228+
$I->wait(1); // Gives time to chosen to close
234229
}
235230
}

0 commit comments

Comments
 (0)