text: Title: [ENH] add tests for html repr in `BaseObject` descendants
  Body: We should add a test for html repr of all `BaseObject` descendants, in `TestAllObjects`.
  
  This was apparently not tested, see  #7043 