Refactor some tests to not use selenium