Skip to content
Snippets Groups Projects
  1. Nov 29, 2017
    • Martin Geubelle's avatar
      [FIX] *: replace incorrect `view_mode` · 8d49a38f
      Martin Geubelle authored
      Some actions were using `list` as value for the attribute `view_mode`.
      This value is not valid, the list view is named `tree` server-side.
      
      This was causing issues when setting `view_ids` (`ir.actions.act_window.view`)
      on the action because `tree` and `list` were not matching correctly.
      
      Closes #21056
      8d49a38f
    • Thibault Delavallée's avatar
    • Thibault Delavallée's avatar
      [REM] crm: so long mail.thread access rules · adf27adc
      Thibault Delavallée authored
      Thanks to ksa 87d53140
      adf27adc
    • Thibault Delavallée's avatar
      [MERGE] mail: clean and move tests · 21ad8d25
      Thibault Delavallée authored
      This commit cleans mail tests in order to have less low-level tests and
      to improve code coverage. It improves the tests of features and reduces
      field-level checks. Some tests depending on implementation details are
      wrapped inside methods. This way if implementation changes most tests
      are still valid once assert methods are updated.
      
      Common classes, tools and models are improved. More test models exist
      in order to be able to test several features and prepare land to add
      performance test. Each set of tests is updated in its own commit.
      
      Finally tests are moved to test_mail. This way tables linked to test
      models are not present in production database. Existing test_performance
      module is split so that there is tests for base and tests for mail.
      21ad8d25
    • Thibault Delavallée's avatar
    • Thibault Delavallée's avatar
      22cce3be
    • Thibault Delavallée's avatar
      [MOV] (test_)mail: move tests into their dedicated module · d040bfde
      Thibault Delavallée authored
      Purpose: avoid having useless tables for test models in a
      production environment.
      d040bfde
    • Thibault Delavallée's avatar
    • Thibault Delavallée's avatar
      32c08fd7
    • Thibault Delavallée's avatar
      2b6d8408
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean mail gateway tests · ac9103ad
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * use of new models and data;
       * lessen low level tests;
       * some light cleaning;
      ac9103ad
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean and improve mail tracking tests · 53d65ed7
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * clean and remove most of old tests, low-level and not very useful;
       * add tests for several cases, like simple tracking, tracking linked to
         a mail.message.subtype, trackink automatically sending emails based
         on some template;
      53d65ed7
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean and improve mail followers tests · 99ee2f34
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * add test for the various auto subscription cases, notably through
         umbrella (like project -> task auto subscription);
       * remove low-level tests; there is no need to test the output of add
         followers method as it is only an implementation details;
      99ee2f34
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean mail message tests · f8118d8c
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * move mail_mail model specific tests to its own file;
       * move feature specific tests to its own file;
       * add missing loggers to lessen noise;
      f8118d8c
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean and improve mail channel tests · 846352f0
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * tests should be more about channel listeners than followers as
         channels should not have followers;
       * test email_send that trigger the mailing list behavior;
       * currently add some join and leave channel methods are those are
         missing in the base model:
       * test joining and leaving channels that should not change
         followers but members;
       * use less preconfigured data;
       * add some mute loggers to lessen noise;
       * remove some old code about patching that is not necessary anymore and
         could actually create funny bugs;
      846352f0
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean server actions tests · 91504434
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * remove unnecessary fail string;
       * remove unnecessary method return value test as this is low level;
      91504434
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean invite wizard tests · 15e13190
      Thibault Delavallée authored
      Purpose is to lessen noise and make tests less low-level. Including :
      
       * remove test of emails content as this is too low-level and not really
         interesting. Purpose of test is to check followers have been added
         and not the content of a template;
       * remove unnecessary fail string;
       * remove unnecessary low level checks;
      15e13190
    • Thibault Delavallée's avatar
      [IMP] mail: tests: clean test discuss and test message compose · 12fd198b
      Thibault Delavallée authored
      Purpose is to be less low level and improve code coverage by adding
      tests if required. Duplicated or redundant tests are removed to lessen
      number of tests. Notably content of notification emails, recipients and
      specific chatter control through context keys are more tested.
      
      Some more tests about buttons present in notifications emails should be
      added. Maybe in a near future. I hope so.
      12fd198b
    • Thibault Delavallée's avatar
      [REM] mail: tests: remove test message read · 50aaaa69
      Thibault Delavallée authored
      This is some remains of old message_read / message_fetch tests linked to
      the old chatter using threaded display. Tests have been removed when the
      feature was changed. Only the setup was left. Let us get rid of it.
      50aaaa69
    • Thibault Delavallée's avatar
      [IMP] mail: tests: improve / add common classes and data for mail tests · de25767f
      Thibault Delavallée authored
      This commit improves common classes and add helpers for mail tests.
      Future commits will use this new stuff to improve the tests.
      
       * improve existing models and add some of them. There are now several
         models
      
        * mail.test.simple: chatter-enabled record without any really advanced
          feature. Can be used everywhere standard chatter and communication
          tests are required;
        * mail.test.track: chatter-enabled record with basic value tracking
          and responsible tracking;
        * mail.test.activity: chatter-enabled record using activities;
        * mail.test.full: complete chatter-enabled record with advanced
          tracking, automatic subscription and automatic email send based on
          templates and tracking;
        * mail.test: chatter-enabled record having an alias. It can be used
          where umbrella record like projects or teams has to be used in
          tests;
      
       * add MockEmails test class: this class mocks the mail gateway so that
         tests can work on emails without actually sending them. It is taken
         out of TestMail class to clearly separate features from class;
       * improve created data in the various classes and prepare work to
         lessen created data during tests;
       * add helpers on base test class, notably
      
        * sudoAs: context manager to run a code snippet using a given user;
        * assertNotifications: assert notification content, aka Inbox or email
          notification and their content; may be subject to change depending on
          mail evolution;
        * assertEmails: check content of sent emails;
      de25767f
    • Thibault Delavallée's avatar
      [MOV] mail: reorganize content of tests, separate tests from models and data · 2a3ac4ce
      Thibault Delavallée authored
      Purpose of this commit is to reorganize the mail tests. Containing
      
       * move test models into mail/tests/models/;
       * move data into mail/tests/data even if it is python code, as it is
         likely that some additional data will appear soon;
       * split test_mail_features into test for discuss app and test related
         to message post and composer, to better identify test target;
       * split and remove test_portal, those tests are now integrated in the
         other tests;
      
      There is no change in this commit. Only some renaming and file move or
      split.
      
      mergeup: remove / split test portal
      2a3ac4ce
    • Thibault Delavallée's avatar
      [SPLIT] test_performance: split between base and mail performance tests · 1cc1ef50
      Thibault Delavallée authored
      Test performance will now hold the base class for performance tests as
      well as tests related to the ORM, depending only on base. A new module
      test_mail is introduced at this commit that contains performance tests
      related to mail module. This commit contains only code move and should
      not impact anything.
      
      Future commits will move mail tests into test_mail so that all mail
      related tests are located in the same optional module. This allows
      notably to avoid creating a lot of unnecessary tables when installing
      mail module on production databases.
      1cc1ef50
    • Thibault Delavallée's avatar
      [IMP] odoo: tests: allow to compare HtmlElement trees · ea6415bd
      Thibault Delavallée authored
      addTypeEqualityFunc does not work for subclasses. Therefore if we want
      to be able to compare html trees we have to add the equality check for
      html elements which are children of _Element.
      ea6415bd
    • Alexandre Kühn's avatar
      [FIX] odoo service: fix location of res_country_data.xml file · 9cd1cae6
      Alexandre Kühn authored
      It has been moved inside base/data, instead of base/res.
      We have to adapt code that is calling it.
      9cd1cae6
  2. Nov 28, 2017
  3. Nov 27, 2017
Loading