smartrics/RestFixture — Issue #11: Problems processing some javascript
Author: lachelt
Created: 2012-02-10 19:12:01+00:00
State: open

We are seeing what looks like some parsing problems when handling JSON responses with javascript

This works just fine:
|GET | /cart | 200 | | jsonbody.length==2 |

This works just fine:
|GET | /cart | 200| | true && jsonbody.length >= 2 |

This does not:
|GET | /cart | 200 | | jsonbody.length >= 2 |

java.lang.IllegalArgumentException: Cannot extract xpath 'jsonbody.length >= 2' from document [{"resource":{"createDate":1328900702152,"shipBins":[{"lineItems":[{"lineItemId":1,"skuRef":"sku1","projectRef":"proj1","quantity":3},{"lineItemId":2,"skuRef":"sku2","projectRef":"proj2","quantity":1}],"shipBinId":1000,"shippingType":"UFC","shippingAddressRef":"addr_1"}],"websiteRef":"ws1","accountRef":"account1","label":"christmas","priceRef":"http://redpoint:8111/cart/4f356a5ee4b08ea379c47e89/price"},"uri":"http://redpoint:8111/cart/4f356a5ee4b08ea379c47e89"},{"resource":{"createDate":1328900702537,"shipBins":[{"lineItems":[{"lineItemId":1,"skuRef":"sku1","projectRef":"proj1","quantity":3},{"lineItemId":2,"skuRef":"sku2","projectRef":"proj2","quantity":1}],"shipBinId":1000,"shippingType":"UFC","shippingAddressRef":"addr_1"}],"websiteRef":"ws1","accountRef":"account_jon","label":"default","priceRef":"http://redpoint:8111/cart/4f356a5ee4b08ea379c47e8a/price"},"uri":"http://redpoint:8111/cart/4f356a5ee4b08ea379c47e8a"}]