Closed FrancisMawn closed 3 years ago
Hi there 👋
Sorry for the late reply and thank you for raising this issue because it was indeed a bug (both on the code and on the documentation).
I've fixed both of them and I should create a release later today. Once the released is tagged you should be able to use assertPushed
on actions that use the ShouldBeUnique
interface. 🙂
Released as v2.1.4
. 🚀
Hi there,
I could not make my test assert that my action was pushed. I followed the documentation and I think I wrote everything fine, but for some reasons, when my action implements the
ShouldBeUnique
interface, my test would never assert that my job got pushed.After a lot of troubleshooting, I ended up removing the
ShouldBeUnique
interface the test passed from there. I did define agetJobUniqueId()
method and a$jobUniqueFor
property on my action class. Maybe I am missing something?On that note, I think the documentation is misleading. From the doc:
Here the
getJobUniqueId()
method receives an instance of$team
but the actual implementation references a property on the class. Should it rather be:I say that because when I tried to reference the actual class property (like documented here), it would throw a "Typed property must not be accessed before initialization" exception.