1. 27 Nov, 2019 9 commits
    • Jérome Perrin's avatar
      CodingStyleTest: run testXHTML for each business template · 85cb1131
      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.
      85cb1131
    • Jérome Perrin's avatar
      forge/administration: move some scripts to administration · fb693787
      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.
      fb693787
    • Jérome Perrin's avatar
      administration: include new component types in "check source code" · 0bb3efc6
      Jérome Perrin authored
      We want this check to run on all components.
      0bb3efc6
    • Jérome Perrin's avatar
      testXHTML: test portal types also from tools · 8f47b8bc
      Jérome Perrin authored
      Some portal types such as Business Template were not tested by testXHTML
      because this tests starts 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.
      
      Keep the current way of testing view of portal types in their natural
      containers by starting from modules and make another pass to test anyway
      portal types that might be contained in tool. In that case, we use a
      mapping of known tools IDs because I don't think we can introspect at
      this point.
      8f47b8bc
    • Jérome Perrin's avatar
      core: support non initialized cache when viewing cache statistics · ffd78ee1
      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.
      
      fixup! core: workaround non initialized cache when viewing cache statistics
      ffd78ee1
    • 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 nexedi/erp5!629
      82206749
  7. 18 Nov, 2019 5 commits
  8. 15 Nov, 2019 1 commit