Addressed PR comments
This commit is contained in:
@@ -140,20 +140,22 @@
|
||||
});
|
||||
|
||||
describe('make sure the speed control gets the focus afterwards', function() {
|
||||
beforeEach(function() {
|
||||
var anchor;
|
||||
beforeEach(function() {
|
||||
initialize();
|
||||
anchor= $('.speeds > a').first();
|
||||
videoSpeedControl.setSpeed(1.0);
|
||||
spyOnEvent(state.videoSpeedControl.mainAnchor, 'focus');
|
||||
spyOnEvent(anchor, 'focus');
|
||||
});
|
||||
|
||||
it('when the speed is the same', function() {
|
||||
$('li[data-speed="1.0"] a').click();
|
||||
expect('focus').toHaveBeenTriggeredOn(state.videoSpeedControl.mainAnchor);
|
||||
expect('focus').toHaveBeenTriggeredOn(anchor);
|
||||
});
|
||||
|
||||
it('when the speed is not the same', function() {
|
||||
$('li[data-speed="0.75"] a').click();
|
||||
expect('focus').toHaveBeenTriggeredOn(state.videoSpeedControl.mainAnchor);
|
||||
expect('focus').toHaveBeenTriggeredOn(anchor);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -62,8 +62,6 @@ function () {
|
||||
|
||||
state.videoSpeedControl.el = state.el.find('div.speeds');
|
||||
|
||||
state.videoSpeedControl.mainAnchor = state.videoSpeedControl.el.children('a');
|
||||
|
||||
state.videoSpeedControl.videoSpeedsEl = state.videoSpeedControl.el
|
||||
.find('.video_speeds');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user