test refactoring + selenium tests