Zope test brwoser based on webtest and wsgi app
This package provides a copy of the new zope.testbrowser version > 5.0.0 and is used for experiment with jsonrpc support.
- bugfix: fix asPlainText method. Make sure that we decode basestring to utf-8 before using html2text method.
completly changed the concept how the html dom, forms and control get handled. The new implementation will setup all forms and controls on any dom changes. Any control value changes will get dumped to the html dom and forms and controls will get re-created. This means the new implementation will allways represent the same state in the dom and any controls. This is not the case in most test browser implementations. The main reason for this changes are json-rpc requests which probably partial update parts of the dom. This was in some uscases a problem and was ending in loosing pre-filled control values which didn’t get replaced by the reponse (parital inplace dom replacement).
Keep in mind, that if you get a control with the method getControl and you change a value e.g. with getControl(‘myinput’).value = ‘something’, that the dom get changed and you need to get the control again. So don’t keep the control reference in our test like:
ctr = getControl(‘myinput’) ctr.value = ‘foo’ ctr.value
Then the ctr reference is outdated since we re-setup the form and controls on any dom changes. But anyway, it’s not that important since both the old control reference (ctr in the sampel above) and the new parsed control which you will get with getControl(‘myinput’) will show the same correct value.
feature: dump all control changes back to dom. This keeps the dom and control representation in sync.
feature: setup all forms and controls on any dom changes. This makes sure that if a form get submitted we allways use the latest control values based on the dom. Also see the comment about control referencing and dom update above.
- bugfix: fix control lookup error in WebTestNonFormControls
- bugfix: use browser.node2String for convert to string in form2String, widget2String, button2String and link2String
- switch to bootstrap 2
- feature: implement j01.jsonrpc and j01.dialog button and link controls. The current implementation supports the j01.jsonrpc and j01.dialog buttons and and links aout of the box. Even the j01 dialog popup is supported. This makes jsonrpc based request/repsone testing very simple. There is no difference in testing a simple or jsonrpc form anymore.
- feature: support a html5 like browser history implementation using pushState and onpopstate like history state management
- feature: support j01.history.js concept given from j01.jsonrpc. Added implicit support for this html5 browser history concept based on given jsonrpc response. Also support the standard history. You can access the history with the method getHistory()
- feature: add activities. You can dump the activities with the method getActivities and you will see a nice log like history.
- feature: support more request methods like PUT, DELETE, OPTIONS etc
- feature: added JSONRPCProxy and getJSONRPCTestProxy supporting wsgi application setup
- feature: implement better support for ajax injection. Keep original html as reference for content injection as browser._dom property and offer a method for replace partial content. Also support response.body content as body attribute and json method for access application/json response.
- initial release. Note, this is just a copy of zope.testbrowser version 5.0.0 for experiment with jsonrpc support for our j01.* packages.