From 738463be8ce6384b659b3f0728ebfc4e41c2f6ed Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Mon, 19 Sep 2022 08:47:46 -0300 Subject: [PATCH] Wait for background javascript after SAML 2.0 Logout --- .../src/integTest/java/example/Saml2JavaConfigurationITests.java | 1 + .../src/integTest/java/example/Saml2LoginApplicationITests.java | 1 + .../src/integTest/java/example/Saml2LoginApplicationITests.java | 1 + .../login-logout/src/integTest/java/example/Saml2XmlITests.java | 1 + 4 files changed, 4 insertions(+) diff --git a/servlet/java-configuration/saml2/login/src/integTest/java/example/Saml2JavaConfigurationITests.java b/servlet/java-configuration/saml2/login/src/integTest/java/example/Saml2JavaConfigurationITests.java index 4a7e9b9..f22721a 100644 --- a/servlet/java-configuration/saml2/login/src/integTest/java/example/Saml2JavaConfigurationITests.java +++ b/servlet/java-configuration/saml2/login/src/integTest/java/example/Saml2JavaConfigurationITests.java @@ -81,6 +81,7 @@ public class Saml2JavaConfigurationITests { HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage(); HtmlElement rpLogoutButton = home.getHtmlElementById("rp_logout_button"); HtmlPage loginPage = rpLogoutButton.click(); + this.webClient.waitForBackgroundJavaScript(10000); assertThat(loginPage.getUrl().getFile()).isEqualTo("/login?logout"); } diff --git a/servlet/spring-boot/java/saml2/login-single-tenant/src/integTest/java/example/Saml2LoginApplicationITests.java b/servlet/spring-boot/java/saml2/login-single-tenant/src/integTest/java/example/Saml2LoginApplicationITests.java index cc6b7ae..0ddf4d0 100644 --- a/servlet/spring-boot/java/saml2/login-single-tenant/src/integTest/java/example/Saml2LoginApplicationITests.java +++ b/servlet/spring-boot/java/saml2/login-single-tenant/src/integTest/java/example/Saml2LoginApplicationITests.java @@ -62,6 +62,7 @@ public class Saml2LoginApplicationITests { HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage(); HtmlElement rpLogoutButton = home.getHtmlElementById("rp_logout_button"); HtmlPage loginPage = rpLogoutButton.click(); + this.webClient.waitForBackgroundJavaScript(10000); assertThat(loginPage.getUrl().getFile()).isEqualTo("/login?logout"); } diff --git a/servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java b/servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java index cc6b7ae..0ddf4d0 100644 --- a/servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java +++ b/servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java @@ -62,6 +62,7 @@ public class Saml2LoginApplicationITests { HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage(); HtmlElement rpLogoutButton = home.getHtmlElementById("rp_logout_button"); HtmlPage loginPage = rpLogoutButton.click(); + this.webClient.waitForBackgroundJavaScript(10000); assertThat(loginPage.getUrl().getFile()).isEqualTo("/login?logout"); } diff --git a/servlet/xml/java/saml2/login-logout/src/integTest/java/example/Saml2XmlITests.java b/servlet/xml/java/saml2/login-logout/src/integTest/java/example/Saml2XmlITests.java index 119f327..3331f54 100644 --- a/servlet/xml/java/saml2/login-logout/src/integTest/java/example/Saml2XmlITests.java +++ b/servlet/xml/java/saml2/login-logout/src/integTest/java/example/Saml2XmlITests.java @@ -79,6 +79,7 @@ public class Saml2XmlITests { HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage(); HtmlElement rpLogoutButton = home.getHtmlElementById("rp_logout_button"); HtmlPage loginPage = rpLogoutButton.click(); + this.webClient.waitForBackgroundJavaScript(10000); assertThat(loginPage.getUrl().getFile()).isEqualTo("/login?logout"); }