Bug 1100378 - Retry button for Hello standalone. r=nperriault
authorRomain Gauthier <romain.gauthier@monkeypatch.me>
Tue, 02 Dec 2014 13:15:58 -0800
changeset 218305 fc97b1d13a0a3a6f8e2b9fb44381a4089e9f4efb
parent 218304 374e01ce74302b4370df2366419c695856a2747d
child 218306 0bb911bec5afa2dad143938efaf6503644d5f5ea
push id27928
push usercbook@mozilla.com
push dateThu, 04 Dec 2014 15:59:43 +0000
treeherdermozilla-central@5bc6c5b77e28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnperriault
bugs1100378
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1100378 - Retry button for Hello standalone. r=nperriault
browser/components/loop/standalone/content/js/standaloneRoomViews.js
browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
browser/components/loop/test/standalone/standaloneRoomViews_test.js
--- a/browser/components/loop/standalone/content/js/standaloneRoomViews.js
+++ b/browser/components/loop/standalone/content/js/standaloneRoomViews.js
@@ -122,16 +122,20 @@ loop.standaloneRoomViews = (function(moz
             )
           );
         }
         case ROOM_STATES.FAILED: {
           return (
             React.DOM.div({className: "room-inner-info-area"}, 
               React.DOM.p({className: "failed-room-message"}, 
                 this._getFailureString()
+              ), 
+              React.DOM.button({className: "btn btn-join btn-info", 
+                      onClick: this.props.joinRoom}, 
+                mozL10n.get("retry_call_button")
               )
             )
           );
         }
         default: {
           return null;
         }
       }
--- a/browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
+++ b/browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
@@ -123,16 +123,20 @@ loop.standaloneRoomViews = (function(moz
           );
         }
         case ROOM_STATES.FAILED: {
           return (
             <div className="room-inner-info-area">
               <p className="failed-room-message">
                 {this._getFailureString()}
               </p>
+              <button className="btn btn-join btn-info"
+                      onClick={this.props.joinRoom}>
+                {mozL10n.get("retry_call_button")}
+              </button>
             </div>
           );
         }
         default: {
           return null;
         }
       }
     }
--- a/browser/components/loop/test/standalone/standaloneRoomViews_test.js
+++ b/browser/components/loop/test/standalone/standaloneRoomViews_test.js
@@ -198,16 +198,24 @@ describe("loop.standaloneRoomViews", fun
       describe("Failed room message", function() {
         it("should display a failed room message on FAILED",
           function() {
             activeRoomStore.setStoreState({roomState: ROOM_STATES.FAILED});
 
             expect(view.getDOMNode().querySelector(".failed-room-message"))
               .not.eql(null);
           });
+
+        it("should display a retry button",
+          function() {
+            activeRoomStore.setStoreState({roomState: ROOM_STATES.FAILED});
+
+            expect(view.getDOMNode().querySelector(".btn-info"))
+              .not.eql(null);
+          });
       });
 
       describe("Join button", function() {
         function getJoinButton(view) {
           return view.getDOMNode().querySelector(".btn-join");
         }
 
         it("should render the Join button when room isn't active", function() {