Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-02-02 22:25:56 +0300
committerMike Greiling <mike@pixelcog.com>2017-02-02 22:25:56 +0300
commitf4fca2de924a05cccfebc23229f43884ec0b1048 (patch)
tree448807cee1fba0c231554b8f502d1dd7eca0a611 /spec
parent66f9086fbc8f68574d9754367a25157480b23e0e (diff)
simplify test for focus state
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/shortcuts_issuable_spec.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/javascripts/shortcuts_issuable_spec.js b/spec/javascripts/shortcuts_issuable_spec.js
index db11c2516a6..e0a5a7927bb 100644
--- a/spec/javascripts/shortcuts_issuable_spec.js
+++ b/spec/javascripts/shortcuts_issuable_spec.js
@@ -59,12 +59,8 @@
expect(triggered).toBe(true);
});
it('triggers `focus`', function() {
- var focused = false;
- $(this.selector).on('focus', function() {
- focused = true;
- });
this.shortcut.replyWithSelectedText();
- expect(focused).toBe(true);
+ expect(document.activeElement).toBe(document.querySelector(this.selector));
});
});
describe('with a one-line selection', function() {