summaryrefslogtreecommitdiff
path: root/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py
AgeCommit message (Collapse)Author
2019-07-12[FIX] core: avoid writting sources during testsXavier-Do
Future runbot improvement may share sources between build, meaning that sources will be readonly to avoid any interaction. _touch() was supposed to handle ro filesystem but f7130556 introduced a new test that was not working in this case. Instead of trying to touch file and pseudomocking the result if the filesystem is readonly, this commit add a real patch on getmtime. cherry-pick of b295723c999 closes odoo/odoo#34823 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-06-06[FIX] test_assetsbundle: Properly unpatch ir.attachmentLucas Lefèvre
`_patch_method` and `_revert_method` do not work properly. This commit fixes a test which patches `create` and `unlink` of `ir.attachment`. The methods are not correctly unpatched. One consequence: if a module is installed after this test is executed and the new module overrides `create` and `unlink`, the overritten methods are never called. closes odoo/odoo#33952 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-02-19[IMP] tests: replace browser_js success and failure stringsChristophe Monniez
When evaluating js tests using the browser_js method, they are considered a success when 'ok' is found in the console log and a failure if 'error' is found instead. This is not very robust and recently failed with this commit : 7410de111fe It adds a filter named 'Error' in a view, when the 'click_all' test clicks on this filter, a message with the name of the filter is written in the console, wrongly leading to a test failure. With this commit, the browser_js method expects a log message in the browser console with the explicit text "test successful". On the other hand, any error in the console log will lead to a test failure but a test can be forced to fail with the explicit error message in the browser console "test failed". As a bonus, the python logger should now also log browser js trace messages. closes odoo/odoo#31158
2018-10-19[IMP] assets: remove css files splitGéry Debongnie
Before this commit, our asset bundles had a special behaviour for bundles of type css: because of an old limitation in IE9, css files had to be split to make sure they had less than 4095 rules per stylesheets. Since we no longer support IE9, this code can be removed, which should slightly simplify the bundle code, and should slightly reduce the number of requests required to properly load odoo. closes odoo/odoo#27933
2018-08-10[REF] *: add support for RTL languagesMartin Trigaux
מזל טוב The direction parameter will now have a real impact on the web interface and completly switch the direction of the interface. Add the dependency rtlcss to switch the direction with a css postprocessor. Two different assets will be generated for ltr or rtl /web/content/<...>/web.assets_backend.0.css and /web/content/<...>/rtl/web.assets_backend.0.css to be able to differentiate it easily Adapt the css and views to be easier to switch direction Render graph as it is, do not move y-axis right side, as per mathematical rule value goes left from origin are considered negative, so keep graph as it is for right to left language add test cases for language direction specific assets bundle if language direction is rtl then we also store css files in assets bundle now we store two assets bundle, one for ltr and one for rtl language direction test two assets bundles generated, also test two assets bundle generated for en_US and ar_SY
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-27[MERGE] forward port branch saas-11.2 up to 12ddec3a767Christophe Simonis
2018-06-21[MERGE] forward port branch 11.0 up to c5ed3729709Christophe Simonis
2018-06-15[FIX] qweb: use cdn for asset filesChristophe Matthieu
Refactoring of qweb to call _post_processing_att for each nodes. This change remove the crappy ovewrite in website module. The website overwrite only the _post_processing_att to add the cdn parameters. The static node (without t- attributes) can stay static (remove overwrite of _is_static_node), the cdn is applied at the compile time for this nodes instead of at the running time like the dynamic node.
2018-04-18[REF] test_assetsbundle: adapt bundle testsqsm-odoo
2018-02-12[REF] tests: `TestCursor` is now a proxy to a real `Cursor`Raphael Collet
This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is now shared between the Python test and the rpc requests. This simplifies code to prepare a JS test, and code to check the result of a JS tour. Fixes #12237
2017-11-27[MOV] base: move ir_* models into models/Thibault Delavallée
2017-09-27[FIX] test_assetsbundle: handle readonly filesDenis Ledoux
If the Odoo server runs with its sources read-only for itself, this is not possible for the server to touch the files contained in the assets. In such a case, instead of touching the file, we alter the attachment checksum, to simulate a change within the modified date. However, in such a case, we can only test that the bundle is well generated again. We can no longer check the change of version and modified date, since the modified date of the files have not changed, and therefore the checksum (which is based on the files modified date, among others) neither.
2016-09-02[REF] openerp: move `openerp` to `odoo`Raphael Collet