19
Views
3
Comments
Solved
[Testing Framework] Is It Possible to Mock Extension Actions?
testing-framework
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Hi Leonardo,


At our company, we're actively adopting the Testing Framework, and it has been very helpful.


We're currently exploring whether it's possible to mock an action in an Extension module. 

Is this currently supported? If not, do you have any recommended workarounds?


Thanks in advance for your support!


Kind regards,

Yukinao

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Hi Yukinao. The latest version 5.1.1 introduces support for mocking extension actions.

Thank you.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Yukinao.

At the moment, it's not possible to mock an extension action. I think it will be simple to support it, though, so I will add that functionality in the future.

A workaround for the time being, is to wrap the extension action inside of a server action, and mock that server action instead.

UserImage.jpg
yukinao iwamoto

Hi Leonardo,

Thank you so much for the quick response, and for considering support for this in the future.


Thanks for suggesting the workaround.

For now, I’ll wrap the extension action in a server action only where it's urgently needed, and wait for the update for the rest.


I really appreciate your continued support and all the great work you’ve done on the Testing Framework.


Kind regards,  

Yukinao

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Hi Yukinao. The latest version 5.1.1 introduces support for mocking extension actions.

Thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.