Skip to content
Snippets Groups Projects
Commit 0b08007d authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Fix the extended error info not opening.

* Add BrowserID.ErrorDisplay.start() to showFailure - this handles opening the extended info.
* Add a test to make sure clicking on the openMoreInfo button shows the extended info.

close #1139
parent 0a23ef21
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ BrowserID.PageHelpers = (function() {
function showFailure(error, info, callback) {
info = $.extend(info || {}, { action: error, dialog: false });
bid.Screens.error.show("error", info);
errorDisplay.start();
callback && callback(false);
}
......
......@@ -147,10 +147,22 @@
});
});
asyncTest("showFailure shows a failure screen", function() {
pageHelpers.showFailure({}, errors.offline, function() {
asyncTest("showFailure - show a failure screen, extended info can be opened", function() {
pageHelpers.showFailure("error", { network: 400, status: "error"}, function() {
testHelpers.testErrorVisible();
start();
// We have to make sure the error screen itself is visible and that the
// extra info is hidden so when we click on the extra info it opens.
$("#error").show();
$("#moreInfo").hide();
$("#openMoreInfo").trigger("click");
// Add a bit of delay to wait for the animation
setTimeout(function() {
equal($("#moreInfo").is(":visible"), true, "extra info is visible after click");
start();
}, 100);
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment