testXHTML: test portal types also from tools
Some portal types such as Business Template were not tested by testXHTML because this tests started by modules and recursively tests based on allowed content types. But types that are not created in a module but in a tool were never tested. Because the list of test methods to generate must be created before the ERP5 site is created, this test introspects business template source XML. This now uses a slightly different approach, instead of finding module and chain of allowed content types from business template XML, we only introspect the list of actions for each portal type in the XML. The lookup of the appropriate containers is no longer done before setup by static analysis of business templates XML, but by dynamic analysis of the running ERP5 site during the test method. If we don't find a chain of portal type, we create the test document in a tool without filter of content types (typically, portal_trash). This way, we can test all views of all portal types. This revealed a problem with VCS view on business template which needs preferences and working copy setup. We just mark this test as expected failure this time.
Showing
This diff is collapsed.
Please register or sign in to comment