Add unit test for widget editor