-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1485 from sberyozkin/fix_oidc_code_flow_tests
Fix OIDC web authentication and multi-tenancy quickstarts
- Loading branch information
Showing
6 changed files
with
30 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ | |
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.gargoylesoftware.htmlunit.SilentCssErrorHandler; | ||
import com.gargoylesoftware.htmlunit.WebClient; | ||
import com.gargoylesoftware.htmlunit.html.HtmlForm; | ||
import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||
import org.htmlunit.SilentCssErrorHandler; | ||
import org.htmlunit.WebClient; | ||
import org.htmlunit.html.HtmlForm; | ||
import org.htmlunit.html.HtmlPage; | ||
|
||
import io.quarkus.test.junit.QuarkusTest; | ||
import io.quarkus.test.keycloak.client.KeycloakTestClient; | ||
|
@@ -34,9 +34,9 @@ public void testLogInDefaultTenant() throws IOException { | |
loginForm.getInputByName("username").setValueAttribute("alice"); | ||
loginForm.getInputByName("password").setValueAttribute("alice"); | ||
|
||
page = loginForm.getInputByName("login").click(); | ||
page = loginForm.getButtonByName("login").click(); | ||
|
||
assertTrue(page.asText().contains("tenant")); | ||
assertTrue(page.asNormalizedText().contains("tenant")); | ||
|
||
webClient.getCookieManager().clearCookies(); | ||
} | ||
|
@@ -54,9 +54,9 @@ public void testLogInTenantAWebApp() throws IOException { | |
loginForm.getInputByName("username").setValueAttribute("alice"); | ||
loginForm.getInputByName("password").setValueAttribute("alice"); | ||
|
||
page = loginForm.getInputByName("login").click(); | ||
page = loginForm.getButtonByName("login").click(); | ||
|
||
assertTrue(page.asText().contains("[email protected]")); | ||
assertTrue(page.asNormalizedText().contains("[email protected]")); | ||
webClient.getCookieManager().clearCookies(); | ||
} | ||
} | ||
|
@@ -83,9 +83,9 @@ public void testReAuthenticateWhenSwitchingTenants() throws IOException { | |
loginForm.getInputByName("username").setValueAttribute("alice"); | ||
loginForm.getInputByName("password").setValueAttribute("alice"); | ||
|
||
page = loginForm.getInputByName("login").click(); | ||
page = loginForm.getButtonByName("login").click(); | ||
|
||
assertTrue(page.asText().contains("[email protected]")); | ||
assertTrue(page.asNormalizedText().contains("[email protected]")); | ||
|
||
page = webClient.getPage("http://localhost:8081/default"); | ||
|
||
|
@@ -96,9 +96,9 @@ public void testReAuthenticateWhenSwitchingTenants() throws IOException { | |
loginForm.getInputByName("username").setValueAttribute("alice"); | ||
loginForm.getInputByName("password").setValueAttribute("alice"); | ||
|
||
page = loginForm.getInputByName("login").click(); | ||
page = loginForm.getButtonByName("login").click(); | ||
|
||
assertTrue(page.asText().contains("[email protected]")); | ||
assertTrue(page.asNormalizedText().contains("[email protected]")); | ||
|
||
webClient.getCookieManager().clearCookies(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters