Update common UI infrastucture to point to ID4SLAB2, Fixes AB#3525444#2907
Update common UI infrastucture to point to ID4SLAB2, Fixes AB#3525444#2907
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Pull request overview
This PR refactors lab test utilities to use a new static field LabClient.latestLabAccount for storing the most recently fetched/created lab account, replacing the previous pattern of using LabConfig.getCurrentLabConfig().getLabUserPassword(). It also adds support for new user account types (MAM_ON_SPO and CIAM) and includes test coverage for sovereign cloud accounts (US Government and China).
Changes:
- Replaced
LabConfig.getCurrentLabConfig()withLabClient.latestLabAccountfor accessing test account credentials - Added
MAM_ON_SPOandCIAMto UserType enum and LabConstants - Added
associatedClientIdfield to LabJsonStringAccountEntry for capturing client association from KeyVault JSON - Added tests for fetching US Government and China cloud accounts
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ResourceOwnerPasswordCredentialsTestStrategy.java | Removed LabConfig import and updated getPasswordForUser to use LabClient.latestLabAccount |
| LabClientTest.java | Added two new test methods canFetchUsGovAccount and canFetchChinaAccount to verify sovereign cloud account retrieval |
| UserType.java | Added MAM_ON_SPO and CIAM enum values |
| LabConstants.java | Added corresponding string constants MAM_ON_SPO and CIAM |
| LabJsonStringAccountEntry.java | Added associatedClientId field with Gson serialization annotation |
| LabClient.java | Added public static latestLabAccount field and updated three methods to populate it after creating/fetching accounts |
…entication-library-common-for-android into fadi/lab-migrate
|
✅ Work item link check complete. Description contains link AB#3525444 to an Azure Boards work item. |
|
❌ Work item link check failed. Description contains AB#3525444 but the Bot could not link it to an Azure Boards work item. Click here to learn more. |
#3035) …nding to AuthappLBAC and AuthappRichContext users / policies
|
@copilot please address the spotbugs issue i am running into in checks Command to run: \gradlew.bat LabApiUtilities:spotbugsMain |
…ient.java Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-common-for-android/sessions/c40557ab-d3c7-4132-9022-a2b27511b31f Co-authored-by: fadidurah <88730756+fadidurah@users.noreply.github.com>
Fixed in cb08f3b. The SpotBugs failure was caused by Changes made:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/rules/LoadLabUserTestRule.java:97
- The thrown
IllegalArgumentExceptionmessage is now inaccurate: it says only query/temp user type are null, but this rule also supportsjsonUserType. Update the message to reflect all supported inputs so failures are easier to diagnose.
Logger.i(TAG, "Loading Temp User for Test....");
mLabAccount = mLabClient.createTempAccount(tempUserType);
} else {
throw new IllegalArgumentException("Both Lab User query and temp user type were null.");
}
Updating our ui infrastructure to point to ID4SLAB2 resources
AB#3525444