17:42 PM
pristine___
Mr_Monkey: iconHover is a prop of RecommendationControl.tsx. I want to check if from RecommendationCard.tsx, the component RecommendationControl.tsx is called with correct values.
2020-11-26 33137, 2020
17:42 PM
pristine___
2020-11-26 33151, 2020
17:43 PM
pristine___
something like this maybe
2020-11-26 33152, 2020
17:43 PM
pristine___
2020-11-26 33118, 2020
17:45 PM
MRiddickW joined the channel
2020-11-26 33139, 2020
17:45 PM
Mr_Monkey
Looks like this line gives us a clue as to how to target the RecommendationControl components:
2020-11-26 33139, 2020
17:45 PM
Mr_Monkey
`shallow(<Parent {...props}/>).find(Child);`
2020-11-26 33138, 2020
17:46 PM
Mr_Monkey
In our case, i suppose it's going to be something like `wrapper..find(RecommendationControl)` ?
2020-11-26 33138, 2020
17:46 PM
Mr_Monkey
I'm not super proficient with enzyme, so I'd suggest having a look at the docs for that.
2020-11-26 33159, 2020
17:47 PM
Mr_Monkey
2020-11-26 33147, 2020
17:49 PM
Mr_Monkey
It should return an array of `RecommendationControl` components, I'll assume in the order they appear in the page. You can check that you have the length equal to how many components you're expecting, and then target each one by index and check its props
2020-11-26 33127, 2020
17:50 PM
Mr_Monkey
`expect(recommendationControlComponents[0].props.iconHover).toEqual(faAngry)` ?
2020-11-26 33138, 2020
17:58 PM
MRiddickW has left the channel
2020-11-26 33158, 2020
18:13 PM
Mr_Monkey
Does that answer your query pristine___ ?
2020-11-26 33143, 2020
18:15 PM
pristine___
Mr_Monkey: Yes, thank you :)
2020-11-26 33152, 2020
18:15 PM
Mr_Monkey
Cool :)
2020-11-26 33107, 2020
18:16 PM
Mr_Monkey , signing off.
2020-11-26 33129, 2020
20:16 PM
MajorLur_ joined the channel
2020-11-26 33129, 2020
20:16 PM
MajorLur_ is now known as MajorLurker_
2020-11-26 33124, 2020
20:21 PM
MajorLurker_ has quit
2020-11-26 33134, 2020
20:56 PM
dseomn_ joined the channel
2020-11-26 33155, 2020
21:13 PM
dseomn_ has quit
2020-11-26 33153, 2020
21:14 PM
dseomn_ joined the channel
2020-11-26 33130, 2020
21:16 PM
dseomn_ has quit
2020-11-26 33145, 2020
21:24 PM
dseomn_ joined the channel
2020-11-26 33106, 2020
21:27 PM
dseomn_ has quit
2020-11-26 33100, 2020
21:28 PM
dseomn_ joined the channel
2020-11-26 33114, 2020
21:36 PM
dseomn- joined the channel
2020-11-26 33137, 2020
21:38 PM
dseomn_ has quit
2020-11-26 33155, 2020
21:41 PM
v6lur joined the channel
2020-11-26 33133, 2020
21:46 PM
dseomn_ joined the channel
2020-11-26 33138, 2020
21:49 PM
dseomn- has quit
2020-11-26 33157, 2020
22:06 PM
d4rkie joined the channel
2020-11-26 33102, 2020
22:09 PM
Nyanko-sensei has quit
2020-11-26 33105, 2020
22:10 PM
v6lur has quit
2020-11-26 33152, 2020
22:17 PM
MajorLur_ joined the channel
2020-11-26 33113, 2020
22:22 PM
MajorLur_ has quit
2020-11-26 33152, 2020
23:26 PM
v6lur joined the channel