Commit 1f1497c7 authored by Jérome Perrin's avatar Jérome Perrin

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.
parent 08356a94
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment