зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1210707 - Feedback view no longer allows closing the window and avoiding leaving feedback. r=mikedeboer
This commit is contained in:
Родитель
15c18ce28f
Коммит
45b716e162
|
@ -147,7 +147,8 @@ loop.store.ConversationAppStore = (function() {
|
|||
this._dispatcher.dispatch(new loop.shared.actions.HangupCall());
|
||||
break;
|
||||
case "room":
|
||||
if (this._activeRoomStore.getStoreState().used) {
|
||||
if (this._activeRoomStore.getStoreState().used &&
|
||||
!this._storeState.showFeedbackForm) {
|
||||
this._dispatcher.dispatch(new loop.shared.actions.LeaveRoom());
|
||||
} else {
|
||||
loop.shared.mixins.WindowCloseMixin.closeWindow();
|
||||
|
|
|
@ -250,6 +250,19 @@ describe("loop.store.ConversationAppStore", function () {
|
|||
sinon.assert.notCalled(loop.shared.mixins.WindowCloseMixin.closeWindow);
|
||||
});
|
||||
|
||||
it("should close the window when a room was used and it showed feedback", function() {
|
||||
store.setStoreState({
|
||||
showFeedbackForm: true,
|
||||
windowType: "room"
|
||||
});
|
||||
roomUsed = true;
|
||||
|
||||
store.LoopHangupNowHandler();
|
||||
|
||||
sinon.assert.notCalled(dispatcher.dispatch);
|
||||
sinon.assert.calledOnce(loop.shared.mixins.WindowCloseMixin.closeWindow);
|
||||
});
|
||||
|
||||
it("should close the window when a room was not used", function() {
|
||||
store.setStoreState({ windowType: "room" });
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче