Bug 1168333 - Not having any devices has regressed to being notified as 'Something went wrong' on desktop. r=mikedeboer

This commit is contained in:
Mark Banner 2015-05-26 13:27:47 +01:00
parent 45edc3270c
commit c5f21af537
3 changed files with 11 additions and 0 deletions

View File

@ -330,6 +330,7 @@ loop.conversationViews = (function(mozL10n) {
var errorString;
switch (this.props.failureReason) {
case FAILURE_DETAILS.NO_MEDIA:
case FAILURE_DETAILS.UNABLE_TO_PUBLISH_MEDIA:
errorString = mozL10n.get("no_media_failure_message");
break;

View File

@ -330,6 +330,7 @@ loop.conversationViews = (function(mozL10n) {
var errorString;
switch (this.props.failureReason) {
case FAILURE_DETAILS.NO_MEDIA:
case FAILURE_DETAILS.UNABLE_TO_PUBLISH_MEDIA:
errorString = mozL10n.get("no_media_failure_message");
break;

View File

@ -939,6 +939,15 @@ describe("loop.conversationViews", function () {
expect(view.getDOMNode().querySelector("h2").textContent).eql("no_media_failure_message");
});
it("should show 'no media' for FAILURE_DETAILS.NO_MEDIA reason", function() {
view = mountTestComponent({
cancelCall: function() {},
failureReason: FAILURE_DETAILS.NO_MEDIA
});
expect(view.getDOMNode().querySelector("h2").textContent).eql("no_media_failure_message");
});
it("should show 'generic_failure_title' when no reason is specified", function() {
view = mountTestComponent({cancelCall: function() {}});