Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SelfSignUpConsentTest with Tenanted Callback Endpoint and Assertion Adjustments #22154

Merged
merged 2 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public class SelfSignUpConsentTest extends ISIntegrationTest {

public static final String CONSNT_ENDPOINT_SUFFIX = "/api/identity/consent-mgt/v1.0/consents";
public static final String USER_RECOVERY_ME_ENDPOINT = "/api/identity/user/v1.0/me";
private static final String CALLBACK_ENDPOINT = "https://localhost:9443/carbon/callback";
private static final String CALLBACK_ENDPOINT = "https://localhost:9853/carbon/callback";
private static final String TENANTED_CALLBACK_ENDPOINT = "https://localhost:9853/t/wso2.com/carbon/callback";
Comment on lines +68 to +69
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use port and secondary domain name from already available constants. You can add a new PR with this suggestion.

Copy link
Contributor

@DilshanSenarath DilshanSenarath Jan 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use getTenantQualifiedURL (Link) and getBaseURL (Link) methods as helpers here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed using #22158

private static final String COUNTRY_WSO2_CLAIM = "http://wso2.org/claims/country";
private static final String CALLBACK_QUERY_PARAM = "callback";
private static final String USERNAME_QUERY_PARAM = "username";
Expand Down Expand Up @@ -147,7 +148,7 @@ public void testInitialSelfSignUpPage() throws IOException {
Assert.assertNotNull(content);
Assert.assertTrue(content.contains("Enter your username"), "Page for entering username is not prompted while" +
" self registering");
Assert.assertTrue(content.contains(CALLBACK_ENDPOINT), "Callback endpoint is not available in self " +
Assert.assertTrue(content.contains(TENANTED_CALLBACK_ENDPOINT), "Callback endpoint is not available in self " +
"registration username input page.");
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,7 @@
<!-- Identity Portal Versions -->
<identity.apps.console.version>2.36.0</identity.apps.console.version>
<identity.apps.myaccount.version>2.13.41</identity.apps.myaccount.version>
<identity.apps.core.version>2.8.8</identity.apps.core.version>
<identity.apps.core.version>2.8.11</identity.apps.core.version>
<identity.apps.tests.version>1.6.378</identity.apps.tests.version>

<!-- Charon -->
Expand Down