]>
git.proxmox.com Git - extjs.git/blob - extjs/packages/charts/test/specs/draw/Container.js
1 describe('Ext.draw.Container', function () {
3 describe("'sprites' config", function () {
4 it("should accept sprite configs.", function () {
5 var container
= new Ext
.draw
.Container({
12 var sprite
= container
.getSprites()[0];
13 expect(sprite
.isSprite
).toBe(true);
14 expect(sprite
.type
).toBe('rect');
15 expect(sprite
.attr
.x
).toEqual(10);
20 it("should accept sprite instances.", function () {
21 var container
= new Ext
.draw
.Container({
22 sprites
: new Ext
.draw
.sprite
.Rect({
27 var sprite
= container
.getSprites()[0];
28 expect(sprite
.isSprite
).toBe(true);
29 expect(sprite
.type
).toBe('rect');
30 expect(sprite
.attr
.x
).toEqual(10);
35 it("should put sprites into the specified surface or the 'main' one.", function () {
36 var container
= new Ext
.draw
.Container({
44 var sprite
= container
.getSurface('test').getItems()[0];
46 expect(sprite
.isSprite
).toBe(true);
47 expect(sprite
.type
).toBe('rect');
48 expect(sprite
.attr
.x
).toEqual(10);