From d8e37a085d50de5e110e9924ac89418a6d467e7b Mon Sep 17 00:00:00 2001 From: Sowmya Malayanur <69237821+somalaya@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:09:05 -0800 Subject: [PATCH] Modify LTW tests to run with MSA accounts (#1959) (Same as title) Related common PR https://github.com/AzureAD/microsoft-authentication-library-common-for-android/pull/2243 --------- Co-authored-by: Yixi Lin --- .../testpass/broker/ltw/TestCase2572280.java | 31 +++++++++++++++++-- .../testpass/broker/ltw/TestCase2572283.java | 29 +++++++++++++++-- .../testpass/broker/ltw/TestCase2572294.java | 30 ++++++++++++++++-- .../testpass/broker/ltw/TestCase2584409.java | 30 ++++++++++++++++-- .../testpass/broker/ltw/TestCase2584410.java | 31 +++++++++++++++++-- .../testpass/broker/ltw/TestCase2584411.java | 30 ++++++++++++++++-- .../testpass/broker/ltw/TestCase2584412.java | 30 ++++++++++++++++-- .../testpass/broker/ltw/TestCase2584414.java | 29 +++++++++++++++-- 8 files changed, 216 insertions(+), 24 deletions(-) diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572280.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572280.java index d8df6d981..da84e50de 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572280.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572280.java @@ -22,6 +22,8 @@ // 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; @@ -34,17 +36,38 @@ 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; // LTW has higher priority than CP // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2572280 @LTWTests @RetryOnFailure @SupportedBrokers(brokers = {BrokerLTW.class}) +@RunWith(Parameterized.class) public class TestCase2572280 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2572280(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } + @Test public void test_2572280() throws Throwable { final String username = mLabAccount.getUsername(); @@ -56,7 +79,7 @@ public void test_2572280() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -86,12 +109,14 @@ public void test_2572280() throws Throwable { } @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572283.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572283.java index 424414b56..9e1163d58 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572283.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572283.java @@ -22,6 +22,8 @@ // 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; @@ -33,16 +35,35 @@ 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; // LTW has higher priority than CP - Case2 // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2572283 @LTWTests @SupportedBrokers(brokers = {BrokerCompanyPortal.class}) +@RunWith(Parameterized.class) public class TestCase2572283 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2572283(@NonNull UserType userType) { + mUserType = userType; + } + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2572283() throws Throwable { final String username = mLabAccount.getUsername(); @@ -54,7 +75,7 @@ public void test_2572283() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -84,12 +105,14 @@ public void test_2572283() throws Throwable { } @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572294.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572294.java index e707d1847..00b7fc742 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572294.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2572294.java @@ -22,6 +22,8 @@ // 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; @@ -34,15 +36,35 @@ 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; // Authenticator has highest priority - Case1 (LTW, Auth, CP) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2572294 @LTWTests @SupportedBrokers(brokers = {BrokerLTW.class}) +@RunWith(Parameterized.class) public class TestCase2572294 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2572294(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2572294() throws Throwable { final String username = mLabAccount.getUsername(); @@ -57,7 +79,7 @@ public void test_2572294() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -88,12 +110,14 @@ public void test_2572294() throws Throwable { @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584409.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584409.java index 55bafe6dc..a99008130 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584409.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584409.java @@ -22,6 +22,8 @@ // 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; @@ -34,15 +36,35 @@ 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; // Authenticator has highest priority - Case2 (LTW, CP, Auth) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2584409 @LTWTests @SupportedBrokers(brokers = {BrokerLTW.class}) +@RunWith(Parameterized.class) public class TestCase2584409 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2584409(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2584409() throws Throwable { final String username = mLabAccount.getUsername(); @@ -57,7 +79,7 @@ public void test_2584409() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -88,12 +110,14 @@ public void test_2584409() throws Throwable { @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584410.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584410.java index 80da7903e..8603d5ce6 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584410.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584410.java @@ -22,6 +22,8 @@ // 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; @@ -35,16 +37,37 @@ 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; // Authenticator has highest priority - Case3 (Auth, LTW, CP) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2584410 @LTWTests @RetryOnFailure @SupportedBrokers(brokers = {BrokerMicrosoftAuthenticator.class}) +@RunWith(Parameterized.class) public class TestCase2584410 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2584410(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } + @Test public void test_2584410() throws Throwable { final String username = mLabAccount.getUsername(); @@ -59,7 +82,7 @@ public void test_2584410() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -90,12 +113,14 @@ public void test_2584410() throws Throwable { @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584411.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584411.java index 0ecdbaa2c..cdacf9c02 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584411.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584411.java @@ -22,6 +22,8 @@ // 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; @@ -34,15 +36,35 @@ 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; // Authenticator has highest priority - Case4 (Auth, CP, LTW) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2584411 @LTWTests @SupportedBrokers(brokers = {BrokerMicrosoftAuthenticator.class}) +@RunWith(Parameterized.class) public class TestCase2584411 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2584411(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2584411() throws Throwable { final String username = mLabAccount.getUsername(); @@ -57,7 +79,7 @@ public void test_2584411() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -88,12 +110,14 @@ public void test_2584411() throws Throwable { @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584412.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584412.java index d5415f22d..8a44dae62 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584412.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584412.java @@ -22,6 +22,8 @@ // 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; @@ -34,16 +36,35 @@ 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; // Authenticator has highest priority - Case5 (CP, Auth, LTW) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2584412 @LTWTests @SupportedBrokers(brokers = {BrokerCompanyPortal.class}) +@RunWith(Parameterized.class) public class TestCase2584412 extends AbstractMsalBrokerTest { + private final UserType mUserType; + public TestCase2584412(@NonNull UserType userType) { + mUserType = userType; + } + + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2584412() throws Throwable { final String username = mLabAccount.getUsername(); @@ -58,7 +79,7 @@ public void test_2584412() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -86,14 +107,17 @@ public void test_2584412() throws Throwable { final String activeBroker = msalTestApp.getActiveBrokerPackageName(); Assert.assertEquals("Active broker pkg name : " + BrokerMicrosoftAuthenticator.AUTHENTICATOR_APP_PACKAGE_NAME, activeBroker); } + @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override diff --git a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584414.java b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584414.java index 484c02610..4831ae55b 100644 --- a/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584414.java +++ b/msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2584414.java @@ -22,6 +22,8 @@ // 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; @@ -34,16 +36,35 @@ 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; // Authenticator has highest priority - Case6 (CP, LTW, Auth) // https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2584414 @LTWTests @SupportedBrokers(brokers = {BrokerCompanyPortal.class}) +@RunWith(Parameterized.class) public class TestCase2584414 extends AbstractMsalBrokerTest { + private final UserType mUserType; + + public TestCase2584414(@NonNull UserType userType) { + mUserType = userType; + } + @Parameterized.Parameters(name = "{0}") + public static List userType() { + return Arrays.asList( + UserType.MSA, + UserType.CLOUD + ); + } @Test public void test_2584414() throws Throwable { final String username = mLabAccount.getUsername(); @@ -58,7 +79,7 @@ public void test_2584414() throws Throwable { final MsalTestApp msalTestApp = new MsalTestApp(); msalTestApp.install(); msalTestApp.launch(); - msalTestApp.handleFirstRun(); + msalTestApp.handleFirstRunBasedOnUserType(mUserType); final MicrosoftStsPromptHandlerParameters promptHandlerParameters = MicrosoftStsPromptHandlerParameters.builder() .prompt(PromptParameter.SELECT_ACCOUNT) @@ -88,12 +109,14 @@ public void test_2584414() throws Throwable { } @Override public LabQuery getLabQuery() { - return null; + return LabQuery.builder() + .userType(mUserType) + .build(); } @Override public TempUserType getTempUserType() { - return TempUserType.BASIC; + return null; } @Override