From 610f4fb3e76ce687f76bd889a2af79e3fce07f8a Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 30 Sep 2025 14:28:14 -0400 Subject: [PATCH 1/6] adjust ltw tests --- common | 2 +- .../testpass/broker/ltw/TestCase2571345.java | 1 - .../testpass/broker/ltw/TestCase2571361.java | 1 - .../testpass/broker/ltw/TestCase2571508.java | 173 ------------------ 4 files changed, 1 insertion(+), 176 deletions(-) delete mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571508.java diff --git a/common b/common index 0a5a5e7e6..7d28c9b87 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 0a5a5e7e67f52ace577602ff7645bcc1918b55bf +Subproject commit 7d28c9b8738c5a82843643ebcb34602a7ee22679 diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java index e71e3e887..0ff2bfe75 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java @@ -51,7 +51,6 @@ // Samsung GA Coverage // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2571345 @LTWTests -@RunOnAPI29Minus @SupportedBrokers(brokers = {BrokerLTW.class}) @RetryOnFailure @RunWith(Parameterized.class) diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java index 4f9764b24..8f7f10929 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java @@ -52,7 +52,6 @@ // If Company Portal is installed after LTW, user should still get SSO // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2571361 @LTWTests -@RunOnAPI29Minus @RetryOnFailure @SupportedBrokers(brokers = {BrokerLTW.class}) @RunWith(Parameterized.class) diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571508.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571508.java deleted file mode 100644 index 364a978ca..000000000 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571508.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// All rights reserved. -// -// This code is licensed under the MIT License. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files(the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions : -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; - -import androidx.annotation.NonNull; - -import com.microsoft.identity.client.msal.automationapp.AbstractMsalUiTest; -import com.microsoft.identity.client.msal.automationapp.R; -import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; -import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RetryOnFailure; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; -import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; -import com.microsoft.identity.client.ui.automation.app.MsalTestApp; -import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; -import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; -import com.microsoft.identity.client.ui.automation.broker.BrokerMicrosoftAuthenticator; -import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; -import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; -import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; -import com.microsoft.identity.labapi.utilities.client.LabQuery; -import com.microsoft.identity.labapi.utilities.constants.TempUserType; -import com.microsoft.identity.labapi.utilities.constants.UserType; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; -import java.util.List; - -// If LTW without broker is installed, updated MSAL should still get SSO -// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2571508 -@LTWTests -@RunOnAPI29Minus -@RetryOnFailure -@SupportedBrokers(brokers = {BrokerMicrosoftAuthenticator.class}) -@RunWith(Parameterized.class) -public class TestCase2571508 extends AbstractMsalBrokerTest { - - private final UserType mUserType; - - public TestCase2571508(@NonNull UserType userType) { - mUserType = userType; - } - - @Parameterized.Parameters(name = "{0}") - public static List userType() { - return Arrays.asList( - UserType.MSA, - UserType.CLOUD - ); - } - - @Test - public void test_2571508_LTW_IfBrokerlessLTWInstalledMsalShouldHaveSSO() throws Throwable { - final String username = mLabAccount.getUsername(); - final String password = mLabAccount.getPassword(); - - // Install old LTW - final BrokerLTW brokerLTW = new BrokerLTW(BrokerLTW.OLD_BROKER_LTW_APK, BrokerLTW.BROKER_LTW_APK); - brokerLTW.install(); - - // AcquireToken interactively on OneAuthTestApp - final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); - oneAuthTestApp.install(); - oneAuthTestApp.launch(); - oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); - - final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() - .broker(mBroker) - .prompt(PromptParameter.LOGIN) - .loginHint(username) - .consentPageExpected(false) - .speedBumpExpected(false) - .sessionExpected(false) - .expectingBrokerAccountChooserActivity(false) - .expectingLoginPageAccountPicker(false) - .enrollPageExpected(false) - .build(); - // Click on sign in button, prompted to enter username and password - oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); - oneAuthTestApp.confirmAccount(username); - - // Install new MSALTestApp - final MsalTestApp msalTestApp = new MsalTestApp(); - msalTestApp.install(); - msalTestApp.launch(); - msalTestApp.handleFirstRunBasedOnUserType(mUserType); - - Assert.assertTrue(mBroker instanceof BrokerMicrosoftAuthenticator); - - final MicrosoftStsPromptHandlerParameters promptHandlerParametersMsal = MicrosoftStsPromptHandlerParameters.builder() - .prompt(PromptParameter.SELECT_ACCOUNT) - .loginHint(username) - .sessionExpected(false) - .broker(null) - .expectingBrokerAccountChooserActivity(false) - .expectingProvidedAccountInBroker(false) - .expectingLoginPageAccountPicker(false) - .expectingProvidedAccountInCookie(false) - .consentPageExpected(false) - .passwordPageExpected(false) - .speedBumpExpected(false) - .registerPageExpected(false) - .enrollPageExpected(false) - .staySignedInPageExpected(false) - .verifyYourIdentityPageExpected(false) - .howWouldYouLikeToSignInExpected(false) - .build(); - - // Add login hint as the username and Click on AcquireToken button - // NOT prompted for credentials. - msalTestApp.handleUserNameInput(username); - - // Click on "Get Active Broker Pkg Name" button - // return Authenticator app package name - final String activeBroker = msalTestApp.getActiveBrokerPackageName(); - Assert.assertEquals("Active broker pkg name : " + BrokerMicrosoftAuthenticator.AUTHENTICATOR_APP_PACKAGE_NAME, activeBroker); - msalTestApp.handleBackButton(); - - final String token = msalTestApp.acquireToken(username, password, promptHandlerParametersMsal, false); - Assert.assertNotNull(token); - } - - @Override - public LabQuery getLabQuery() { - return LabQuery.builder() - .userType(mUserType) - .build(); - } - - @Override - public TempUserType getTempUserType() { - return null; - } - - @Override - public String[] getScopes() { - return new String[]{"User.read"}; - } - - @Override - public String getAuthority() { - return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); - } - - @Override - public int getConfigFileResourceId() { - return R.raw.msal_config_default; - } -} From c79d82c968f467d88698f393c82594467696e5c6 Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 30 Sep 2025 23:03:25 -0400 Subject: [PATCH 2/6] delete old tests --- msal/build.gradle | 12 ++ .../testpass/broker/ltw/TestCase2571345.java | 164 --------------- .../testpass/broker/ltw/TestCase2572249.java | 1 - .../testpass/broker/ltw/TestCase2582290.java | 196 ------------------ .../testpass/broker/ltw/TestCase2582291.java | 193 ----------------- .../testpass/broker/ltw/TestCase2582292.java | 171 --------------- 6 files changed, 12 insertions(+), 725 deletions(-) delete mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java delete mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java delete mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java delete mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java diff --git a/msal/build.gradle b/msal/build.gradle index a68187e4d..48e23f670 100644 --- a/msal/build.gradle +++ b/msal/build.gradle @@ -25,6 +25,18 @@ codeCoverageReport { coverage.enabled = enableCodeCoverage } +// https://blog.gradle.org/gradle-flaky-test-retry-plugin +tasks.withType(Test) { + retry { + // The maximum number of test failures that are allowed before retrying is disabled. + maxRetries = 2 + // The maximum number of times to retry an individual test. + maxFailures = 10 + // Controls whether tests that initially fail and then pass on retry should fail the task. + failOnPassedAfterRetry = false + } +} + android { namespace "com.microsoft.identity.msal" compileOptions { diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java deleted file mode 100644 index 0ff2bfe75..000000000 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571345.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// All rights reserved. -// -// This code is licensed under the MIT License. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files(the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions : -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; - -import androidx.annotation.NonNull; - -import com.microsoft.identity.client.msal.automationapp.R; -import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; -import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RetryOnFailure; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; -import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; -import com.microsoft.identity.client.ui.automation.app.MsalTestApp; -import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; -import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; -import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; -import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; -import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; -import com.microsoft.identity.labapi.utilities.client.LabQuery; -import com.microsoft.identity.labapi.utilities.constants.TempUserType; -import com.microsoft.identity.labapi.utilities.constants.UserType; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; -import java.util.List; - -// Samsung GA Coverage -// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2571345 -@LTWTests -@SupportedBrokers(brokers = {BrokerLTW.class}) -@RetryOnFailure -@RunWith(Parameterized.class) -public class TestCase2571345 extends AbstractMsalBrokerTest { - - private final UserType mUserType; - - public TestCase2571345(@NonNull UserType userType) { - mUserType = userType; - } - - @Parameterized.Parameters(name = "{0}") - public static List userType() { - return Arrays.asList( - UserType.MSA, - UserType.CLOUD - ); - } - @Test - public void test_2571345_LTW_SamsungGACoverage() throws Throwable{ - final String username = mLabAccount.getUsername(); - final String password = mLabAccount.getPassword(); - - mBroker.install(); - - // Install new OneAuthTestApp - final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); - oneAuthTestApp.install(); - oneAuthTestApp.launch(); - oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); - - final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() - .broker(mBroker) - .prompt(PromptParameter.LOGIN) - .loginHint(username) - .consentPageExpected(false) - .speedBumpExpected(false) - .sessionExpected(false) - .expectingBrokerAccountChooserActivity(false) - .expectingLoginPageAccountPicker(false) - .enrollPageExpected(false) - .build(); - // Click on sign in button, prompted to enter username and password - oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); - oneAuthTestApp.confirmAccount(username); - - // Install new MsalTestApp - final MsalTestApp msalTestApp = new MsalTestApp(); - msalTestApp.install(); - msalTestApp.launch(); - msalTestApp.handleFirstRunBasedOnUserType(mUserType); - - final MicrosoftStsPromptHandlerParameters promptHandlerParametersMsal = MicrosoftStsPromptHandlerParameters.builder() - .prompt(PromptParameter.SELECT_ACCOUNT) - .loginHint(username) - .sessionExpected(false) - .broker(mBroker) - .expectingBrokerAccountChooserActivity(false) - .expectingProvidedAccountInBroker(false) - .expectingLoginPageAccountPicker(false) - .expectingProvidedAccountInCookie(false) - .consentPageExpected(false) - .passwordPageExpected(false) - .speedBumpExpected(false) - .registerPageExpected(false) - .enrollPageExpected(false) - .staySignedInPageExpected(false) - .verifyYourIdentityPageExpected(false) - .howWouldYouLikeToSignInExpected(false) - .build(); - - // Add login hint as the username and Click on AcquireToken button - // NOT prompted for credentials. - msalTestApp.handleUserNameInput(username); - final String token = msalTestApp.acquireToken(username, password, promptHandlerParametersMsal, false); - Assert.assertNotNull(token); - - // Click on "Get Active Broker Pkg Name" button - //The response msg should show LTW's pkg name - msalTestApp.handleBackButton(); - final String activeBroker = msalTestApp.getActiveBrokerPackageName(); - Assert.assertEquals("Active broker pkg name : " + BrokerLTW.BROKER_LTW_APP_PACKAGE_NAME, activeBroker); - } - - @Override - public LabQuery getLabQuery() { - return LabQuery.builder() - .userType(mUserType) - .build(); - } - - @Override - public TempUserType getTempUserType() { - return null; - } - - @Override - public String[] getScopes() { - return new String[]{"User.read"}; - } - - @Override - public String getAuthority() { - return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); - } - - @Override - public int getConfigFileResourceId() { - return R.raw.msal_config_default; - } -} diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java index 67e9fbff7..ad7701842 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java @@ -51,7 +51,6 @@ // Updated LTW, Updated Auth app and uninstall LTW // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2572249 @LTWTests -@RunOnAPI29Minus @SupportedBrokers(brokers = {BrokerLTW.class}) @RunWith(Parameterized.class) public class TestCase2572249 extends AbstractMsalBrokerTest { diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java deleted file mode 100644 index 7b1b299d4..000000000 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// All rights reserved. -// -// This code is licensed under the MIT License. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files(the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions : -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; - -import androidx.annotation.NonNull; - -import com.microsoft.identity.client.msal.automationapp.R; -import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; -import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; -import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; -import com.microsoft.identity.client.ui.automation.app.MsalTestApp; -import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; -import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; -import com.microsoft.identity.client.ui.automation.broker.BrokerMicrosoftAuthenticator; -import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; -import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; -import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; -import com.microsoft.identity.labapi.utilities.client.LabQuery; -import com.microsoft.identity.labapi.utilities.constants.TempUserType; -import com.microsoft.identity.labapi.utilities.constants.UserType; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; -import java.util.List; - -// If LTW is the active broker, and request is made through Authenticator from MSAL in non-shared device mode, nothing should break -// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582290 -@LTWTests -@RunOnAPI29Minus -@SupportedBrokers(brokers = {BrokerLTW.class}) -@RunWith(Parameterized.class) -public class TestCase2582290 extends AbstractMsalBrokerTest { - - private final UserType mUserType; - - public TestCase2582290(@NonNull UserType userType) { - mUserType = userType; - } - - @Parameterized.Parameters(name = "{0}") - public static List userType() { - return Arrays.asList( - UserType.MSA, - UserType.CLOUD - ); - } - - @Test - public void test_2582290_LTW_LTWActiveBrokerShouldNotBreakNonSDMMsalAuthenticatorRequest() throws Throwable{ - final String username = mLabAccount.getUsername(); - final String password = mLabAccount.getPassword(); - - //Install new LTW with broker SDK changes of broker selection logic - // in supportedBrokers annotation - - // Install updated oneAuthTestApp - final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); - oneAuthTestApp.install(); - oneAuthTestApp.launch(); - oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); - - // Performs AcquireToken - // User is Prompted for creds - final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() - .broker(mBroker) - .prompt(PromptParameter.LOGIN) - .loginHint(username) - .consentPageExpected(false) - .speedBumpExpected(false) - .sessionExpected(false) - .expectingBrokerAccountChooserActivity(false) - .expectingLoginPageAccountPicker(false) - .enrollPageExpected(false) - .build(); - oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); - oneAuthTestApp.confirmAccount(username); - - // Install new Authenticator with broker SDK changes of broker selection logic - final BrokerMicrosoftAuthenticator brokerMicrosoftAuthenticator = new BrokerMicrosoftAuthenticator(); - brokerMicrosoftAuthenticator.install(); - - // Install old MSALTestApp - final MsalTestApp msalTestApp = new MsalTestApp(); - msalTestApp.installOldApk(); - msalTestApp.launch(); - msalTestApp.handleFirstRunBasedOnUserType(mUserType); - - // Click on "AcquireToken" button - // User is Prompted for creds - final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() - .prompt(PromptParameter.SELECT_ACCOUNT) - .loginHint(username) - .sessionExpected(false) - .broker(mBroker) - .expectingBrokerAccountChooserActivity(false) - .expectingProvidedAccountInBroker(false) - .expectingLoginPageAccountPicker(false) - .expectingProvidedAccountInCookie(false) - .consentPageExpected(false) - .passwordPageExpected(true) - .speedBumpExpected(false) - .registerPageExpected(false) - .enrollPageExpected(false) - .staySignedInPageExpected(false) - .verifyYourIdentityPageExpected(false) - .howWouldYouLikeToSignInExpected(false) - .build(); - - // Enter username and click on AcquireToken button - // Token should be retrieved successfully - msalTestApp.handleUserNameInput(username); - final String token = msalTestApp.acquireToken(username, password, promptHandlerParameters, false); - Assert.assertNotNull(token); - msalTestApp.handleBackButton(); - - // Click on "Get Users" button - // The user account should be shown in the UI - final List users = msalTestApp.getUsers(); - Assert.assertTrue(users.size() == 1); - Assert.assertTrue(users.get(0).contains(username)); - msalTestApp.handleBackButton(); - - // Click on "Acquire Token Silent" button - // Token should be retrieved successfully - final String silentToken = msalTestApp.acquireTokenSilent(); - Assert.assertNotNull(silentToken); - msalTestApp.handleBackButton(); - - // Select the Auth scheme as "POP" - msalTestApp.selectFromAuthScheme("POP"); - - // Click on "Generate SHR" button - // UI should be updated with an SHR token - final String shrToken = msalTestApp.generateSHR(); - Assert.assertNotNull(shrToken); - msalTestApp.handleBackButton(); - - // Click on "Remove User" button - // UI updated with message "The account is successfully removed" - final String removeUserMessage = msalTestApp.removeUserLegacy(); - Assert.assertEquals("The account is successfully removed.", removeUserMessage); - } - - @Override - public LabQuery getLabQuery() { - return LabQuery.builder() - .userType(mUserType) - .build(); - } - - @Override - public TempUserType getTempUserType() { - return null; - } - - - @Override - public String[] getScopes() { - return new String[]{"User.read"}; - } - - @Override - public String getAuthority() { - return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); - } - - @Override - public int getConfigFileResourceId() { - return R.raw.msal_config_default; - } -} diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java deleted file mode 100644 index 9abf263ef..000000000 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// All rights reserved. -// -// This code is licensed under the MIT License. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files(the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions : -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; - -import androidx.annotation.NonNull; - -import com.microsoft.identity.client.msal.automationapp.R; -import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; -import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; -import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; -import com.microsoft.identity.client.ui.automation.app.MsalTestApp; -import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; -import com.microsoft.identity.client.ui.automation.broker.BrokerCompanyPortal; -import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; -import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; -import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; -import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; -import com.microsoft.identity.labapi.utilities.client.LabQuery; -import com.microsoft.identity.labapi.utilities.constants.TempUserType; -import com.microsoft.identity.labapi.utilities.constants.UserType; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; -import java.util.List; - -// If LTW is the active broker, and request is made through CP from MSAL in non-shared device mode, nothing should break -// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582291 -@LTWTests -@RunOnAPI29Minus -@SupportedBrokers(brokers = {BrokerLTW.class}) -@RunWith(Parameterized.class) -public class TestCase2582291 extends AbstractMsalBrokerTest { - - private final UserType mUserType; - - public TestCase2582291(@NonNull UserType userType) { - mUserType = userType; - } - - @Parameterized.Parameters(name = "{0}") - public static List userType() { - return Arrays.asList( - UserType.MSA, - UserType.CLOUD - ); - } - @Test - public void test_2582291_LTW_LTWActiveBrokerShouldNotBreakNonSDMMsalCPRequest() throws Throwable{ - final String username = mLabAccount.getUsername(); - final String password = mLabAccount.getPassword(); - - //Install new LTW with broker SDK changes of broker selection logic - // in supportedBrokers annotation - - // Install updated oneAuthTestApp - final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); - oneAuthTestApp.install(); - oneAuthTestApp.launch(); - oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); - - // Performs AcquireToken - // User is Prompted for creds - final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() - .broker(mBroker) - .prompt(PromptParameter.LOGIN) - .loginHint(username) - .consentPageExpected(false) - .speedBumpExpected(false) - .sessionExpected(false) - .expectingBrokerAccountChooserActivity(false) - .expectingLoginPageAccountPicker(false) - .enrollPageExpected(false) - .build(); - oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); - oneAuthTestApp.confirmAccount(username); - - // Install new CP app with broker SDK changes of broker selection logic - final BrokerCompanyPortal brokerCompanyPortal = new BrokerCompanyPortal(); - brokerCompanyPortal.install(); - - // Install old MSALTestApp - final MsalTestApp msalTestApp = new MsalTestApp(); - msalTestApp.installOldApk(); - msalTestApp.launch(); - msalTestApp.handleFirstRunBasedOnUserType(mUserType); - - // Click on "AcquireToken" button - // User is Prompted for creds - final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() - .prompt(PromptParameter.SELECT_ACCOUNT) - .loginHint(username) - .sessionExpected(false) - .broker(mBroker) - .expectingBrokerAccountChooserActivity(false) - .expectingProvidedAccountInBroker(false) - .expectingLoginPageAccountPicker(false) - .expectingProvidedAccountInCookie(false) - .consentPageExpected(false) - .passwordPageExpected(true) - .speedBumpExpected(false) - .registerPageExpected(false) - .enrollPageExpected(false) - .staySignedInPageExpected(false) - .verifyYourIdentityPageExpected(false) - .howWouldYouLikeToSignInExpected(false) - .build(); - - // Enter username and click on AcquireToken button - // Token should be retrieved successfully - msalTestApp.handleUserNameInput(username); - final String token = msalTestApp.acquireToken(username, password, promptHandlerParameters, false); - Assert.assertNotNull(token); - msalTestApp.handleBackButton(); - - // Click on "Get Users" button - // The user account should be shown in the UI - final List users = msalTestApp.getUsers(); - Assert.assertTrue(users.size() == 1); - Assert.assertTrue(users.get(0).contains(username)); - msalTestApp.handleBackButton(); - - // Click on "Acquire Token Silent" button - // Token should be retrieved successfully - final String silentToken = msalTestApp.acquireTokenSilent(); - Assert.assertNotNull(silentToken); - msalTestApp.handleBackButton(); - - // Select the Auth scheme as "POP" - msalTestApp.selectFromAuthScheme("POP"); - - // Click on "Generate SHR" button - // UI should be updated with an SHR token - final String shrToken = msalTestApp.generateSHR(); - Assert.assertNotNull(shrToken); - msalTestApp.handleBackButton(); - - // Click on "Remove User" button - // UI updated with message "The account is successfully removed" - final String removeUserMessage = msalTestApp.removeUserLegacy(); - Assert.assertEquals("The account is successfully removed.", removeUserMessage); - } - @Override - public LabQuery getLabQuery() { - return LabQuery.builder() - .userType(mUserType) - .build(); - } - - @Override - public TempUserType getTempUserType() { - return null; - } - - @Override - public String[] getScopes() { - return new String[]{"User.read"}; - } - - @Override - public String getAuthority() { - return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); - } - - @Override - public int getConfigFileResourceId() { - return R.raw.msal_config_default; - } -} diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java deleted file mode 100644 index 95a6d8549..000000000 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// All rights reserved. -// -// This code is licensed under the MIT License. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files(the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions : -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; - -import androidx.test.uiautomator.UiObjectNotFoundException; - -import com.microsoft.identity.client.msal.automationapp.R; -import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; -import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RetryOnFailure; -import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; -import com.microsoft.identity.client.ui.automation.app.MsalTestApp; -import com.microsoft.identity.client.ui.automation.broker.BrokerHost; -import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; -import com.microsoft.identity.client.ui.automation.broker.BrokerMicrosoftAuthenticator; -import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; -import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; -import com.microsoft.identity.labapi.utilities.client.ILabAccount; -import com.microsoft.identity.labapi.utilities.client.LabQuery; -import com.microsoft.identity.labapi.utilities.constants.AzureEnvironment; -import com.microsoft.identity.labapi.utilities.constants.TempUserType; -import com.microsoft.identity.labapi.utilities.constants.UserRole; -import com.microsoft.identity.labapi.utilities.constants.UserType; -import com.microsoft.identity.labapi.utilities.exception.LabApiException; - -import org.junit.Assert; -import org.junit.Test; - -import java.util.List; - -// If LTW is the active broker, and request is made through Authenticator from an old MSAL in shared device mode, nothing should break -// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582292 -@LTWTests -@RetryOnFailure -@SupportedBrokers(brokers = {BrokerLTW.class}) -public class TestCase2582292 extends AbstractMsalBrokerTest { - - @Test - public void test_2582292_LTW_LTWActiveBrokerShouldNotBreakSDMMSALAuthenticatorRequest() throws LabApiException, InterruptedException, UiObjectNotFoundException { - final String username1 = mLabAccount.getUsername(); - final String password1 = mLabAccount.getPassword(); - - // Shared Steps 2582325: Set up shared device mode on LTW Broker - // Install LTW app with broker selection logic enabled - // installed LTW by SupportedBrokers annotation - - // Install Broker Host app (with broker selection logic enabled) - final BrokerHost brokerHost = new BrokerHost(); - brokerHost.install(); - brokerHost.launch(); - - // In brokerHost Multiple WPJ mode: perform a shared device registration with a cloud device admin account from the LAB API - brokerHost.multipleWpjApiFragment.performSharedDeviceRegistration(username1, password1); - - // Uninstall BrokerHost App - brokerHost.uninstall(); - - // Install new Auth app with broker SDK changes of broker selection logic - final BrokerMicrosoftAuthenticator brokerMicrosoftAuthenticator = new BrokerMicrosoftAuthenticator(); - brokerMicrosoftAuthenticator.install(); - - // Install legacy MSAL Test app (Msal test app with no broker selection logic) - final MsalTestApp msalTestApp = new MsalTestApp(); - msalTestApp.installOldApk(); - - // Check mode in MSAL test app - // MSAL should be in "Shared Device" mode - msalTestApp.launch(); - msalTestApp.handleFirstRun(); - try { - Thread.sleep(5000); - } catch (final InterruptedException e) { - throw new AssertionError(e); - } - final String mode = msalTestApp.checkMode(); - Assert.assertTrue(mode.contains("Single Account - Shared device")); - - // performs AcquireToken with an account from the same tenant with the WPJed account. - final LabQuery query = LabQuery.builder() - .userType(UserType.CLOUD) - .build(); - - final ILabAccount difAccount = mLabClient.getLabAccount(query); - final String username2 = difAccount.getUsername(); - final String password2 = difAccount.getPassword(); - - final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() - .prompt(PromptParameter.SELECT_ACCOUNT) - .loginHint(username2) - .sessionExpected(false) - .broker(mBroker) - .expectingBrokerAccountChooserActivity(false) - .expectingProvidedAccountInBroker(false) - .expectingLoginPageAccountPicker(false) - .expectingProvidedAccountInCookie(false) - .consentPageExpected(false) - .passwordPageExpected(true) - .speedBumpExpected(false) - .registerPageExpected(false) - .enrollPageExpected(false) - .staySignedInPageExpected(false) - .verifyYourIdentityPageExpected(false) - .howWouldYouLikeToSignInExpected(false) - .build(); - - String token = msalTestApp.acquireToken(username2, password2, promptHandlerParameters, true); - Assert.assertNotNull(token); - - // Click on "GetUsers" button - // You should see the signed in user - msalTestApp.handleBackButton(); - final List users = msalTestApp.getUsers(); - Assert.assertEquals(1, users.size()); - Assert.assertTrue(users.get(0).contains(username2)); - - // Click on "RemoveUsers" button - // Account should be removed from MSAL - msalTestApp.handleBackButton(); - final String msg = msalTestApp.removeUserLegacy(); - Assert.assertEquals("The account is successfully signed out.", msg); - Assert.assertEquals(0, msalTestApp.getUsers().size()); - } - - @Override - public LabQuery getLabQuery() { - return LabQuery.builder() - .azureEnvironment(AzureEnvironment.AZURE_CLOUD) - .userRole(UserRole.CLOUD_DEVICE_ADMINISTRATOR) - .build(); - } - - @Override - public TempUserType getTempUserType() { - return null; - } - - @Override - public String[] getScopes() { - return new String[]{"User.read"}; - } - - @Override - public String getAuthority() { - return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); - } - - @Override - public int getConfigFileResourceId() { - return R.raw.msal_config_default; - } -} From 8ece527087b44f4eff02a31b8262af1540a09a2d Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 30 Sep 2025 23:06:50 -0400 Subject: [PATCH 3/6] common --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 7d28c9b87..6f369214c 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 7d28c9b8738c5a82843643ebcb34602a7ee22679 +Subproject commit 6f369214cf3c6e44153d2a4eed1ff5b5bbf803a7 From 8b7295012da10dc874dac069d346ae63b5911e55 Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 7 Oct 2025 12:44:46 -0400 Subject: [PATCH 4/6] gradle --- msal/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/msal/build.gradle b/msal/build.gradle index 48e23f670..24ce6cd36 100644 --- a/msal/build.gradle +++ b/msal/build.gradle @@ -5,6 +5,9 @@ plugins { id 'checkstyle' id 'maven-publish' id 'kotlin-android' + + // Test retries + id 'org.gradle.test-retry' version '1.5.6' } apply from: 'versioning/version_tasks.gradle' From 44c80a6300fa40c6c32e4b6d8afd1f83f16cbbda Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 7 Oct 2025 12:46:33 -0400 Subject: [PATCH 5/6] revert delete --- .../testpass/broker/ltw/TestCase2582290.java | 196 ++++++++++++++++++ .../testpass/broker/ltw/TestCase2582291.java | 193 +++++++++++++++++ .../testpass/broker/ltw/TestCase2582292.java | 171 +++++++++++++++ 3 files changed, 560 insertions(+) create mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java create mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java create mode 100644 msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java new file mode 100644 index 000000000..7b1b299d4 --- /dev/null +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. +// All rights reserved. +// +// This code is licensed under the MIT License. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; + +import androidx.annotation.NonNull; + +import com.microsoft.identity.client.msal.automationapp.R; +import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; +import com.microsoft.identity.client.ui.automation.annotations.LTWTests; +import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; +import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; +import com.microsoft.identity.client.ui.automation.app.MsalTestApp; +import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; +import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; +import com.microsoft.identity.client.ui.automation.broker.BrokerMicrosoftAuthenticator; +import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; +import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; +import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; +import com.microsoft.identity.labapi.utilities.client.LabQuery; +import com.microsoft.identity.labapi.utilities.constants.TempUserType; +import com.microsoft.identity.labapi.utilities.constants.UserType; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.util.Arrays; +import java.util.List; + +// If LTW is the active broker, and request is made through Authenticator from MSAL in non-shared device mode, nothing should break +// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582290 +@LTWTests +@RunOnAPI29Minus +@SupportedBrokers(brokers = {BrokerLTW.class}) +@RunWith(Parameterized.class) +public class TestCase2582290 extends AbstractMsalBrokerTest { + + private final UserType mUserType; + + public TestCase2582290(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } + + @Test + public void test_2582290_LTW_LTWActiveBrokerShouldNotBreakNonSDMMsalAuthenticatorRequest() throws Throwable{ + final String username = mLabAccount.getUsername(); + final String password = mLabAccount.getPassword(); + + //Install new LTW with broker SDK changes of broker selection logic + // in supportedBrokers annotation + + // Install updated oneAuthTestApp + final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); + oneAuthTestApp.install(); + oneAuthTestApp.launch(); + oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); + + // Performs AcquireToken + // User is Prompted for creds + final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() + .broker(mBroker) + .prompt(PromptParameter.LOGIN) + .loginHint(username) + .consentPageExpected(false) + .speedBumpExpected(false) + .sessionExpected(false) + .expectingBrokerAccountChooserActivity(false) + .expectingLoginPageAccountPicker(false) + .enrollPageExpected(false) + .build(); + oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); + oneAuthTestApp.confirmAccount(username); + + // Install new Authenticator with broker SDK changes of broker selection logic + final BrokerMicrosoftAuthenticator brokerMicrosoftAuthenticator = new BrokerMicrosoftAuthenticator(); + brokerMicrosoftAuthenticator.install(); + + // Install old MSALTestApp + final MsalTestApp msalTestApp = new MsalTestApp(); + msalTestApp.installOldApk(); + msalTestApp.launch(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); + + // Click on "AcquireToken" button + // User is Prompted for creds + final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() + .prompt(PromptParameter.SELECT_ACCOUNT) + .loginHint(username) + .sessionExpected(false) + .broker(mBroker) + .expectingBrokerAccountChooserActivity(false) + .expectingProvidedAccountInBroker(false) + .expectingLoginPageAccountPicker(false) + .expectingProvidedAccountInCookie(false) + .consentPageExpected(false) + .passwordPageExpected(true) + .speedBumpExpected(false) + .registerPageExpected(false) + .enrollPageExpected(false) + .staySignedInPageExpected(false) + .verifyYourIdentityPageExpected(false) + .howWouldYouLikeToSignInExpected(false) + .build(); + + // Enter username and click on AcquireToken button + // Token should be retrieved successfully + msalTestApp.handleUserNameInput(username); + final String token = msalTestApp.acquireToken(username, password, promptHandlerParameters, false); + Assert.assertNotNull(token); + msalTestApp.handleBackButton(); + + // Click on "Get Users" button + // The user account should be shown in the UI + final List users = msalTestApp.getUsers(); + Assert.assertTrue(users.size() == 1); + Assert.assertTrue(users.get(0).contains(username)); + msalTestApp.handleBackButton(); + + // Click on "Acquire Token Silent" button + // Token should be retrieved successfully + final String silentToken = msalTestApp.acquireTokenSilent(); + Assert.assertNotNull(silentToken); + msalTestApp.handleBackButton(); + + // Select the Auth scheme as "POP" + msalTestApp.selectFromAuthScheme("POP"); + + // Click on "Generate SHR" button + // UI should be updated with an SHR token + final String shrToken = msalTestApp.generateSHR(); + Assert.assertNotNull(shrToken); + msalTestApp.handleBackButton(); + + // Click on "Remove User" button + // UI updated with message "The account is successfully removed" + final String removeUserMessage = msalTestApp.removeUserLegacy(); + Assert.assertEquals("The account is successfully removed.", removeUserMessage); + } + + @Override + public LabQuery getLabQuery() { + return LabQuery.builder() + .userType(mUserType) + .build(); + } + + @Override + public TempUserType getTempUserType() { + return null; + } + + + @Override + public String[] getScopes() { + return new String[]{"User.read"}; + } + + @Override + public String getAuthority() { + return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); + } + + @Override + public int getConfigFileResourceId() { + return R.raw.msal_config_default; + } +} diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java new file mode 100644 index 000000000..9abf263ef --- /dev/null +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. +// All rights reserved. +// +// This code is licensed under the MIT License. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; + +import androidx.annotation.NonNull; + +import com.microsoft.identity.client.msal.automationapp.R; +import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; +import com.microsoft.identity.client.ui.automation.annotations.LTWTests; +import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; +import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; +import com.microsoft.identity.client.ui.automation.app.MsalTestApp; +import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; +import com.microsoft.identity.client.ui.automation.broker.BrokerCompanyPortal; +import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; +import com.microsoft.identity.client.ui.automation.interaction.FirstPartyAppPromptHandlerParameters; +import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; +import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; +import com.microsoft.identity.labapi.utilities.client.LabQuery; +import com.microsoft.identity.labapi.utilities.constants.TempUserType; +import com.microsoft.identity.labapi.utilities.constants.UserType; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.util.Arrays; +import java.util.List; + +// If LTW is the active broker, and request is made through CP from MSAL in non-shared device mode, nothing should break +// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582291 +@LTWTests +@RunOnAPI29Minus +@SupportedBrokers(brokers = {BrokerLTW.class}) +@RunWith(Parameterized.class) +public class TestCase2582291 extends AbstractMsalBrokerTest { + + private final UserType mUserType; + + public TestCase2582291(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } + @Test + public void test_2582291_LTW_LTWActiveBrokerShouldNotBreakNonSDMMsalCPRequest() throws Throwable{ + final String username = mLabAccount.getUsername(); + final String password = mLabAccount.getPassword(); + + //Install new LTW with broker SDK changes of broker selection logic + // in supportedBrokers annotation + + // Install updated oneAuthTestApp + final OneAuthTestApp oneAuthTestApp = new OneAuthTestApp(); + oneAuthTestApp.install(); + oneAuthTestApp.launch(); + oneAuthTestApp.handleFirstRunBasedOnUserType(mUserType); + + // Performs AcquireToken + // User is Prompted for creds + final FirstPartyAppPromptHandlerParameters promptHandlerParametersOneAuth = FirstPartyAppPromptHandlerParameters.builder() + .broker(mBroker) + .prompt(PromptParameter.LOGIN) + .loginHint(username) + .consentPageExpected(false) + .speedBumpExpected(false) + .sessionExpected(false) + .expectingBrokerAccountChooserActivity(false) + .expectingLoginPageAccountPicker(false) + .enrollPageExpected(false) + .build(); + oneAuthTestApp.addFirstAccount(username, password, promptHandlerParametersOneAuth); + oneAuthTestApp.confirmAccount(username); + + // Install new CP app with broker SDK changes of broker selection logic + final BrokerCompanyPortal brokerCompanyPortal = new BrokerCompanyPortal(); + brokerCompanyPortal.install(); + + // Install old MSALTestApp + final MsalTestApp msalTestApp = new MsalTestApp(); + msalTestApp.installOldApk(); + msalTestApp.launch(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); + + // Click on "AcquireToken" button + // User is Prompted for creds + final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() + .prompt(PromptParameter.SELECT_ACCOUNT) + .loginHint(username) + .sessionExpected(false) + .broker(mBroker) + .expectingBrokerAccountChooserActivity(false) + .expectingProvidedAccountInBroker(false) + .expectingLoginPageAccountPicker(false) + .expectingProvidedAccountInCookie(false) + .consentPageExpected(false) + .passwordPageExpected(true) + .speedBumpExpected(false) + .registerPageExpected(false) + .enrollPageExpected(false) + .staySignedInPageExpected(false) + .verifyYourIdentityPageExpected(false) + .howWouldYouLikeToSignInExpected(false) + .build(); + + // Enter username and click on AcquireToken button + // Token should be retrieved successfully + msalTestApp.handleUserNameInput(username); + final String token = msalTestApp.acquireToken(username, password, promptHandlerParameters, false); + Assert.assertNotNull(token); + msalTestApp.handleBackButton(); + + // Click on "Get Users" button + // The user account should be shown in the UI + final List users = msalTestApp.getUsers(); + Assert.assertTrue(users.size() == 1); + Assert.assertTrue(users.get(0).contains(username)); + msalTestApp.handleBackButton(); + + // Click on "Acquire Token Silent" button + // Token should be retrieved successfully + final String silentToken = msalTestApp.acquireTokenSilent(); + Assert.assertNotNull(silentToken); + msalTestApp.handleBackButton(); + + // Select the Auth scheme as "POP" + msalTestApp.selectFromAuthScheme("POP"); + + // Click on "Generate SHR" button + // UI should be updated with an SHR token + final String shrToken = msalTestApp.generateSHR(); + Assert.assertNotNull(shrToken); + msalTestApp.handleBackButton(); + + // Click on "Remove User" button + // UI updated with message "The account is successfully removed" + final String removeUserMessage = msalTestApp.removeUserLegacy(); + Assert.assertEquals("The account is successfully removed.", removeUserMessage); + } + @Override + public LabQuery getLabQuery() { + return LabQuery.builder() + .userType(mUserType) + .build(); + } + + @Override + public TempUserType getTempUserType() { + return null; + } + + @Override + public String[] getScopes() { + return new String[]{"User.read"}; + } + + @Override + public String getAuthority() { + return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); + } + + @Override + public int getConfigFileResourceId() { + return R.raw.msal_config_default; + } +} diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java new file mode 100644 index 000000000..95a6d8549 --- /dev/null +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582292.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. +// All rights reserved. +// +// This code is licensed under the MIT License. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +package com.microsoft.identity.client.msal.automationapp.testpass.broker.ltw; + +import androidx.test.uiautomator.UiObjectNotFoundException; + +import com.microsoft.identity.client.msal.automationapp.R; +import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; +import com.microsoft.identity.client.ui.automation.annotations.LTWTests; +import com.microsoft.identity.client.ui.automation.annotations.RetryOnFailure; +import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; +import com.microsoft.identity.client.ui.automation.app.MsalTestApp; +import com.microsoft.identity.client.ui.automation.broker.BrokerHost; +import com.microsoft.identity.client.ui.automation.broker.BrokerLTW; +import com.microsoft.identity.client.ui.automation.broker.BrokerMicrosoftAuthenticator; +import com.microsoft.identity.client.ui.automation.interaction.PromptParameter; +import com.microsoft.identity.client.ui.automation.interaction.microsoftsts.MicrosoftStsPromptHandlerParameters; +import com.microsoft.identity.labapi.utilities.client.ILabAccount; +import com.microsoft.identity.labapi.utilities.client.LabQuery; +import com.microsoft.identity.labapi.utilities.constants.AzureEnvironment; +import com.microsoft.identity.labapi.utilities.constants.TempUserType; +import com.microsoft.identity.labapi.utilities.constants.UserRole; +import com.microsoft.identity.labapi.utilities.constants.UserType; +import com.microsoft.identity.labapi.utilities.exception.LabApiException; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.List; + +// If LTW is the active broker, and request is made through Authenticator from an old MSAL in shared device mode, nothing should break +// https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582292 +@LTWTests +@RetryOnFailure +@SupportedBrokers(brokers = {BrokerLTW.class}) +public class TestCase2582292 extends AbstractMsalBrokerTest { + + @Test + public void test_2582292_LTW_LTWActiveBrokerShouldNotBreakSDMMSALAuthenticatorRequest() throws LabApiException, InterruptedException, UiObjectNotFoundException { + final String username1 = mLabAccount.getUsername(); + final String password1 = mLabAccount.getPassword(); + + // Shared Steps 2582325: Set up shared device mode on LTW Broker + // Install LTW app with broker selection logic enabled + // installed LTW by SupportedBrokers annotation + + // Install Broker Host app (with broker selection logic enabled) + final BrokerHost brokerHost = new BrokerHost(); + brokerHost.install(); + brokerHost.launch(); + + // In brokerHost Multiple WPJ mode: perform a shared device registration with a cloud device admin account from the LAB API + brokerHost.multipleWpjApiFragment.performSharedDeviceRegistration(username1, password1); + + // Uninstall BrokerHost App + brokerHost.uninstall(); + + // Install new Auth app with broker SDK changes of broker selection logic + final BrokerMicrosoftAuthenticator brokerMicrosoftAuthenticator = new BrokerMicrosoftAuthenticator(); + brokerMicrosoftAuthenticator.install(); + + // Install legacy MSAL Test app (Msal test app with no broker selection logic) + final MsalTestApp msalTestApp = new MsalTestApp(); + msalTestApp.installOldApk(); + + // Check mode in MSAL test app + // MSAL should be in "Shared Device" mode + msalTestApp.launch(); + msalTestApp.handleFirstRun(); + try { + Thread.sleep(5000); + } catch (final InterruptedException e) { + throw new AssertionError(e); + } + final String mode = msalTestApp.checkMode(); + Assert.assertTrue(mode.contains("Single Account - Shared device")); + + // performs AcquireToken with an account from the same tenant with the WPJed account. + final LabQuery query = LabQuery.builder() + .userType(UserType.CLOUD) + .build(); + + final ILabAccount difAccount = mLabClient.getLabAccount(query); + final String username2 = difAccount.getUsername(); + final String password2 = difAccount.getPassword(); + + final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() + .prompt(PromptParameter.SELECT_ACCOUNT) + .loginHint(username2) + .sessionExpected(false) + .broker(mBroker) + .expectingBrokerAccountChooserActivity(false) + .expectingProvidedAccountInBroker(false) + .expectingLoginPageAccountPicker(false) + .expectingProvidedAccountInCookie(false) + .consentPageExpected(false) + .passwordPageExpected(true) + .speedBumpExpected(false) + .registerPageExpected(false) + .enrollPageExpected(false) + .staySignedInPageExpected(false) + .verifyYourIdentityPageExpected(false) + .howWouldYouLikeToSignInExpected(false) + .build(); + + String token = msalTestApp.acquireToken(username2, password2, promptHandlerParameters, true); + Assert.assertNotNull(token); + + // Click on "GetUsers" button + // You should see the signed in user + msalTestApp.handleBackButton(); + final List users = msalTestApp.getUsers(); + Assert.assertEquals(1, users.size()); + Assert.assertTrue(users.get(0).contains(username2)); + + // Click on "RemoveUsers" button + // Account should be removed from MSAL + msalTestApp.handleBackButton(); + final String msg = msalTestApp.removeUserLegacy(); + Assert.assertEquals("The account is successfully signed out.", msg); + Assert.assertEquals(0, msalTestApp.getUsers().size()); + } + + @Override + public LabQuery getLabQuery() { + return LabQuery.builder() + .azureEnvironment(AzureEnvironment.AZURE_CLOUD) + .userRole(UserRole.CLOUD_DEVICE_ADMINISTRATOR) + .build(); + } + + @Override + public TempUserType getTempUserType() { + return null; + } + + @Override + public String[] getScopes() { + return new String[]{"User.read"}; + } + + @Override + public String getAuthority() { + return mApplication.getConfiguration().getDefaultAuthority().getAuthorityURL().toString(); + } + + @Override + public int getConfigFileResourceId() { + return R.raw.msal_config_default; + } +} From fc9c7f28e269eb0e949d640d289f5507e336138f Mon Sep 17 00:00:00 2001 From: fadidurah Date: Tue, 7 Oct 2025 12:49:06 -0400 Subject: [PATCH 6/6] adjust tests --- .../msal/automationapp/testpass/broker/ltw/TestCase2571361.java | 1 - .../msal/automationapp/testpass/broker/ltw/TestCase2572249.java | 1 - .../msal/automationapp/testpass/broker/ltw/TestCase2582290.java | 2 -- .../msal/automationapp/testpass/broker/ltw/TestCase2582291.java | 2 -- 4 files changed, 6 deletions(-) diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java index 8f7f10929..dcaaa9d44 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2571361.java @@ -28,7 +28,6 @@ import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; import com.microsoft.identity.client.ui.automation.annotations.LTWTests; import com.microsoft.identity.client.ui.automation.annotations.RetryOnFailure; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; import com.microsoft.identity.client.ui.automation.app.MsalTestApp; import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java index ad7701842..8a62e324d 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572249.java @@ -28,7 +28,6 @@ import com.microsoft.identity.client.msal.automationapp.R; import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; import com.microsoft.identity.client.ui.automation.app.MsalTestApp; import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java index 7b1b299d4..69a2f0ef9 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582290.java @@ -27,7 +27,6 @@ import com.microsoft.identity.client.msal.automationapp.R; import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; import com.microsoft.identity.client.ui.automation.app.MsalTestApp; import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; @@ -51,7 +50,6 @@ // If LTW is the active broker, and request is made through Authenticator from MSAL in non-shared device mode, nothing should break // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582290 @LTWTests -@RunOnAPI29Minus @SupportedBrokers(brokers = {BrokerLTW.class}) @RunWith(Parameterized.class) public class TestCase2582290 extends AbstractMsalBrokerTest { diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java index 9abf263ef..32de86c2b 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582291.java @@ -27,7 +27,6 @@ import com.microsoft.identity.client.msal.automationapp.R; import com.microsoft.identity.client.msal.automationapp.testpass.broker.AbstractMsalBrokerTest; import com.microsoft.identity.client.ui.automation.annotations.LTWTests; -import com.microsoft.identity.client.ui.automation.annotations.RunOnAPI29Minus; import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers; import com.microsoft.identity.client.ui.automation.app.MsalTestApp; import com.microsoft.identity.client.ui.automation.app.OneAuthTestApp; @@ -51,7 +50,6 @@ // If LTW is the active broker, and request is made through CP from MSAL in non-shared device mode, nothing should break // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2582291 @LTWTests -@RunOnAPI29Minus @SupportedBrokers(brokers = {BrokerLTW.class}) @RunWith(Parameterized.class) public class TestCase2582291 extends AbstractMsalBrokerTest {