Fix Quick Open integration test.

The problem was that the modal bar is sometimes not completely removed
from the DOM before the new modal bar is opened. This update specifically
checks that the modal bar has been closed.

This is a fix for #4199