Adapting of ui tests and refactoring