- 02 Dec, 2019 3 commits
-
-
Jérome Perrin authored
/reviewed-on nexedi/erp5!993
-
Jérome Perrin authored
When updating persistent to >= 4.4 `__repr__` of zope objects display information about ZODB connection but it's more useful to have information about the acquisition chain at this level. This happens because `persistent.Persistent.__repr__` is used instead of `OFS.SimpleItem.Item.__repr__` (as of zope 2.13 ). One notable case was proxy field error messages, it was supposed to include the path of the proxy field in the error message. This one is fixed by fixing the MRO so that persistent.Persistent does not appear first. /reviewed-on nexedi/erp5!991
-
Jérome Perrin authored
testXHTML was testing only document contained in modules, this take another approach to test all portal types and fixes the problems found now that we test views of all portal types. The number of tests in testXHTML also increase from 864 to 1137. /reviewed-on !992
-
- 28 Nov, 2019 16 commits
-
-
Sebastien Robin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Without this, subclassing defining this method will have arguments-differ pylint warning because the signature of Base._checkConsistency is different.
-
Jérome Perrin authored
These scripts are used to check the site configuration and also in CodingStyleTest. This is just the minimal so that CodingStyleTest can run, but this could be extended to several scripts currently in erp5_toolbox skinfolder of erp5_forge which overlaps with erp5_administration. Also, regarding CodingStyleTest, it seems that erp5_administration contain a lot of things, so we may want to extract a smaller business template containing only the scripts used for static analysis of business template.
-
Jérome Perrin authored
We want this check to run on all components.
-
Jérome Perrin authored
Module is an acceptable prefix for modules Introduce a list of skins IDs that does not match our conventions but are acceptable because this is what external API are calling.
-
Jérome Perrin authored
Some portal types such as Business Template were not tested by testXHTML because this tests started by modules and recursively tests views based on allowed content types. Because of this approach, types that are not created in a module but in a tool were never tested. With unittest, the only way to dynamically add test methods to a class is to generate a test class in test_suite function. At this stage, the ERP5 site is not created yet, so the test had to introspects business templates XML. This now uses a slightly different approach, instead of finding modules and chain of allowed content types from business template XML, we only use business template to introspect the list of actions. The lookup of the appropriate containers is no longer done before setup by static analysis of business templates XML, but later once the site is created, by dynamic analysis of the modules and allowed content types on the running ERP5 site during the test method. If we don't find a chain of portal types, we create the test document in portal_trash, a tool without filter of content types. This way, we can test all views of all portal types. This revealed a few problems: - we need developer role to create components in portal_components, for this we add developer role to the current user. - Delivery Cell portal type looks not used, there are no container accepting it. We don't test delivery cell views for this reason. - VCS view on business template needs preferences and working copy setup. We just mark this test as expected failure for now. - Solver Decision has a form conditionnaly displayed when there's a relation to a solver, but this test does not evaluate action conditions and does not allow to call a script (that would made it possible to modify the document so that the condition is true). For now we also mark this as expected failure.
-
Jérome Perrin authored
Delivery Cell is not really used these days and cannot be created in testXHTML, so drop these useless views. For reference, the same views still exists on all other movements portal types, so we don't "loose anything important" by removing the views here.
-
Jérome Perrin authored
The corresponding form, BudgetTransfer_viewBudgetTransferLine does not exist, so mark view as not visible for now so that it's not tested.
-
Jérome Perrin authored
This redirects to another site, so it is not really a view action. This also confuses testXHTML.
-
Jérome Perrin authored
-
Jérome Perrin authored
Maybe what's missing is an interaction to update cache internals with updateCache when a cache is added, but that's enough to make TestXHTML pass now.
-
Jérome Perrin authored
DublinCore was missing, so getCompactTitle was causing AttributeError _baseGetTranslatedTitle
-
Jérome Perrin authored
When listboxs has an editable field, but the field is non editable, it produces a markup like: <a href="link to the line"><EditableField/></a> This is fine for most fields, but some editable fields are rendered as an <input> even if they are not editable - this is the case for CheckBoxField. To prevent rendering <a><input></a> which is not valid HTML, configure the enabled field as non-editable on alarm list view, with this change listbox treats the field as an editable field and just render the field as <EditableField/> without the <a>. To keep the same visual appearance of having a disabled checkbox field, make this field disabled with extra.
-
Jérome Perrin authored
-
Jérome Perrin authored
The action was in erp5_core, but the form in erp5_forge. Move the action in erp5_forge. The listbox list method was raising error because it was using catalog with unsupported installation_state=. Change to use contentValues instead. This listbox had "Listbox" as a title, use "History" instead, which makes a little more sense in this context.
-
- 27 Nov, 2019 8 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Keep the same panel/header links than on form_view.
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Vincent Pelletier authored
Translation table seems to be often picked before other conditions by MariaDB's query planner. When there is at least one other condition on a query which require a join (ex: category-based relation, delivery-table-based date comparison, ...) this may not be the most efficient execution plan. Instead, put translation lookup into its own separate query, in a way similar to security_uid lookup. This way, two separate execution plans can be used to execute the overall operation. One drawback is that the new query does not know of any portal_type condition, so all possible original values are listed along with their respective portal types. This does not seem to affect query performance, and on most common (and simple) cases where a translated value is used, like module listboxes, the query planner should be able to eliminate irrelevant entries as such queries are already expected to provide a list of relevant portal types and to lack condition nesting. Preserve custom related keys: these are used when selecting or sorting, while the scriptable keys are used when applying a condition. Note on UI tests: mass workflow transition listbox is not supposed to be sorted. It's bad that these tests all rely on row order, and also bad that they all check the whole listbox. They should pick the line they care about and not check the rest - except for one test whose purpose would be to check the whole list anyway.
-
Vincent Pelletier authored
Add support for "like" auto-detection and use as default comparison operator. Allows mimicking KeywordKey and DefaultKey with 2 parameters, in addition to already-supported simple SearchKey.
-
- 26 Nov, 2019 3 commits
-
-
Gabriel Monnerat authored
-
Jérome Perrin authored
MissingCategoryDocumentConstraint was incorrectly using unrestrictedTraverse, unlike category API which uses its own resolveCategory method with better semantics. Because of this, some problems were not reported: - categories using paths that resolve by acquisition, but does not exists as such (like in the test) - categories using path with dynamic objects, like a website language. /reviewed-on nexedi/erp5!986
-
Jérome Perrin authored
checkRevision now returns a callable, return a do-nothing lambda when the expected revision is already checked out /reviewed-on !990
-
- 25 Nov, 2019 5 commits
-
-
Gabriel Monnerat authored
-
Gabriel Monnerat authored
-
Gabriel Monnerat authored
With this merge request we add the feature of allow a gadget to call submitDialog *and* the prototype of scan documents from mobile with new ERP5 UI /reviewed-on nexedi/erp5!932
-
Gabriel Monnerat authored
For now, this is chrome only erp5_document_scanner_ui_test: Add tests to Document Scanner gadget
-
Gabriel Monnerat authored
-
- 22 Nov, 2019 5 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-