OpenLayers OpenLayers

Changeset 7155

Show
Ignore:
Timestamp:
05/13/08 15:19:38 (4 months ago)
Author:
sbenthall
Message:

Fleshed out tests for WFS protocol read

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/vector-behavior/tests/Protocol/WFS/v1_0_0.html

    r7151 r7155  
    1313     
    1414    function test_Protocol_WFS_v1_0_0_read(t) { 
    15         t.plan( 2 ); 
     15        t.plan( 5 ); 
    1616 
    1717        var protocol = new OpenLayers.Protocol.WFS.v1_0_0({ 
     
    2727        } 
    2828         
    29         //var bounds = new OpenLayers.Bounds(1,2,3,4); 
    30          
    3129        request = protocol.read({ 
    3230            params: { 
    33                 bbox: [1, 2, 3, 4] 
     31                bbox: [1, 2, 3, 4], 
     32                maxFeatures : 10 
    3433            } 
    3534        }) 
     
    4039        t.eq(request.url, "http://sigma.openplans.org/geoserver/wfs", "Request url is correct.") 
    4140         
    42         t.eq(xData.getAttribute('service'), "WFS","Default params make it to read request.") 
    43         //t.eq(xData.getAttribute('typeName'), "topp:tasmania_cities","Params passed in to constructor make it to read request.") 
    44         //t.eq(xData.getAttribute(SERVICE), [1,2,3,4],"Params passed in to read() as arguments make it to the read request.") 
    45          
     41        t.eq(xData.getAttribute('service'), "WFS","Default envelope params make it to read request."); 
     42        t.eq(xData.getAttribute('maxFeatures'),"10","Passed in envelope params make it to request."); 
     43        t.eq(xData.childNodes[1].firstChild.childNodes[1].firstChild.nodeName, "gml:coordinates","BBOX filter seems well constructed"); 
     44        t.eq(xData.textContent, "the_geom1,2 -1,0","Text content checks out.") 
    4645         
    4746        OpenLayers.Request.POST = old_OpenLayers_Request_POST;