7 Replies
Starting a new thread here, regarding your question
So I don't have a ton of experience testing infolists but I've explored it previously by reaching into the component instance in the test. Something like this:
I guess in your case you could instead access the action object, run the action, and make your assertion in the DB
Something to experiment
I already saw your answer to other post, trying to do exactly that but couldn't access the action as it's too nested and the it all very cyclical
Hmm. Is it important that the action be in the infolist for the test? Can you extract just this action in your codebase, and then simplify your test around the action class?
that's a good idea but the action is one-off so kinda hesitant to extract that to a separate class but if I can't find any other way then probably do this. Thanks for the suggestion
ok did this according to your suggestion -> access the action object, run the action, and make your assertion in the DB
Awesome. How did you get around your cyclical issues?
retrieved the action using name
i came up with something like this
if you add a section you might need to add another
->getChildComponents()[0]
after the first one