Skip to content

Commit

Permalink
MDL-46514 behat: Catch errors shown by JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Aug 18, 2016
1 parent 3ca3cc7 commit 43759f5
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Y.extend(AJAXEXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + this.get('COUNT') + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-ajaxexception"></div>')
content = Y.Node.create('<div class="moodle-ajaxexception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('error')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-debuginfo"><label>URL:</label> ' +
this.get('reproductionlink') + '</div>'))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Y.extend(AJAXEXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + this.get('COUNT') + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-ajaxexception"></div>')
content = Y.Node.create('<div class="moodle-ajaxexception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('error')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-debuginfo"><label>URL:</label> ' +
this.get('reproductionlink') + '</div>'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Y.extend(EXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + config.COUNT + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-exception"></div>')
content = Y.Node.create('<div class="moodle-exception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('message')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-filename"><label>File:</label> ' +
Y.Escape.html(this.get('fileName')) + '</div>'))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Y.extend(EXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + config.COUNT + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-exception"></div>')
content = Y.Node.create('<div class="moodle-exception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('message')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-filename"><label>File:</label> ' +
Y.Escape.html(this.get('fileName')) + '</div>'))
Expand Down
2 changes: 1 addition & 1 deletion lib/yui/src/notification/js/ajaxexception.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Y.extend(AJAXEXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + this.get('COUNT') + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-ajaxexception"></div>')
content = Y.Node.create('<div class="moodle-ajaxexception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('error')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-debuginfo"><label>URL:</label> ' +
this.get('reproductionlink') + '</div>'))
Expand Down
2 changes: 1 addition & 1 deletion lib/yui/src/notification/js/exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Y.extend(EXCEPTION, M.core.notification.info, {
this.setStdModContent(Y.WidgetStdMod.HEADER,
'<h1 id="moodle-dialogue-' + config.COUNT + '-header-text">' + Y.Escape.html(config.name) + '</h1>',
Y.WidgetStdMod.REPLACE);
content = Y.Node.create('<div class="moodle-exception"></div>')
content = Y.Node.create('<div class="moodle-exception" data-rel="fatalerror"></div>')
.append(Y.Node.create('<div class="moodle-exception-message">' + Y.Escape.html(this.get('message')) + '</div>'))
.append(Y.Node.create('<div class="moodle-exception-param hidden param-filename"><label>File:</label> ' +
Y.Escape.html(this.get('fileName')) + '</div>'))
Expand Down

0 comments on commit 43759f5

Please sign in to comment.