1. 27 Nov, 2019 13 commits
    • Jérome Perrin's avatar
      CodingStyle: ignore more skins and prefixs · 92cd2032
      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.
      92cd2032
    • Jérome Perrin's avatar
      core: fix Folder_cut to check relations of sub-objects · b93b5f3d
      Jérome Perrin authored
      This `o` was an unused variable. The initial intention was probably
      this.
      b93b5f3d
    • Jérome Perrin's avatar
      core: remove unused scripts · 16ba032d
      Jérome Perrin authored
      These scripts are not used and does not respect naming conventions or
      have pylint errors.
      16ba032d
    • Jérome Perrin's avatar
      core: trivial fixes for pylint · 1646a4d2
      Jérome Perrin authored
      1646a4d2
    • Jérome Perrin's avatar
      CodingStyleTest: run testXHTML for each business template · 3823b3f7
      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.
      3823b3f7
    • Jérome Perrin's avatar
      forge/administration: move some scripts to administration · f30bd453
      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.
      f30bd453
    • Jérome Perrin's avatar
      administration: include new component types in "check source code" · f8dd6062
      Jérome Perrin authored
      We want this check to run on all components.
      f8dd6062
    • Jérome Perrin's avatar
      testXHTML: test portal types also from tools · e3d6dbe1
      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.
      e3d6dbe1
    • 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 !629
      82206749
  7. 18 Nov, 2019 2 commits