зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168333 - Not having any devices has regressed to being notified as 'Something went wrong' on desktop. r=mikedeboer
This commit is contained in:
Родитель
ed548479e7
Коммит
10a4acc6be
|
@ -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() {}});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче