mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
Adjust formatting
This commit is contained in:
parent
f4ca8bb78d
commit
1d8b10dc99
1 changed files with 10 additions and 13 deletions
|
|
@ -15,19 +15,16 @@ describe('focusElement Directive', function() {
|
|||
scope.$digest();
|
||||
}));
|
||||
|
||||
it('places focus on the element it is applied to when the expression it binds to evaluates to true',
|
||||
inject(function($timeout) {
|
||||
var focusSpy = sandbox.spy();
|
||||
it('places focus on the element it is applied to when the expression it binds to evaluates to true', inject(function($timeout) {
|
||||
var focusSpy = sandbox.spy();
|
||||
|
||||
elementToFocus.appendTo(document.body);
|
||||
elementToFocus.on('focus', focusSpy);
|
||||
scope.focusThisLink = true;
|
||||
scope.$digest();
|
||||
|
||||
$timeout.flush();
|
||||
expect(document.activeElement.dataset.focusElement).to.eql("focusThisLink");
|
||||
expect(focusSpy).to.have.been.called;
|
||||
})
|
||||
);
|
||||
elementToFocus.appendTo(document.body);
|
||||
elementToFocus.on('focus', focusSpy);
|
||||
scope.focusThisLink = true;
|
||||
scope.$digest();
|
||||
|
||||
$timeout.flush();
|
||||
expect(document.activeElement.dataset.focusElement).to.eql("focusThisLink");
|
||||
expect(focusSpy).to.have.been.called;
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue