Fix integration tests.

* Need to collect all buttons before clicking any, stream operations are not guaranteed to be executed sequentially.