Since commit [1], we have added the "Rerun in debug" in QUnit.
This link forces a specific test to be run in debug mode.
This link doesn't work some time as it runs another test.
This commit fixes that by using the `testId` parameter to set the id of
the test like QUnit does, and we add `debugTest` to force the
`Debug Mode`.
Step to reproduce:
* Go to the QUnit test suite
* Wait to have some tests passed
* Uncheck `Hide passed tests`
* Select a `Rerun` on a valid test
e.g. URL: `/web/tests/?testId=cb868a47`
* Click on "Rerun in debug"
e.g. URL: `/web/tests/?testId=cb868a47&debugTestId=cb868a47`
* Delete from URL `testId=X` (where `X` = hash of the test)
e.g. URL: `/web/tests/?debugTestId=cb868a47`
* BUG => The tested test will not be the selected one.
e.g. in our case, it is MockServer: performRPC (037b6d96)
Note
Small table of tests:
| Hash | Test Module | Test Name |
| -------- | ------------------- | ----------------------------------------- |
| cb868a47 | utils > makeContext | evaluate strings |
| 037b6d96 | MockServer | performRPC: search with active_test=false |
Also, a minor fix, using URL constructor and adding search parameter
through `searchParams.set()` to avoid the missing `?` in some cases.
The url `http://127.0.0.1:8069/web/tests/mobile` works but not
`http://127.0.0.1:8069/web/tests/mobile&testId=0e3481e3&debugTest=true`
as there is no search in the first URL when we click to "Rerun in debug"
it adds `&testId=0e3481e3&debugTest=true` but now it's a new page and
not the QUnit mobile suite.
[1]: odoo/odoo@b7ce395a47closesodoo/odoo#124882
X-original-commit: ee791847caa91e3c98fa4ca47b1cc18f29b37c13
Signed-off-by: Pierre Paridans (app) <app@odoo.com>