mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[inputFocus/tests] fix test compatibility in IE
This commit is contained in:
parent
e3f0479d76
commit
2c5fae89c8
1 changed files with 5 additions and 3 deletions
|
@ -9,7 +9,6 @@ define(function (require) {
|
|||
var inputValue = 'Input Text Value';
|
||||
|
||||
beforeEach(module('kibana'));
|
||||
|
||||
beforeEach(inject(function (_$compile_, _$rootScope_, _$timeout_) {
|
||||
$compile = _$compile_;
|
||||
$rootScope = _$rootScope_;
|
||||
|
@ -31,7 +30,10 @@ define(function (require) {
|
|||
$rootScope.$digest();
|
||||
$timeout.flush();
|
||||
selectedEl = document.activeElement;
|
||||
selectedText = window.getSelection().toString();
|
||||
selectedText = selectedEl.value.slice(
|
||||
selectedEl.selectionStart,
|
||||
selectedEl.selectionEnd
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,4 +50,4 @@ define(function (require) {
|
|||
expect(selectedText).to.equal(inputValue);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue