Enabled 2 disabled Jasmine tests. Fixed them.

This commit is contained in:
Valera Rozuvan
2013-10-16 14:15:10 +03:00
parent cf3ea89289
commit 269089711e

View File

@@ -20,17 +20,39 @@
});
describe('constructor', function() {
var oldYT = window.YT;
beforeEach(function() {
window.YT = {
Player: function () { },
PlayerState: oldYT.PlayerState,
ready: function(f){f();}
};
initialize();
});
// Disabled when ARIA markup was added to the anchor
xit('render the quality control', function() {
expect(videoControl.secondaryControlsEl.html()).toContain("<a href=\"#\" class=\"quality_control\" title=\"HD\">");
afterEach(function () {
window.YT = oldYT;
});
xit('bind the quality control', function() {
expect($('.quality_control')).toHandleWith('click', videoQualityControl.toggleQuality);
// Disabled when ARIA markup was added to the anchor
it('render the quality control', function() {
expect(videoControl.secondaryControlsEl.html())
.toContain(
'<a ' +
'href="#" ' +
'class="quality_control" ' +
'title="HD" ' +
'role="button" ' +
'aria-disabled="false"' +
'>HD</a>'
);
});
it('bind the quality control', function() {
expect($('.quality_control'))
.toHandleWith('click', videoQualityControl.toggleQuality);
});
});
});