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) {
|
||||
case 65: // 'a'
|
||||
if (!this._loggedIn) { return; }
|
||||
|
||||
e.preventDefault();
|
||||
this.$.replyOverlay.open();
|
||||
break;
|
||||
|
||||
@@ -67,8 +67,13 @@ limitations under the License.
|
||||
'Should navigate to /');
|
||||
showStub.restore();
|
||||
|
||||
|
||||
MockInteractions.pressAndReleaseKeyOn(element, 65); // 'a'
|
||||
var overlayEl = element.$.replyOverlay;
|
||||
assert.isFalse(overlayEl.opened);
|
||||
element._loggedIn = true;
|
||||
|
||||
MockInteractions.pressAndReleaseKeyOn(element, 65); // 'a'
|
||||
assert.isTrue(overlayEl.opened);
|
||||
overlayEl.close();
|
||||
assert.isFalse(overlayEl.opened);
|
||||
|
||||
Reference in New Issue
Block a user