salvoravida / react-adal

Azure Active Directory Library (ADAL) support for ReactJS
MIT License
217 stars 53 forks source link

E2E Testing a create-react-app with react-adal setup #90

Open LoganArnett opened 5 years ago

LoganArnett commented 5 years ago

I am currently trying to setup End to End testing for a CRA with typescript. I have react-adal in place and working as expected but I am not sure of the best way to handle the basic login in order for the tests to run through the application. Would it make more sense to conditionally wrap the app with react-adal anytime the environment is not test and to remove that wrapper when testing and perform the login via an API request? I am trying to find a good solution but so far I have had no luck

salvoravida commented 5 years ago

@LoganArnett if you use Cypress can have a look here https://github.com/cypress-io/cypress/issues/1342

vudaysai commented 4 years ago

Any luck, in implementing tests? I'm also facing issue while trying to implement tests using jest and react-testing-library