Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(816)

Unified Diff: test/test_charm_container.js

Issue 8071044: Update charm small to match "Charm Token".
Patch Set: Update charm small to match "Charm Token". Created 10 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/index.html ('k') | test/test_charm_slider.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_charm_container.js
=== modified file 'test/test_charm_container.js'
--- test/test_charm_container.js 2013-03-28 20:15:47 +0000
+++ test/test_charm_container.js 2013-04-01 20:37:23 +0000
@@ -7,7 +7,7 @@
Y = YUI(GlobalConfig).use([
'array',
'browser-charm-container',
- 'browser-charm-small',
+ 'browser-charm-token',
'node-event-simulate'],
function(Y) {
done();
@@ -55,14 +55,14 @@
}]
});
charm_container.render(container);
- var charms = container.all('.yui3-charmsmall'),
+ var charms = container.all('.yui3-charmtoken'),
shown_charms = charms.slice(0, 3),
hidden_charms = charms.slice(3, 4);
Y.Array.each(shown_charms, function(charm) {
- assert.isFalse(charm.hasClass('yui3-charmsmall-hidden'));
+ assert.isFalse(charm.hasClass('yui3-charmtoken-hidden'));
});
Y.Array.each(hidden_charms, function(charm) {
- assert.isTrue(charm.hasClass('yui3-charmsmall-hidden'));
+ assert.isTrue(charm.hasClass('yui3-charmtoken-hidden'));
});
});
@@ -85,6 +85,7 @@
});
it('toggle between all or a just few items being shown', function() {
+ var hidden;
charm_container = new Y.juju.widgets.browser.CharmContainer({
name: 'Popular',
children: [{
@@ -98,17 +99,16 @@
}]
});
charm_container.render(container);
- var hidden = container.all('.yui3-charmsmall-hidden');
- assert.equal(1, hidden.size());
+
container.one('.expand').simulate('click');
- hidden = container.all('.yui3-charmsmall-hidden');
+ hidden = container.all('.yui3-charmtoken-hidden');
assert.equal(
0, hidden.size(),
'Hidden items after all items should be visible.');
assert.equal('See less', container.one('.expand').get('text'));
container.one('.expand').simulate('click');
- hidden = container.all('.yui3-charmsmall-hidden');
+ hidden = container.all('.yui3-charmtoken-hidden');
assert.equal(
1, hidden.size(),
'No hidden items after extra items should be hidden.');
« no previous file with comments | « test/index.html ('k') | test/test_charm_slider.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b