mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
MDL-44873 behat: Added suppport for clean error class.
This commit is contained in:
parent
cfaaab6656
commit
b25d44c200
1 changed files with 5 additions and 1 deletions
|
@ -477,7 +477,11 @@ class behat_hooks extends behat_base {
|
||||||
if ($errormsg = $this->getSession()->getPage()->find('xpath', $exceptionsxpath)) {
|
if ($errormsg = $this->getSession()->getPage()->find('xpath', $exceptionsxpath)) {
|
||||||
|
|
||||||
// Getting the debugging info and the backtrace.
|
// Getting the debugging info and the backtrace.
|
||||||
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.notifytiny');
|
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.alert-error');
|
||||||
|
// If errorinfoboxes is empty, try find notifytiny (original) class.
|
||||||
|
if (empty($errorinfoboxes)) {
|
||||||
|
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.notifytiny');
|
||||||
|
}
|
||||||
$errorinfo = $this->get_debug_text($errorinfoboxes[0]->getHtml()) . "\n" .
|
$errorinfo = $this->get_debug_text($errorinfoboxes[0]->getHtml()) . "\n" .
|
||||||
$this->get_debug_text($errorinfoboxes[1]->getHtml());
|
$this->get_debug_text($errorinfoboxes[1]->getHtml());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue