Test scope helpers

Add tests to increase coverage and add check for modal visibility at start of show/hide methods