commit
ec32acec27
1 changed files with 25 additions and 0 deletions
|
@ -35,6 +35,7 @@ import org.keycloak.testsuite.auth.page.login.OAuthGrant;
|
||||||
import org.keycloak.testsuite.console.page.events.Config;
|
import org.keycloak.testsuite.console.page.events.Config;
|
||||||
import org.keycloak.testsuite.console.page.events.LoginEvents;
|
import org.keycloak.testsuite.console.page.events.LoginEvents;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
|
import org.openqa.selenium.TimeoutException;
|
||||||
import org.openqa.selenium.WebElement;
|
import org.openqa.selenium.WebElement;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -414,6 +415,30 @@ public abstract class AbstractJSConsoleExampleAdapterTest extends AbstractExampl
|
||||||
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~-40", timeSkew + 40 <= TIME_SKEW_TOLERANCE);
|
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~-40", timeSkew + 40 <= TIME_SKEW_TOLERANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KEYCLOAK-4179
|
||||||
|
@Test
|
||||||
|
public void testOneSecondTimeSkewTokenUpdate() {
|
||||||
|
setTimeOffset(1);
|
||||||
|
|
||||||
|
logInAndInit("standard");
|
||||||
|
|
||||||
|
jsConsoleTestAppPage.refreshToken();
|
||||||
|
|
||||||
|
waitUntilElement(jsConsoleTestAppPage.getEventsElement()).text().contains("Auth Refresh Success");
|
||||||
|
waitUntilElement(jsConsoleTestAppPage.getOutputElement()).text().not().contains("Failed to refresh token");
|
||||||
|
|
||||||
|
try {
|
||||||
|
// The events element should contain "Auth logout" but we need to wait for it
|
||||||
|
// and text().not().contains() doesn't wait. With KEYCLOAK-4179 it took some time for "Auth Logout" to be present
|
||||||
|
waitUntilElement(jsConsoleTestAppPage.getEventsElement()).text().contains("Auth Logout");
|
||||||
|
|
||||||
|
throw new RuntimeException("The events element shouldn't contain \"Auth Logout\" text");
|
||||||
|
} catch (TimeoutException e) {
|
||||||
|
// OK
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLocationHeaderInResponse() {
|
public void testLocationHeaderInResponse() {
|
||||||
logInAndInit("standard");
|
logInAndInit("standard");
|
||||||
|
|
Loading…
Reference in a new issue