We are building a marketplace app, we are in the final stage of publishing the app to the marketplace. But we are unable to get coverage over 80%. We found few files where we are unable to get past 30%.
The files are separate modals, each modal consists of 2-3 flow, so all of the code won’t be executed on one flow. So we tried all the flows separately in all the modals, but every time we execute one flow, the previous flows coverage is getting lost.
So what we think is, whenever the modal is getting opened it is coming to the call stack and destroyed on modal close. So the coverage is being reset whenever the modal is opened.
Could you show us the coverage report and the test coverage for those mentioned modals?
Also, the code snippet for those modals which cannot be covered without being reset will be able to help us understand the issue better.
[Please hide/remove any sensitive information for the account and business logic]
Freshworks CLI (FDK) lazily writes the code coverage which could take time to stay within the page context to get the code coverage for an execution. If the modal is closed by the code and the specific scope is not covered, your guess could be the reason.
If anyone else faces a similar issue, please report it in this thread so that we could try reproducing it to fix it for you. If possible, try to get that uncovered code within the 20% buffer for the app submission requirement or get it touch with our team via the dev-assist portal.