[FIX] mail: fix runbot error 231582 (no web_save when manually saving) - #227484
[FIX] mail: fix runbot error 231582 (no web_save when manually saving)#227484KevGerard wants to merge 1 commit into
Conversation
seb-odoo
left a comment
There was a problem hiding this comment.
I'm surprised there are many occurrences of click on o_form_button_save in tests and none of them have this pattern.
Are other tests failing too, and were never fixed?
And if not, what makes this test different?
|
Also it might be easier for all of those PR to have the actual test name in the commit title (or something that helps in this regard), because having many runbot-{id} in my inbox doesn't really help seeing what each PR is about. |
I will investigate a bit more, though my feeling is that the html editor is taking more time than other tests to notify of a change and therefore the save button could be not available right away. |
So indeed, after investigation the It is definitely possible that hoot is returning before this bus notification and is therefore pushing on the save button being not ready. This commit solves this issue because the |
|
Ok I found another one: https://runbot.odoo.com/odoo/error/161256 I think then all usages of |
| @@ -147,6 +147,6 @@ test("HtmlMail add icon and save inline html", async function () { | |||
| await contains("a.nav-link:contains('Icons')").click(); | |||
| await contains("span.fa-glass").click(); | |||
|
|
|||
| await contains(".o_form_button_save").click(); | |||
| await contains(".o_form_button_save:not(.invisible)").click(); | |||
There was a problem hiding this comment.
I think :visible is possible, there are some occurrences in code.
There was a problem hiding this comment.
Might actually be better to use clickSave() from @web/../tests/web_test_helpers and stepUtils.saveForm() from @web_tour/tour_service/tour_utils for tours, that way we don't have to modify our tests every change.
There was a problem hiding this comment.
I wasn't aware of these helpers, if it's their preferred way then yes I suppose this is what should be used. The :enabled state is properly linked to the :visible state?
There was a problem hiding this comment.
Actually no, but we can add a modifier in the clickSave({ modifier: "visible" }) which might be useful and more readable anyway. For the tours, we'll have to do it manually though.
There was a problem hiding this comment.
Do we really need a param? It looks like it should be the default, always checked?
|
https://runbot.odoo.com/odoo/error/230493 looks related? https://runbot.odoo.com/odoo/error/232486 why would it click when not visible instead??? |
|
According to the template, click on |
I guess to click on an invisible button to save something that was already saved 2 steps before... |
It does not look related to this problem. Looks like a UI issue, the tab should be there in all cases (saved form or not). |
|
Right, I just saw it only happens in single ln10 country ch, so probably just a bad override in that module. |
|
So after some more investigation, I was wrong and this is actually not the problem. The On top of that, the issue here is that the I am looking further to try and find the real reason this issue could happen. It might just be that the added icon is not yet added to the record and therefore no changes is yet found, hence no save. |
|
Thank you for the follow up, let us know when you find a solution. |
This commit tries to solve runbot issues with mail html fields widget. It seems clicking on the save button manually is not generating a call to the backend. This could be due to the fact the button is not enabled due to the data being invalid. Therefore using the clickSave util could be useful in those situation since waiting that the button becomes enabled. This solution is not 100% sure to fix the issue in all cases but manually disabling the button is creating the issue we can observe in those runbots. There is a good chance it might work. fixes-runbot-231582 fixes-runbot-233049
f4796d2 to
6b41e1b
Compare
|
@seb-odoo As said in the description, the new update should be solving the 2 runbot issues even though not 100% sure. In any case it is better/safer than the previous solution. |
This commit tries to solve runbot issues with mail html fields widget. It seems clicking on the save button manually is not generating a call to the backend. This could be due to the fact the button is not enabled due to the data being invalid. Therefore using the clickSave util could be useful in those situation since waiting that the button becomes enabled. This solution is not 100% sure to fix the issue in all cases but manually disabling the button is creating the issue we can observe in those runbots. There is a good chance it might work. fixes-runbot-231582 fixes-runbot-233049 closes #227484 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit tries to solve runbot issues with mail html fields widget. It seems clicking on the save button manually is not generating a call to the backend. This could be due to the fact the button is not enabled due to the data being invalid. Therefore using the clickSave util could be useful in those situation since waiting that the button becomes enabled. This solution is not 100% sure to fix the issue in all cases but manually disabling the button is creating the issue we can observe in those runbots. There is a good chance it might work. fixes-runbot-231582 fixes-runbot-233049 closes odoo/odoo#227484 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit tries to solve runbot issues with mail html fields widget. It seems clicking on the save button manually is not generating a call to the backend. This could be due to the fact the button is not enabled due to the data being invalid. Therefore using the clickSave util could be useful in those situation since waiting that the button becomes enabled. This solution is not 100% sure to fix the issue in all cases but manually disabling the button is creating the issue we can observe in those runbots. There is a good chance it might work. fixes-runbot-231582 fixes-runbot-233049 closes odoo#227484 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit tries to solve runbot issues with mail html fields widget. It seems clicking on the save button manually is not generating a call to the backend. This could be due to the fact the button is not enabled due to the data being invalid. Therefore using the clickSave util could be useful in those situation since waiting that the button becomes enabled. This solution is not 100% sure to fix the issue in all cases but manually disabling the button is creating the issue we can observe in those runbots. There is a good chance it might work. fixes-runbot-231582 fixes-runbot-233049 closes odoo#227484 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>


This commit tries to solve runbot issues with mail html fields widget.
It seems clicking on the save button manually is not generating a call
to the backend. This could be due to the fact the button is not enabled
due to the data being invalid. Therefore using the clickSave util could
be useful in those situation since waiting that the button becomes
enabled.
This solution is not 100% sure to fix the issue in all cases but
manually disabling the button is creating the issue we can observe in
those runbots. There is a good chance it might work.
fixes-runbot-231582
fixes-runbot-233049
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr