Fix bug where pressing 'a' when logged out would show backdrop
Change-Id: I7976ffcd1ffb14e0833018e99a6661a91967364d
This commit is contained in:
@@ -306,6 +306,8 @@
|
|||||||
|
|
||||||
switch (e.keyCode) {
|
switch (e.keyCode) {
|
||||||
case 65: // 'a'
|
case 65: // 'a'
|
||||||
|
if (!this._loggedIn) { return; }
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.$.replyOverlay.open();
|
this.$.replyOverlay.open();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -67,8 +67,13 @@ limitations under the License.
|
|||||||
'Should navigate to /');
|
'Should navigate to /');
|
||||||
showStub.restore();
|
showStub.restore();
|
||||||
|
|
||||||
|
|
||||||
MockInteractions.pressAndReleaseKeyOn(element, 65); // 'a'
|
MockInteractions.pressAndReleaseKeyOn(element, 65); // 'a'
|
||||||
var overlayEl = element.$.replyOverlay;
|
var overlayEl = element.$.replyOverlay;
|
||||||
|
assert.isFalse(overlayEl.opened);
|
||||||
|
element._loggedIn = true;
|
||||||
|
|
||||||
|
MockInteractions.pressAndReleaseKeyOn(element, 65); // 'a'
|
||||||
assert.isTrue(overlayEl.opened);
|
assert.isTrue(overlayEl.opened);
|
||||||
overlayEl.close();
|
overlayEl.close();
|
||||||
assert.isFalse(overlayEl.opened);
|
assert.isFalse(overlayEl.opened);
|
||||||
|
|||||||
Reference in New Issue
Block a user