[IMP] core: handling of the form tour checker
`DOM.querySelector` will generally return a `nodeId` of 0 when no node
is found, however there is a small window during which the document
can apparently get collected (?), which leads to an error
Could not find node with given id
which can break otherwise successful builds (cf 20832402 / staging
60731).
Handle errors from the pipeline as if the node had not been found,
though the matter was not fully investigated so it's possible this
explanation is incomplete or incorrect.
The CDTP documentation does not document the failure modes for either
`DOM.getDocument` or `DOM.querySelector`.
closes odoo/odoo#105734
X-original-commit: 5ef975f75cf8044e7dcd67f403ca11058630c85a
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
@@ -7,6 +7,7 @@ helpers and classes to write tests.
|
||||
import base64
|
||||
import collections
|
||||
import concurrent.futures
|
||||
import contextlib
|
||||
import difflib
|
||||
import functools
|
||||
import importlib
|
||||
@@ -1320,9 +1321,11 @@ class ChromeBrowser:
|
||||
)
|
||||
@qs.add_done_callback
|
||||
def _qs_result(fut):
|
||||
# stupid dumbass chrome returns a nodeid of 0 when nothing
|
||||
# is found
|
||||
if fut.result()['nodeId']:
|
||||
node_id = 0
|
||||
with contextlib.suppress(Exception):
|
||||
node_id = fut.result()['nodeId']
|
||||
|
||||
if node_id:
|
||||
self.take_screenshot("unsaved_form_")
|
||||
self._result.set_exception(ChromeBrowserException("""\
|
||||
Tour finished with an open form view in edition mode.
|
||||
|
||||
Reference in New Issue
Block a user