<commit_before>package net.nemerosa.ontrack.acceptance.pages

import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement
import org.openqa.selenium.support.FindBy

import static net.nemerosa.ontrack.acceptance.GUITestClient.screenshot
import static net.nemerosa.ontrack.acceptance.GUITestClient.waitUntil

class HeaderPageComponent extends AbstractPageComponent {

    @FindBy(linkText = 'Sign in')
    WebElement signIn

    @FindBy(id = 'header-user-menu')
    WebElement userMenu

    HeaderPageComponent(WebDriver driver) {
        super(driver)
    }

    def login(String name, String password) {
        signIn.click()
        screenshot('login-displayed')

        def tName = driver.findElement(By.name('name'))
        tName.sendKeys name

        def tPassword = driver.findElement(By.name('password'))
        tPassword.sendKeys password

        screenshot('login-filled-in')

        // FIXME #46
        Thread.sleep 4000L

        // Logging
        trace "Login.name = ${tName.getAttribute('value')}"
        trace "Login.password (size) = ${tPassword.getAttribute('value').size()}"

        // Sign in OK
        def okButton = driver.findElement(By.className('btn-primary'))
        waitUntil { okButton.enabled }
        okButton.click()
    }
}
<commit_msg>#46 Removing pause<commit_after>package net.nemerosa.ontrack.acceptance.pages

import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement
import org.openqa.selenium.support.FindBy

import static net.nemerosa.ontrack.acceptance.GUITestClient.screenshot
import static net.nemerosa.ontrack.acceptance.GUITestClient.waitUntil

class HeaderPageComponent extends AbstractPageComponent {

    @FindBy(linkText = 'Sign in')
    WebElement signIn

    @FindBy(id = 'header-user-menu')
    WebElement userMenu

    HeaderPageComponent(WebDriver driver) {
        super(driver)
    }

    def login(String name, String password) {
        signIn.click()
        screenshot('login-displayed')

        def tName = driver.findElement(By.name('name'))
        tName.sendKeys name

        def tPassword = driver.findElement(By.name('password'))
        tPassword.sendKeys password

        screenshot('login-filled-in')

        // Logging
        trace "Login.name = ${tName.getAttribute('value')}"
        trace "Login.password (size) = ${tPassword.getAttribute('value').size()}"

        // Sign in OK
        def okButton = driver.findElement(By.className('btn-primary'))
        waitUntil { okButton.enabled }
        okButton.click()
    }
}

{'fraction_non_alphanumeric': 0.10944700460829493, 'fraction_numerical': 0.0030721966205837174, 'mean_word_length': 3.134920634920635, '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': '7397038', 'n_tokens_mistral': 793, 'n_tokens_neox': 770, 'n_words': 140}