How to create ui tests for custom widgets?

See Panel app UI test --headed - connecting to remote server - #3 by Marc