Add promise to ensure unit visibility is changed
Merge pull request #4422 from edx/ammar/fix-handout-tests

Add promise to ensure unit visibility is changed