]>
git.proxmox.com Git - extjs.git/blob - extjs/classic/classic/test/specs/panel/Table.js
1 describe("Ext.panel.Table", function () {
2 var createGrid = function (storeCfg
, gridCfg
) {
3 store
= Ext
.create('Ext.data.Store', Ext
.apply({
4 storeId
:'simpsonsStore',
5 fields
:['name', 'email', 'phone'],
7 { 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" },
8 { 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" },
9 { 'name': 'Homer', "email":"homer@simpsons.com", "phone":"555-222-1244" },
10 { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" }
21 grid
= Ext
.create('Ext.grid.Panel', Ext
.apply({
25 { header
: 'Name', dataIndex
: 'name', width
: 100 },
26 { header
: 'Email', dataIndex
: 'email', flex
: 1 },
27 { header
: 'Phone', dataIndex
: 'phone', flex
: 1, hidden
: true }
40 describe('forceFit', function () {
41 it('should let the headerCt know it is part of a forceFit grid when header is a grid config', function () {
46 expect(grid
.forceFit
).toBe(true);
47 expect(grid
.headerCt
.forceFit
).toBe(true);
50 it('should let the headerCt know it is part of a forceFit grid when header is an instance', function () {
53 columns
: new Ext
.grid
.header
.Container({
55 { header
: 'Name', dataIndex
: 'name', width
: 100 },
56 { header
: 'Email', dataIndex
: 'email', flex
: 1 },
57 { header
: 'Phone', dataIndex
: 'phone', flex
: 1, hidden
: true }
62 expect(grid
.forceFit
).toBe(true);
63 expect(grid
.headerCt
.forceFit
).toBe(true);