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

Add support for e2e testing with OAuth #888

Open
mraible opened this issue Sep 1, 2022 · 3 comments
Open

Add support for e2e testing with OAuth #888

mraible opened this issue Sep 1, 2022 · 3 comments
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/

Comments

@mraible
Copy link
Contributor

mraible commented Sep 1, 2022

Describe the bug

Not a bug per se, just a missing feature. In run-detox-tests.sh, there's this code:

# if oauth, only run the launch screen since you need to authenticate for entities
if [ "$JHI_AUTH_TYPE" = "oauth2" ] ; then
  rm -rf e2e/entities
fi

The entity tests don't support logging in with OIDC and are therefore unreachable. We should fix this.

Instructions To reproduce

Create a React Native app with oauth2 and detox. Then, run detox tests.

Versions (please complete the following information):

  • JHipster React Native Version: main branch
@mraible mraible added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/ labels Sep 1, 2022
This was referenced Jun 6, 2024
@irwansyahwii
Copy link

@mraible can I take this?

@mraible
Copy link
Contributor Author

mraible commented Jul 11, 2024

Yes

@irwansyahwii
Copy link

@mraible I just finished setting up my dev env and managed to run the generated app and Detox.
I am using RN generator from the main branch and for the backend I generated using nodejs generator.

I have several questions to ask:

  1. I can't find run-detox-tests.sh. Where can I find it?
  2. When I following the the generator wizard and specifying the backend location, the e2e tests generated doesn't contain any account related tests. But when I didn't specied the backend location it generated the account related tests. Which one should I choose?
  3. Do I just need to add more tests in the e2e test folder to test all the authentication functionalities of the app using OAuth as the backend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

No branches or pull requests

2 participants