summaryrefslogtreecommitdiff
path: root/addons/web/tests
AgeCommit message (Collapse)Author
2019-02-18[IMP] base,web,website_sale: add tests for product image and mixinSébastien Theys
This commit will add tests for the PR #30656 which added the following commit: 7daa85dd12ff522be510bc2f8db1d968cae7d891 The tests in the current commit achieve 100% code coverage for: - the `image.mixin` - the overridden `image.mixin` methods in `product.product` - the `_get_images` methods of ecommerce - the size logic in method `content_image` (route `/web/image`) PR: #31181
2019-01-31[MERGE] forward port branch 12.0 up to cb8fefa8999Christophe Simonis
2019-01-24[FIX] web: bar chart no crazy with 2 group byNicolas Lempereur
In 3d2ca8104e4 some change were introduced to the graph view. But part of it had no sense when displaying data over 2 group by. eg. if the first level has 2 groups (2018, 2019) and each second level 2 groups (Done,Cancelled), we could have: 2018/Done: 0 2018/Cancelled: 5 2019/Done: 8 2019/Cancelled: 9 this gives us two main groups [2018: 5] / [2019: 17], the code remove the 2018 because [2018/Done] is 0 so we have something odd with columns not in order, and in stacked bar chart some part of a bar at the wrong offset opw-1932517 closes #30529
2018-11-19[IMP] web: force mobile screen size for mobile suiteAaron Bohy
Before this rev., the mobile js tests suite was run on a desktop like chrome-headless (1366x768). This can be a problem for this suite which tests mobile behaviors and thus clicks on parts of the interface that are only visible on small devices (thanks to scss media queries). This wasn't really a problem until now, because the test framework allowed to click on invisible elements. But it's no longer the case since the introduction of click helpers.
2018-10-12[FIX] web: increase clickEveryWhere test timeout againChristophe Monniez
Two minutes increase was obviously not enough. closes odoo/odoo#27709
2018-10-10[FIX] web: increase clickEveryWhere test timeoutChristophe Monniez
Actually, in normal conditions, the test last a little bit less than 30 min as Admin user in enterprise edition. This is to close of the timeout and as expected, the timeout was reached. With this commit, the Admin test in increased of 2 minutes. The Demo test duration is slightly faster and does not need an increase. closes odoo/odoo#27608
2018-08-31[FIX] web: wait web client to be ready before clickEverywhere testChristophe Monniez
When starting the clickEverywhere test with enterprise modules installed, it happens that Odoo web client is not yet fully loaded. In this situation, the test does not find any app to test. With this commit, an attribute is added to odoo to check if the web client is fully loaded.
2018-08-29[IMP] web: New test to test Odoo menusChristophe Monniez
This commit adds a new js test in web that enters each app and click on each view switcher, each menu and each search filter. This test is tagged '-standard' and 'click_all' as it could last a long time, that way it's not executed by default. It could also be started from the browser console with 'clickEverywhere();'.
2018-05-02[MERGE] forward port branch 11.0 up to 521414b1c10Christophe Simonis
2018-04-26[FIX] web: Explicitly decode the JS files in tests.Manuel Vázquez Acosta
When in Python 3, then function `open` defaults to open the file in text mode with and the encoding (if not passed) is taken from `locale.getpreferredencoding`. Using `getpreferredencoding` is not necessarily a good practice. Because files might no be encoded that way. When testing Odoo not in runbot (which has LANG set to C.UTF-8) you may get: Traceback (most recent call last): File "/home/gitlab-runner/src/odoo11/addons/web/tests/test_js.py", line 24, in test_check_suite self._check_only_call('web.qunit_suite') File "/home/gitlab-runner/src/odoo11/addons/web/tests/test_js.py", line 37, in _check_only_call if RE_ONLY.search(fp.read()): File "/home/gitlab-runner/virtualenvs/odoo11-MlnlRiTaP2/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4757: ordinal not in range(128) The proposed solution is to read the file in binary mode, and decode to unicode/str ourselves using utf-8. We don't use the encoding argument of `open`, so that the code works in both Python 3 and Python 2. PR #24434
2018-04-12[IMP] web: add fail fast feature to qunit test suiteGéry Debongnie
With this commit, we introduce a new 'fail fast' feature to our qunit test suite: when it is activated, the qunit test suite will immediately stop after the first failed test. It is accessible as a flag in the url (failfast), or by clicking the checkbox in the UI. It is currently not activated by default. Note that this commit also change the url for the runbot phantomjs test in order to activate this feature. This allows us to increase the global timeout for the js test suite without fear!
2018-04-11[FIX] web: increase timeout of test suiteChristophe Monniez
As the test suite increases, the timeout has to follow until a better solution is found (like a fail fast in Qunit).
2018-01-22[MERGE] forward port branch saas-11.1 up to fa1f2132e79Christophe Simonis
2018-01-19[FIX] web,website,tests: fix typo in test tagsChristophe Monniez
This typo prevented two tests to run.
2018-01-18[IMP] tests: Add the possibility to tag testsChristophe Monniez
Purpose: When running tests, all the tests for the installed/updated files are done. This commit adds a 'tagged' decorator that can be used to tag tests. Combined with a new 'test-tags' CLI option, it adds the ability to filter which tests are executed. For example, @tagged('slow') will add a tag 'slow' to the test. The CLI option 'test-tags="slow"' will only run tests tagged 'slow'. One can use prefixes to select cases with tags. '+' or no prefix means that the tests tagged with this tag are selected for execution. '-' prefix will exclude the tests tagged with this tag. Exclusion takes precedence over inclusion. Also, by default, all Odoo tests cases are tagged 'standard' and with the technical name of the module. This means that when selecting tests with the 'test-tags' parameter, if '-standard' is not specified, all tests tags are going to be executed. When tagging tests, one can remove such automatic tag by prefixing the tag name with '-'. E.g. @tagged('-standard') will remove the standard tag from the test. Another example, if one wants to test the 'sale' module alone, even without adding any 'tagged' decorator thos tests can be selected like that: --test-tags="sale" Tests are selected or deselected using a TagsSelector. When instanciated, a string is passed with comma separated tests selectors like '+slow,-standard'. When the 'check' method is called with a test as argument, it returns True or False if the test has to be executed or not.
2018-01-17[FIX] web: timeout of test suiteNicolas Martinelli
A timeout of 300 seconds is not enough anymore to run all tests on some runbots (e.g. runbot12) or Odoo.sh installations. The duration on these servers is often slightly over 300, leading to a failing test. This increase is logical since unit tests are added on a regular basis. opw-805418 opw-804621
2017-11-20[IMP] web: also check for presence of `QUnit.only` in mobile suiteChristophe Simonis
2017-11-10[FIX] web(_editor): enable mobile testsAaron Bohy
This rev. introduces a new test suite meant to test the webclient components on mobile devices. The key 'config.device.isMobile' is forced to true in this test suite, so that mobile specific JS files are properly executed, which isn't the case in the classic JS test suite (setting isMobile to true in the test definition is too late, as the JS files are already processed). For now, this new test suite contains a single test, which was skipped until this rev. as it couldn't be executed in the classical JS test suite. Both suites are executed at each build of the runbot, and they can be manually executed from the webclient as well (via the debug manager).
2017-09-11[MERGE] forward port branch saas-16 up to 295a377e5d4Christophe Simonis
2017-09-11[IMP] web: add test to ensure nobody will commit again unwanted `QUnit.only`Christophe Simonis
2017-09-06[MERGE] forward port branch saas-16 up to 64d56995e04Christophe Simonis
2017-09-05[FIX] web: increase timeout for js testsGéry Debongnie
We have a new runbot server which is quite slow. Because of this, it takes too much time to run this unit test suite (for comparison, one of the last build by the main runbot takes 126s). This is necessary for now, until we use chrome headless or something...
2017-08-25[FIX] web: bump test timeoutChristophe Simonis
2017-08-24[FIX] web: increase timeout for JS unit testsGéry Debongnie
Some runbot servers are quite slow in the midday, and they fail the unit tests because the 3min timeout is reached.
2017-07-11[MERGE] forward port branch saas-16 up to 1581d31b3eeChristophe Simonis
2017-07-11[FIX] web: increase timer for js testsGéry Debongnie
A few builds fail when run in 'primetime', because the js test suite takes more than 120 seconds (on the slow runbots). With this commit, we increase our timer to 180s to make sure that this does not happen again.
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2017-04-28[FIX] Various P3-related import changesxmo-odoo
* LDAP import: python-ldap is not python3-compatible, pyldap is Warning: only supported from debian Stretch (current testing)? https://packages.debian.org/search?searchon=names&keywords=pyldap * implicitly relative imports * imports of moved or removed stdlib modules issue #8530
2017-04-26[FIX] web: increase timeout of test_01_jsAaron Bohy
This test executes the QUnit js test suite. Since the new views, this suite keeps growing, which is good. The default timeout for phantomjs tests is 60 seconds, which starts to be tight for test_01_js when the runbot is overloaded. So this commit increases the timeout of this test to 120 seconds.
2017-04-11[FIX] web: execute WebSuite tests post installAaron Bohy
So that tests written in addons are executed as well.
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-10-27[MERGE] forward port branch saas-12 up to 6f8e40cChristophe Simonis
2016-10-27[FIX] web: deactivate unreliable testChristophe Simonis
2016-08-10[IMP] various: use odoo for imports instead of openerp and update class namesThibault Delavallée
2016-08-03[IMP] web: remove void file, replace openerp tags, add license, clean importsfwi-odoo
2015-09-28[IMP] unittest2 > unittestLeonardo Rochael Almeida
The `unittest2` package is simply a backport of `unittest` from the Standard Library of Python 2.7 to previous versions. There is no reason to use it any longer. Closes #6941
2014-12-31[REF] remove vim modelines and resulting trailing blank linesLeonardo Donelli
Let 2015 be a year without modelines! cf #4174
2014-10-10[FIX] web: re-enable test_menu.py without the mock-menu testSimon Lejeune
2014-08-08[IMP] refactoring: move function topological_sort to openerp.toolsRaphael Collet
2014-07-06[MERGE] new v8 api by rcoRaphael Collet
A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes
2014-06-27[MERGE] backend front end integrationSimon Lejeune
Render the top-menu (backend menu or frontend editbar) server-side. Use Fontawesome icons (mail, timezone, chat). Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-04-30[MERGE] Web assets moved from manifests to ir.ui.view bundlesFabien Meghazi
bzr revid: fme@openerp.com-20140430151302-e42monb4klz4udw5
2014-04-29[REM] removing menu_diRichard Mathot (OpenERP)
bzr revid: rim@openerp.com-20140429135640-84ycqhsdlhmdj268
2014-04-28convert js tests to HttpCaseAntony Lesuisse
bzr revid: al@openerp.com-20140428152857-h7z61vdw5crezv2u
2014-02-21[IMP] filter out phantomjs warning on OSXXavier Morel
bzr revid: xmo@openerp.com-20140221143512-0qmmxq0gibmdgk6d
2014-02-21[IMP] JS unit testsXavier Morel
split automated suite so web only runs its own JS tests, and web_tests_demo runs its own. Also reversed changes to index. todo: use hack cursor thing? bzr revid: xmo@openerp.com-20140221124557-s875nj0xrf2t85i9
2014-02-20[MERGE] forward port of branch saas-2 up to revid 3950 ↵Christophe Simonis
dle@openerp.com-20140220141302-3paib80ixiyi66qg bzr revid: chs@openerp.com-20140220161753-ec6l9ser1pbnmzgk
2014-02-18[FIX] QUnitSuite: don't be self-recursiveXavier Morel
bzr revid: xmo@openerp.com-20140218104347-u56pghrto948iclx
2014-02-16[FIX] web test_ui test for view form instead of kanbanAntony Lesuisse
bzr revid: al@openerp.com-20140216223208-0gw9dev1jpxsskib
2014-02-16[FIX] tests move test_ui to web as it requires web.login templateAntony Lesuisse
bzr revid: al@openerp.com-20140216215039-448vh07674on9569