Bug 1100378 - Retry button for Hello standalone. r=nperriault a=sylvestre
authorRomain Gauthier <romain.gauthier@monkeypatch.me>
Tue, 02 Dec 2014 13:15:58 -0800
changeset 242355 65cde31aa62febf5a37d9798b1718b925c8456a5
parent 242354 f76e4729b7defda774de938aa5cabcc3757a8093
child 242356 4fdb2b128230804ea54804be794a2cf23c52efef
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnperriault, sylvestre
bugs1100378
milestone36.0a2
Bug 1100378 - Retry button for Hello standalone. r=nperriault a=sylvestre
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() {