Tour steps on m2x widgets are now consumed only when an actual record
is selected (not on random click on the widget).
closesodoo/odoo#21625
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
As a start_tour helper was added on the python side (PR #32316),
a javascript helper counterpart was needed as suggested on the PR.
closesodoo/odoo#32441
Signed-off-by: Christophe Monniez (moc) <moc@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
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.
This is needed for #29957 that has a test tour on 500 error page.
closesodoo/odoo#30240
This rev. concerns automatic executions of tours. It makes each
step executed in a setTimeout, thus ensuring that the call stack
has been emptied before executing the next step (which is the case
when the user manually executes the flow).
For historical reasons, the tour manager executed each step of tour
in a setTimeout (10ms). When a step could be executed (i.e. when
its trigger selector has a match in the DOM), the element matching
its trigger was saved as a jQuery element (the $anchor), and in the
setTimeout, the action (e.g. click) was performed on that element.
However, it could happen that, after the delay, the $anchor was no
longer in the DOM, either because
1) the tip selector had no match anymore, meaning that the element
had been removed from the DOM meanwhile
2) the tip selector still had a match in the DOM, but that element
had been rerendered meanwhile
Case 2) occured sometimes when the main_flow_tour was executed in
community, when trying to open a Manufacturing Order after having
reloaded the Manufacturing Order list view (because the row of the
order to open that was saved as $anchor was the one of the list
before the reload, and that list was re-rendered during the delay).
This rev. removes the default delay of 10ms, but the feature is
kept such that one can still manually run a tour slowly (e.g. to
debug or to make a demo).
This is important if the mouse must stay on the element after it has been
clicked. This is the case for the product image zoom, which will be tested in
the following commit.
The refactoring also had to be done in order to create a set of unit
tests.
Each behavior can be tested, including the behaviors performed as a
consequence of keyboard interactions (for instance: Enter, Tab...).
This commit also contains some changes to test_utils that were
necessary given the new structure of the wysiwyg editor.
Co-authored-by: Gorash <chm@odoo.com>
With this commit, a failing tour will display more information in the logs,
which may be useful for debugging purpose.
- display full html instead of just the content of body
- display the 'content' flag of the step, which is very useful to see
which step failed
closesodoo/odoo#28863
Before this commit, the code for the tour system was kind of naive and
simply activated tips for each tour. This was not really an issue,
since most user install one app at a time, so they had the time to
follow a tour, and when they install the next app, it is no longer
active.
However, since we activated the multi-app feature in our website, it now
happens that multiple apps are installed at once. Because of this, this
commit is now necessary.
closesodoo/odoo#28178
Currently:
- normal modals have a z-index of 1050 ($zindex-modal)
- chat window have a z-index of 1051
($zindex-model + 1 == $o-mail-thread-window-zindex)
- document viewer modal have a z-index of 1052
($o-mail-thread-window-zindex + 1)
- tour tooltip ball and messages have a z-index of 1051 ($zindex-modal)
A tooltip ball is in the DOM next to the element that is pointed out, so
if the element is inside a document viewer modal we see the ball.
But a tooltip message is positioned inside the body, so if we hover a
ball inside the document viewer modal, the tooltip message is behind the
modal.
In this commit, we set tooltip to bootstrap $zindex-tooltip value (1070
a of now).
opw-1893035
closes#27928
A previous rev. odoo/odoo@2672143 has prevented a tip to be consumed
in automated tours when blockUI was displayed.
This condition is not exactly correct. A blockUI element can be displayed
on any node, not only the webclient (which is the case when calling
`framework.blockUI`. This is the use case we want to deal, not the others.
So the tip cannot be consumed only with `o_ui_blocked` now.
closesodoo/odoo#28060
Run odoo-bin using "--without-demo=all"
Install any module (I used CRM)
On the main page, a droplet should appear under the newly installed module
As admin, using the debug mode, click on the "Disable tour" button
The action is restricted due to the missing ACL
opw-1890350
closesodoo/odoo#27655
Rev. 2f7c03d added a second admin user (id 2), the 'human' one, on
top of the 'technical' one (id 1, also known as the superuser).
Basically, all calls to _is_superuser() should have been changed to
_is_admin(). They weren't. As a consequence, some features that
were previously available for the admin weren't anymore (e.g.
tours).
This rev. replaces all calls to _is_superuser() by calls to
_is_admin().
Before this commit, a tip on a dropdown menu item was visible.
This is due to the positioning of the tip, which was on the
dropdown-menu (because it has overflow `auto`). The tip was
appended on the dropdown-menu, and may overflow as a result.
This commit handles specifically the case of dropdown-menu,
so that dropdown-menu is never a candidate for the placement
of the tip.
*: crm,
hr_expense,
hr_recruitment,
point_of_sale,
project,
sale,
stock,
web_tour,
test_main_flows,
test_new_api
To sum up:
- Click on "Apps Menu" then the app item.
(previously: click on '+' then the app item).
- Click on navbar section menu item.
(previously: click on sidebar section menu item).