1. 28 Nov, 2019 10 commits
    • Jérome Perrin's avatar
      testXHTML: test portal types also from tools · b1f4cbe4
      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.
      b1f4cbe4
    • Jérome Perrin's avatar
      immobilisation: remove views from Delivery Cell · bb04dc66
      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.
      bb04dc66
    • Jérome Perrin's avatar
      budget: mark Budget Transfer view not visible · beca769c
      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.
      beca769c
    • Jérome Perrin's avatar
      base: make Geographical Location "View on map" a jump action · c4fb5037
      Jérome Perrin authored
      This redirects to another site, so it is not really a view action.
      
      This also confuses testXHTML.
      c4fb5037
    • Jérome Perrin's avatar
      50a2b27e
    • Jérome Perrin's avatar
      core: support non initialized cache when viewing cache statistics · aa37dc71
      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.
      aa37dc71
    • Jérome Perrin's avatar
      ERP5: fix propertysheets for IdGenerator · 1fe4cfe8
      Jérome Perrin authored
      DublinCore was missing, so getCompactTitle was causing AttributeError
      _baseGetTranslatedTitle
      1fe4cfe8
    • Jérome Perrin's avatar
      core: Workaround invalid html on AlarmTool_viewAlarmList · 5f04c239
      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.
      5f04c239
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      core/forge: fix scripts "Repository History" actions · eddc52b8
      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.
      eddc52b8
  2. 27 Nov, 2019 8 commits
  3. 26 Nov, 2019 3 commits
  4. 25 Nov, 2019 5 commits
  5. 22 Nov, 2019 12 commits
  6. 21 Nov, 2019 2 commits