Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web: don't mock mobile test suite environment
The mobile-specific code relies on the size of the browser <= SM (currently 767px). But when phantomjs was used to run the JS tests headlessly there was no way to force that size for the mobile test suite (e.g. when running from the command line, runbot...). The only solution was to mock some variables (isMobile, size_class) in web.config to force them to mobile-like values (see commits odoo/odoo@9bc5009481de188 and odoo/odoo@497dfb691774bd7b8). Since the switch to Chrome Headless the browser size is set to a mobile-friendly size (currently 375x667) when the mobile test suite is ran. So isMobile is automatically set to true. The code to mock the web.config has then become redundant. This commit removes it to only rely on the browser window size for the mobile test suite execution. Notes: When testing manually in the browser it's now required to set the browser window to a mobile-friendly size. Even if it was already the case, it will provide a more realistic environment and allows to test important/behavior-related media queries (e.g. clicking on a button only visible/present on mobile). BTW the easiest way to run all tests is to execute them directly using Chrome Headless (except for debugging of course). closes odoo#36328 Signed-off-by: Christophe Monniez (moc) <[email protected]>
- Loading branch information