* remove misleading documentation about a "test failed" message, in
13.0 any uncaught exception or console.error will cause the current
test to be interpreted as failed
* fix tour manager to console.error its step and not add a second
useless error message
* fix menu tester to try and display the failure cause on failure
* improve qunit's test reporter to print the number of tests failed in
case of test suite failure
Should make test failures in tours a bit clearer.
closesodoo/odoo#44296
X-original-commit: 78121b68d099b16f2d775a7a8a963a2a0f474843
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
A number of steps have a last step which may trigger some async
operation (e.g. reopen a menu, close a modal, ...).
This async operation can span over the cleanup of the browser, in
which case its callback will try running in a seriously broken state.
It's simpler to just assume that the last step's side-effects should
not matter to the test's success and interpret it as a "wait" (used
only for its trigger to wait until a proper end-state).
There was a question of whether we should ignore all final actions,
all non-function actions, or all implicit (default) actions. The
latter seems the least disruptive as hopefully developers having
provided a `run` in the final action have a good use case for it.
The 'text' helper does not focus out of the inputs after adding the
text. The new 'text_blur' one will.
It will be needed for future tasks of the website editor since the
inputs in the left panel are only considered on blur or on ENTER.
See https://github.com/odoo/odoo/pull/42189 for example.
closesodoo/odoo#43337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Without demo data, for the odoo-master transifex project
closesodoo/odoo#41935
X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Changed the triggering of some events to dispatch native events instead of
jQuery ones and extended the api of the keydown helper to support text keys.
After the rainbowMan issue was fixed here: e5bc2e7, steps were consumed
on 'click' events. This caused an issue with the drag and drop event
(which breaks tour, because it is expecting a click event). If the user
dragged an element, thetip was not getting consumed as no click event
was triggered.
closesodoo/odoo#40819
X-original-commit: 3f458fe06e6a629edc72428eab749068c2eba1ba
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
The wysiwyg abstraction layer was introduced in saas-12.2 by
commit f2969923. Its goal was to provide an external interface
for other modules that wanted to use the editor feature such
that the editor core itself could be changed without requiring
extensive changes in the other modules.
This commit is adapting the wysiwyg interface to instantiate
the 12.0 editor below it rather than the saas-12.2 one, thus
reverting the "new editor" part of f2969923 itself.
Part of PR 35677.
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
In certain case, a non blocking traceback pops-up.
It happens when the page loads, if the dom is modified
before the tour has been fully loaded.
Theorical steps to reproduce:
- Open a page with an active tour
- Trigger any domain change before the tip-dot is loaded
On every change in the DOM, the MutationObserver tries
to update the page. If the tip-dot has not been loaded yet,
it will try to update the position of a non-existing element.
In that case, we simply ignore it. The update will be called
anyway when the tip-dot has finished his loading.
opws:
1923348
1965964
2011027
2008708
2001867
2000228
1998906
1972914
1972629
1963173
1961373
1956962
1949591
1947390
1947286
1944577
1944459
1941764
1938887
1936518
1935831
1934788
1934471
1934225
2006977
1970672
1931721
1931593
closesodoo/odoo#34199
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.
Task 1937686
closesodoo/odoo#31243
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Now that the debug mode is stored in session, we need a clear indication that
debug mode is activated.
In backend, the 'fa-bug' is doing the trick but in frontend there is no visible
clue that debug mode is enabled.
This commit separate the debug manager code/feature so we can instanciate it in
frontend only with usefull options (such as enable assets, leave debug mode..).
Now, in frontend, people having access to the navbar (o_main_navbar) will see
the same 'fa-bug' icon with minimal options as mentioned above.
Also, in the footer, there will be another 'fa-bug' icon without any options.
It will be usefull when the navbar is not shown, typically the case for
public user, or for portal (without website installed)).
Clicking on it will simply leave debug mode as hinted in tooltip.
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281Closes#33213
As now the debug state is stored in session, the JS framework code and some
templates needed some changes.
First, the debug state is retrieved from session and not the URL anymore.
Second, the debug state does not need to be forwarded as it is now persistent.
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281Closes#33213
* web, survey
This commit takes advantage of the other commits of this PR to enable
lazy loading for most frontend javascript:
1) Extract the minimum part of the assets common:
- promises library and polyfill
- boot.js
2) Create "assets_common_lazy" which is "assets_common" - "minimum"
3) Include the "minimum" assets in frontend layouts using "defer"
loading and "assets_common_lazy" using "lazy" loading
4) Create a script to do the actual lazy loading in a "minimum" frontend
assets
5) Lazy load the current frontend / website editor assets
Part of https://github.com/odoo/odoo/pull/32181
task-1961045
It's quite common that the `$().text()` method returns lots of random whitespaces at the beginning and end of the string. They're pretty unpredictable (extension views can add or remove them) and invisible to the end user.
This code chunk should allow to select an `<option>` based on its raw text content, but most of them will just fail without this patch. And most chances are that current ones just work equally with this patch.
This will make frontend tours more pleasant to write.
closesodoo/odoo#32718
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Create a tour with only one step for Community
`edition: 'community'`
- Install a database in Enterprise
`tip.in_modal` in `_check_for_tooltip` cashes since `tip` is undefined.
opw-1998603
closesodoo/odoo#33430
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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 : 7410de111f
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.
closesodoo/odoo#31158
Before this rev., steps were consumed on 'mousedown' events. This
caused an issue with the RainbowMan displayed at the end of tours
(which closes itself on 'click' events outside its $el).
Here is what occured when the user clicked on the last step's
element:
- 'mouseenter' event triggered
- current step consumed, as well as the tour, and a RainbowMan
is instantiated and appended to the DOM
- 'click' event triggered
- RainbowMan closes itself because of that 'click' event
closesodoo/odoo#31148