react-adal icon indicating copy to clipboard operation
react-adal copied to clipboard

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

Open LoganArnett opened this issue 6 years ago • 2 comments

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

LoganArnett avatar Oct 08 '19 21:10 LoganArnett

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

salvoravida avatar Oct 09 '19 07:10 salvoravida

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

vudaysai avatar Nov 14 '19 09:11 vudaysai