Note that wait(for:timeout:) will wait for a set of expectations, while waitForExpectations() is a syncing point because it will wait for all existing expectations before continuing or failing.
Xcode UI Tests Waiting For Expectations
Jun 29, 2017
Jun 29, 2017
Note that wait(for:timeout:) will wait for a set of expectations, while waitForExpectations() is a syncing point because it will wait for all existing expectations before continuing or failing.