Refactor UI tests to be simpler