Closed peppelinux closed 3 weeks ago
Expanding the issue for the readers of the future, which might need some amount of context to understand where this issue emerged.
The current design of the cross device integration test has very limited capabilities regarding the behaviour of the javascript running in the QRcode page. In particular we need to verify the following minimumm requirements:
At the moment of writing this post, step (1) is done by parsing the html page scouting for the js variable which holds the status endpoint (which is plain dirty); step (2) is not done at all.
playwrite seems to be better https://github.com/microsoft/playwright-python
playwrite seems to be better https://github.com/microsoft/playwright-python
It appears that this approach is promising.
Will follow with a pull request when the test is compplete.
Note that some isssues already emerged. For example if I'm not mistaken this does not work
https://github.com/italia/eudi-wallet-it-python/blob/da470746de8ddf2f0839ec659e769af51d3b6b66/example/satosa/templates/qr_code.html#L141-L146
as href
is not a valid attribute for tag <button>
, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
we may use this library to test js execution
https://pypi.org/project/requests-html/