Changeset 218


Ignore:
Timestamp:
03/12/09 16:08:31 (9 years ago)
Author:
sbenthall
Message:

minor changes/cleaning of popup example and tests

Location:
sandbox/opengeo/drake/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/opengeo/drake/trunk/core/tests/widgets/Popup.html

    r214 r218  
    160160        }
    161161
    162 /*
    163         function test_readRecords(t) {
    164             t.plan(9);
    165             // setup
    166             var reader, features, info, records;
    167             reader = new GeoExt.data.FeatureReader({}, [
    168                 {'name': 'foo'},
    169                 {'name': 'bar'}
    170             ]);
    171             features = [
    172                 new OpenLayers.Feature.Vector(null, {
    173                     'foo': 'foo_0',
    174                     'bar': 'bar_0'
    175                 }),
    176                 new OpenLayers.Feature.Vector()
    177             ];
    178             features[0].fid = 1;
    179             features[0].state = OpenLayers.State.INSERT;
    180             features[1].fid = 2;
    181             features[1].state = OpenLayers.State.DELETE;
    182             // 8 tests
    183             info = reader.readRecords(features);
    184             records = info.records;
    185             t.eq(info.totalRecords, 2, 'readRecords returns correct number of records');
    186             t.eq(records[0].get('foo'), 'foo_0', 'readRecords correctly set feature properties in record');
    187             t.eq(records[0].get('fid'), 1, 'readRecords correctly set feature fid in record');
    188             t.eq(records[0].get('state'), OpenLayers.State.INSERT, 'readRecords correctly set feature state in record');
    189             t.ok(records[0].get('feature') == features[0], 'readRecords correctly set feature in record');
    190             t.eq(records[1].get('fid'), 2, 'readRecords correctly set feature fid in record (no properties case)');
    191             t.eq(records[1].get('state'), OpenLayers.State.DELETE, 'readRecords correctly set feature state in record (no properties case)');
    192             t.ok(records[1].get('feature') == features[1], 'readRecords correctly set feature in record (no properties case)');
    193             // 1 test
    194             reader.totalRecords = 20;
    195             info = reader.readRecords(features);
    196             t.eq(info.totalRecords, 20,
    197                  "readRecords returns correct number of records");
    198         }
    199 */
    200162    </script>
    201163  <body>
  • sandbox/opengeo/drake/trunk/examples/popup.html

    r214 r218  
    7474        mapwin.show();
    7575
    76         mapPanel = mapwin.items.items[0]; //gross path :(
     76        mapPanel = mapwin.items.get(0);
    7777
    7878
Note: See TracChangeset for help on using the changeset viewer.