<commit_before>package com.autonomy.abc.selenium.page.admin;

import com.autonomy.abc.selenium.element.FormInput;
import com.autonomy.abc.selenium.users.HSOUser;
import com.autonomy.abc.selenium.users.Role;
import com.autonomy.abc.selenium.users.Status;
import com.hp.autonomy.frontend.selenium.element.ModalView;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class HSOUsersPage extends UsersPage {
    public HSOUsersPage(WebDriver driver) {
        super(driver);
        waitForLoad();
    }

    public FormInput getUsernameInput(){
        return new FormInput(getDriver().findElement(By.id("create-users-username")), getDriver());
    }

    public FormInput getEmailInput(){
        return new FormInput(getDriver().findElement(By.className("create-user-email-input")), getDriver());
    }

    public WebElement getUserLevelDropdown(){
        return getDriver().findElement(By.id("create-users-role"));
    }

    public void addEmail(String email) {
        getEmailInput().setValue(email);
    }

    public WebElement refreshButton() {
        return findElement(By.id("refresh-users"));
    }

    public WebElement getUserRow(HSOUser user){
        return findElement(By.xpath("//*[contains(@class,'user-email') and text()='" + user.getEmail() + "']/.."));
    }

    public Status getStatusOf(HSOUser user) {
        return Status.fromString(getUserRow(user).findElement(By.className("account-status")).getText());
    }

    public Role getRoleOf(HSOUser user) {
        return Role.fromString(roleLinkFor(user).getText());
    }

    public WebElement roleLinkFor(HSOUser user){
        return getUserRow(user).findElement(By.cssSelector(".user-role a"));
    }

    public void selectRoleFor(HSOUser user, Role newRole) {
        getUserRow(user).findElement(By.xpath(".//option[contains(text(),'"+newRole+"')]")).click();
    }

    public void submitPendingEditFor(HSOUser user) {<commit_msg>Change HSOUser to User in HSOUsersPage so it overrides methods in the superclass<commit_after>package com.autonomy.abc.selenium.page.admin;

import com.autonomy.abc.selenium.element.FormInput;
import com.autonomy.abc.selenium.users.HSOUser;
import com.autonomy.abc.selenium.users.Role;
import com.autonomy.abc.selenium.users.Status;
import com.autonomy.abc.selenium.users.User;
import com.hp.autonomy.frontend.selenium.element.ModalView;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class HSOUsersPage extends UsersPage {
    public HSOUsersPage(WebDriver driver) {
        super(driver);
        waitForLoad();
    }

    public FormInput getUsernameInput(){
        return new FormInput(getDriver().findElement(By.id("create-users-username")), getDriver());
    }

    public FormInput getEmailInput(){
        return new FormInput(getDriver().findElement(By.className("create-user-email-input")), getDriver());
    }

    public WebElement getUserLevelDropdown(){
        return getDriver().findElement(By.id("create-users-role"));
    }

    public void addEmail(String email) {
        getEmailInput().setValue(email);
    }

    public WebElement refreshButton() {
        return findElement(By.id("refresh-users"));
    }

    public WebElement getUserRow(User user){
        return findElement(By.xpath("//*[contains(@class,'user-email') and text()='" + ((HSOUser) user).getEmail() + "']/.."));
    }

    public Status getStatusOf(User user) {
        return Status.fromString(getUserRow(user).findElement(By.className("account-status")).getText());
    }

    public Role getRoleOf(User user) {
        return Role.fromString(roleLinkFor(user).getText());
    }

    public WebElement roleLinkFor(User user){
        return getUserRow(user).findElement(By.cssSelector(".user-role a"));
    }

    public void selectRoleFor(User user, Role newRole) {
        getUserRow(user).findElement(By.xpath(".//option[contains(text(),'"+newRole+"')]")).click();
    }

    public void submitPendingEditFor(User user) {
{'fraction_non_alphanumeric': 0.13857493857493858, 'fraction_numerical': 0.0, 'mean_word_length': 3.970695970695971, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3230644', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1227, 'n_words': 207}