Fix "Verify that the active book TOC widget works fine" test

Relate to issue #1696 
This is a sandbox PR.