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
Родитель ed548479e7
Коммит 10a4acc6be
3 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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() {}});