1. 27 Nov, 2019 10 commits
    • Jérome Perrin's avatar
      core: trivial fixes for pylint · 8c569012
      Jérome Perrin authored
      8c569012
    • Jérome Perrin's avatar
      CodingStyleTest: run testXHTML for each business template · 92c3c94b
      Jérome Perrin authored
      This will allow to find problems when only business templates and their
      dependencies are installed. When we run testXHTML with all business
      template installed we don't see problems that may happen only when some
      business templates are not installed.
      92c3c94b
    • Jérome Perrin's avatar
      forge/administration: move some scripts to administration · d9db0988
      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.
      d9db0988
    • Jérome Perrin's avatar
      administration: include new component types in "check source code" · 057f498b
      Jérome Perrin authored
      We want this check to run on all components.
      057f498b
    • Jérome Perrin's avatar
      testXHTML: test portal types also from tools · 1f1497c7
      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 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.
      1f1497c7
    • Jérome Perrin's avatar
      core: support non initialized cache when viewing cache statistics · 08356a94
      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.
      08356a94
    • Jérome Perrin's avatar
      ERP5: fix propertysheets for IdGenerator · c46511f4
      Jérome Perrin authored
      DublinCore was missing, so getCompactTitle was causing AttributeError
      _baseGetTranslatedTitle
      c46511f4
    • Jérome Perrin's avatar
      core: Workaround invalid html on AlarmTool_viewAlarmList · db1ddb54
      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.
      db1ddb54
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      core/forge: fix scripts "Repository History" actions · 1fe56123
      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.
      1fe56123
  2. 26 Nov, 2019 3 commits
  3. 25 Nov, 2019 5 commits
  4. 22 Nov, 2019 12 commits
  5. 21 Nov, 2019 4 commits
  6. 19 Nov, 2019 1 commit
    • Jérome Perrin's avatar
      Test Suite for Coding Style test · 82206749
      Jérome Perrin authored
      A new test suite to perform static check on business templates using  `CodingStyleTestCase`.
      
      This runs a coding style test for each business template, after installing the business template and its dependencies listed in business template metadata.
      
      ---
      
      In order to start with a test suite with no failure, business templates that does not pass this test today (because they don't install or because pylint issues still needs to be reviewed) are skipped with an ad-hoc  `bt/skip_coding_style_test` in the business template. Note that this file is not created by business template system as it is a temporary measure, business templates must pass pylint and other checks from `CodingStyleTestCase`.
      
      ---
      
      I took the approach of creating one independent test per business template, instead of the approach of creating a site with all business templates like we did in testNamingConventions or testHTML. This appears as another "Coding Style" test, like Performance or Scalability tests.
      
      The idea behind this was that if we extend our business template checks ( for example when we translate the [ERP5 Module Creation Guidelines](https://www.erp5.com/documentation/developer/guideline/module) to some scripts we can run on a business template ), we can check that each business template contain what it should contain and not just that the global result is OK.
      
      
      
      /reviewed-on !629
      82206749
  7. 18 Nov, 2019 5 commits