Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using request-html for Cross Device flow within the integration test #265

Open
peppelinux opened this issue Sep 6, 2024 · 3 comments
Open
Labels
enhancement Something improving existing features
Milestone

Comments

@peppelinux
Copy link
Member

we may use this library to test js execution

https://pypi.org/project/requests-html/

@peppelinux peppelinux added the enhancement Something improving existing features label Sep 6, 2024
@peppelinux
Copy link
Member Author

@peppelinux peppelinux added this to the 0.9.1 milestone Sep 6, 2024
@Zicchio
Copy link
Collaborator

Zicchio commented Sep 6, 2024

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:

  1. the status endpoint (invoked by by a polling js) yields the correct status code across the different authentication steps;
  2. after the authentication flow is completed, the page must be updated to display a button which leads the user to the redirect uri

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.

@peppelinux
Copy link
Member Author

playwrite seems to be better
https://github.com/microsoft/playwright-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something improving existing features
Projects
None yet
Development

No branches or pull requests

2 participants