add component using layout with working unit test