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

Delta Between Two Patch Sets: test/test_charm_token.js

Issue 9070043: Sandbox import/export w/File DnD support
Left Patch Set: Created 11 years, 11 months ago
Right Patch Set: Sandbox import/export w/File DnD support Created 11 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « test/data/sample-improv.json ('k') | test/test_fakebackend.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 'use strict'; 1 'use strict';
2 2
3 3
4 describe('charm token', function() { 4 describe('charm token', function() {
5 var charm_container, CharmToken, Y; 5 var charm_container, CharmToken, Y;
6 6
7 before(function(done) { 7 before(function(done) {
8 Y = YUI(GlobalConfig).use( 8 Y = YUI(GlobalConfig).use(
9 ['browser-charm-token', 'node-event-simulate'], function(Y) { 9 ['browser-charm-token', 'node-event-simulate',
10 'juju-tests-utils'], function(Y) {
10 CharmToken = Y.juju.widgets.browser.CharmToken; 11 CharmToken = Y.juju.widgets.browser.CharmToken;
11 done(); 12 done();
12 }); 13 });
13 }); 14 });
14 15
15 beforeEach(function() { 16 beforeEach(function() {
16 charm_container = Y.Node.create('<div id="charm-container"></div>'); 17 charm_container = Y.namespace('juju-tests.utils')
17 Y.one(document.body).prepend(charm_container); 18 .makeContainer('charm-container');
18 }); 19 });
19 20
20 afterEach(function() { 21 afterEach(function() {
21 Y.one('#charm-container').remove(true); 22 charm_container.remove(true);
22 }); 23 });
23 24
24 it('exists', function() { 25 it('exists', function() {
25 var charm = new CharmToken(); 26 var charm = new CharmToken();
26 assert.isObject(charm); 27 assert.isObject(charm);
27 }); 28 });
28 29
29 it('renders with correct metadata', function() { 30 it('renders with correct metadata', function() {
30 var cfg = { 31 var cfg = {
31 id: 'test', 32 id: 'test',
(...skipping 27 matching lines...) Expand all
59 }); 60 });
60 charm.get('size').should.eql('large'); 61 charm.get('size').should.eql('large');
61 62
62 // and the css class should be on the token once rendered. 63 // and the css class should be on the token once rendered.
63 charm.render(charm_container); 64 charm.render(charm_container);
64 charm_container.one('.charm-token').hasClass('large').should.equal(true); 65 charm_container.one('.charm-token').hasClass('large').should.equal(true);
65 }); 66 });
66 67
67 68
68 }); 69 });
LEFTRIGHT

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