I'm a software engineer with over 15 years of experience developing web and mobile applications. Follow my blog, and follow me on Pluralsight https://www.pluralsight.com/authors/marques-woodson
I'm a software engineer with over 15 years of experience developing web and mobile applications. Follow my blog, and follow me on Pluralsight https://www.pluralsight.com/authors/marques-woodson
I'm a software engineer with over 15 years of experience developing web and mobile applications. Follow my blog, and follow me on Pluralsight https://www.pluralsight.com/authors/marques-woodson
fixture("A fixture this is").page("http://localhost:3002");test("this is a test",asynct=>{constheader=ReactSelector("Header").withProps({name:"marques"});conststuff=awaitheader.getReact();console.log(stuff);});
outputs:
$ testcafe chrome:headless test.ts
Running tests in:
- HeadlessChrome 74.0.3729 / Mac OS X 10.14.5
A fixture this is
{ state: {}, props: { name: 'marques' }, key: null }
✓ this is a test
I'm a software engineer with over 15 years of experience developing web and mobile applications. Follow my blog, and follow me on Pluralsight https://www.pluralsight.com/authors/marques-woodson
Where are you doing the
console.log
? In the React component, or in your test?no, it is within the TestCafe fixture/test
doubleArrowLeft.getReact()
returns a promise. So try this:That didn't work....
Here's what I tested really quick:
outputs:
Try this out
Awesome, thanks for the help. So, I figured out my issue. I was trying to locate the selector by 'Key', which is NOT a property!
Aaah yea, you'd want to use
withKey
instead ofwithProps
. I'm glad you got it figured out :)