package org.protobeans.mvcsecurity.example.controller;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.protobeans.mvcsecurity.example.Main;
import org.protobeans.testcontainers.mysql.annotation.EnablePerconaContainer;
import org.protobeans.testcontainers.mysql.listener.PerconaContainerListener;
import org.protobeans.testcontainers.selenium.annotation.EnableSeleniumContainer;
import org.protobeans.testcontainers.selenium.annotation.WebDriver;
import org.protobeans.testcontainers.selenium.listener.SeleniumContainerListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.TestExecutionListeners.MergeMode;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@ContextConfiguration(classes=Main.class)
@EnableSeleniumContainer(dockerHostSshKeyPath = "~/docker_host.ppk")
@EnablePerconaContainer(imageTag = "5.7.16.28", schema = "test_db", rootPassword = "testpass", exposeSchemaAs = "dbSchema", exposeUrlAs = "dbUrl", exposePasswordAs = "dbPassword")
@TestExecutionListeners(value = {SeleniumContainerListener.class, PerconaContainerListener.class}, mergeMode = MergeMode.MERGE_WITH_DEFAULTS)
@DirtiesContext
@Ignore
public class SimpleSeleniumTest {
    @Value("${webUrl}")
    private String webUrl;
    
    @WebDriver
    private RemoteWebDriver webDriver;
    
    private final static String LOGIN_FORM_TITLE_ID = "loginFormTitle";
    
    @Test
    public void shouldWork() {
        webDriver.get(webUrl + "/signin");

        WebElement loginFormTitle = webDriver.findElement(By.id(LOGIN_FORM_TITLE_ID));
        Assert.assertEquals("LOGIN FORM", loginFormTitle.getText());

        webDriver.findElement(By.id("localeLinkRu")).click();
        
        WebDriverWait wait = new WebDriverWait(webDriver, 30);
        wait.until(ExpectedConditions.stalenessOf(loginFormTitle));
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(LOGIN_FORM_TITLE_ID)));
        
        loginFormTitle = webDriver.findElement(By.id(LOGIN_FORM_TITLE_ID));
        Assert.assertEquals("ФОРМА АВТОРИЗАЦИИ", loginFormTitle.getText());
    }
}

@@ -1956,16 +1956,35 @@
 ork() %7B%0A
+        int a = 5;%0A
         

Update SimpleSeleniumTest.java