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

Adding CIAM CUD integration tests #2737

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions tests/E2E Tests/WebAppUiTests/TestingWebAppLocally.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailPassword()
await ExecuteWebAppCallsGraphFlow(labResponse.User.Upn, labResponse.User.GetOrFetchPassword(), clientEnvVars, TraceFileClassName).ConfigureAwait(false);
}

[Fact]
[Theory]
[InlineData("https://MSIDLABCIAM6.ciamlogin.com")] //Non CIAM CUD authority
trwalke marked this conversation as resolved.
Show resolved Hide resolved
[InlineData("https://login.msidlabsciam.com/fe362aec-5d43-45d1-b730-9755e60dc3b9/v2.0/")] //CIAM CUD Authority
[SupportedOSPlatform("windows")]
public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailWithCiamPassword()
public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailWithCiamPassword(string authority)
{
var clientEnvVars = new Dictionary<string, string>
{
{"AzureAd__ClientId", "b244c86f-ed88-45bf-abda-6b37aa482c79"},
{"AzureAd__Authority", "https://MSIDLABCIAM6.ciamlogin.com"},
{"AzureAd__Authority", authority},
{"AzureAd__TenantId", ""},
{"AzureAd__Domain", ""}
};
Expand Down
10 changes: 6 additions & 4 deletions tests/E2E Tests/WebAppUiTests/WebAppCallsApiCallsGraphLocally.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,25 @@ public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailPasswordCreds
}
}

[Fact]
[Theory]
[InlineData("https://MSIDLABCIAM6.ciamlogin.com")] //Non CIAM CUD authority
[InlineData("https://login.msidlabsciam.com/fe362aec-5d43-45d1-b730-9755e60dc3b9/v2.0/")] //CIAM CUD Authority
[SupportedOSPlatform("windows")]
public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailPasswordCreds_CallsDownStreamApiWithCiam()
public async Task ChallengeUser_MicrosoftIdFlow_LocalApp_ValidEmailPasswordCreds_CallsDownStreamApiWithCiam(string authority)
{
// Setup web app and api environmental variables.
var serviceEnvVars = new Dictionary<string, string>
{
{"ASPNETCORE_ENVIRONMENT", "Development"},
{"AzureAd__ClientId", "634de702-3173-4a71-b336-a4fab786a479"},
{"AzureAd__Authority", "https://MSIDLABCIAM6.ciamlogin.com"},
{"AzureAd__Authority", authority},
{TC.KestrelEndpointEnvVar, TC.HttpStarColon + WebApiCiamPort}
};
var clientEnvVars = new Dictionary<string, string>
{
{"ASPNETCORE_ENVIRONMENT", "Development"},
{"AzureAd__ClientId", "b244c86f-ed88-45bf-abda-6b37aa482c79"},
{"AzureAd__Authority", "https://MSIDLABCIAM6.ciamlogin.com"},
{"AzureAd__Authority", authority},
{"DownstreamApi__Scopes__0", "api://634de702-3173-4a71-b336-a4fab786a479/.default"},
{TC.KestrelEndpointEnvVar, TC.HttpsStarColon + WebAppCiamPort}
};
Expand Down