-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making sure that the title element gets placed into the UL element #1114
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module('MenuButton'); | ||
|
||
test('should place title list item into ul', function() { | ||
var player, menuButton; | ||
|
||
player = PlayerTest.makePlayer(); | ||
|
||
vjs.MenuButton.prototype.kind_ = 'testTitle'; | ||
|
||
menuButton = new vjs.MenuButton(player, { | ||
'title': true | ||
}); | ||
|
||
var menuContentElement = menuButton.el().getElementsByTagName('UL')[0]; | ||
var titleElement = menuContentElement.children[0]; | ||
|
||
ok(titleElement.innerHTML === 'TestTitle', 'title element placed in ul'); | ||
|
||
player.dispose(); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module('Tracks'); | ||
|
||
test('should place title list item into ul', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like there's an opportunity to de-dupe some code here, but we can worry about that later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i didn't know if the convention was to split by module or if i could have just thrown both of these tests in the same file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the way you set it up is right. It just points to the fact that we have the exact same code in two places. You don't need to worry about that for this one. |
||
var player, chaptersButton; | ||
|
||
player = PlayerTest.makePlayer(); | ||
|
||
chaptersButton = new vjs.ChaptersButton(player); | ||
|
||
var menuContentElement = chaptersButton.el().getElementsByTagName('UL')[0]; | ||
var titleElement = menuContentElement.children[0]; | ||
|
||
ok(titleElement.innerHTML === 'Chapters', 'title element placed in ul'); | ||
|
||
player.dispose(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some other related issues after pulling this in. For instance,
this.kind_
here should really be this.options().title. Kind must have gotten copied over from tracks at some point.