Thanks for the reply. I'd rather not touch the actual plugin though just to make it testable
What I managed to get working is
- Split the test in different steps (create document, draw plugin art, save document)
- Between each step reinvoke the menu command that starts the test and by maintaining a state loop through the different test steps
- In between I added a wait step, which executes
Not sure which of the three statements did the trick, and/or whether it is just by going through the menu reinvocation that makes everything work, but this way the test now runs ok. I have not a clue though how "stable" this "hack/solution" is.