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

Integration Tests to Cover Patch Requests related to Trusted Apps #21000

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -162,6 +162,35 @@ public void testUpdateAdvancedConfiguration() throws Exception {
equalTo("sample.app.id"));
}

@Test(description = "Test updating values in the application's general section " +
"does not clear values in trusted app configurations",
dependsOnMethods = "testUpdateAdvancedConfiguration")
public void testUpdateApplicationWithTrustedAppConfigs() throws Exception {

// Update the application with new values for app name
JSONObject updateRequest = new JSONObject();
updateRequest.put("name", UPDATED_APP_NAME);

String path = APPLICATION_MANAGEMENT_API_BASE_PATH + "/" + appId;
getResponseOfPatch(path, updateRequest.toString()).then()
.assertThat()
.statusCode(HttpStatus.SC_OK);

// Verify that the trusted app configurations are still available.
getApplication(appId).then()
.body("name", equalTo(UPDATED_APP_NAME))
.body("advancedConfigurations.trustedAppConfiguration.find{ it.key == 'isFIDOTrustedApp' }.value",
equalTo(true))
.body("advancedConfigurations.trustedAppConfiguration.find{ it.key == 'isConsentGranted' }.value",
equalTo(true))
.body("advancedConfigurations.trustedAppConfiguration.find{ it.key == 'androidPackageName' }.value",
equalTo("sample.package.name"))
.body("advancedConfigurations.trustedAppConfiguration.find{ it.key == 'androidThumbprints' }.value",
Matchers.hasItem("sampleThumbprint"))
.body("advancedConfigurations.trustedAppConfiguration.find{ it.key == 'appleAppId' }.value",
equalTo("sample.app.id"));
}

@Test(description = "Test updating the claim configuration of an application",
dependsOnMethods = "testUpdateAdvancedConfiguration")
public void testUpdateClaimConfiguration() throws Exception {
Expand Down