File tree Expand file tree Collapse file tree 7 files changed +56
-6
lines changed
msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw Expand file tree Collapse file tree 7 files changed +56
-6
lines changed Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -71,6 +72,12 @@ public static List<UserType> userType() {
7172
7273 @ Test
7374 public void test_2572249_LTW_SSOAfterLTWUninstallIfAuthenticatorPresent () throws Throwable {
75+ if (BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" )) {
76+ // No longer applicable with V2 protocol.
77+ return ;
78+ }
79+
80+
7481 final String username = mLabAccount .getUsername ();
7582 final String password = mLabAccount .getPassword ();
7683
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -105,7 +106,13 @@ public void test_2572294_LTW_AuthenticatorHighestPriorityLTWAuthCP() throws Thro
105106
106107 msalTestApp .handleBackButton ();
107108 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
108- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
109+
110+ // Check flight, if v2 is enabled, LTW should have the highest priority.
111+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
112+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
113+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
114+
115+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
109116 }
110117
111118 @ Override
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -105,7 +106,13 @@ public void test_2584409_LTW_AuthenticatorHighestPriorityLTWCPAuth() throws Thro
105106
106107 msalTestApp .handleBackButton ();
107108 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
108- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
109+
110+ // Check flight, if v2 is enabled, LTW should have the highest priority.
111+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
112+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
113+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
114+
115+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
109116 }
110117
111118 @ Override
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -108,7 +109,13 @@ public void test_2584410_LTW_AuthenticatorHighestPriorityAuthLTWCP() throws Thro
108109
109110 msalTestApp .handleBackButton ();
110111 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
111- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
112+
113+ // Check flight, if v2 is enabled, LTW should have the highest priority.
114+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
115+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
116+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
117+
118+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
112119 }
113120
114121 @ Override
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -67,6 +68,7 @@ public static List<UserType> userType() {
6768 UserType .CLOUD
6869 );
6970 }
71+
7072 @ Test
7173 public void test_2584411_LTW_AuthenticatorHighestPriorityAuthCPLTW () throws Throwable {
7274 final String username = mLabAccount .getUsername ();
@@ -107,7 +109,13 @@ public void test_2584411_LTW_AuthenticatorHighestPriorityAuthCPLTW() throws Thro
107109
108110 msalTestApp .handleBackButton ();
109111 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
110- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
112+
113+ // Check flight, if v2 is enabled, LTW should have the highest priority.
114+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
115+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
116+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
117+
118+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
111119 }
112120
113121 @ Override
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -107,7 +108,13 @@ public void test_2584412_LTW_AuthenticatorHighestPriorityCPAuthLTW() throws Thro
107108
108109 msalTestApp .handleBackButton ();
109110 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
110- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
111+
112+ // Check flight, if v2 is enabled, LTW should have the highest priority.
113+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
114+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
115+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
116+
117+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
111118 }
112119
113120 @ Override
Original file line number Diff line number Diff line change 2424
2525import androidx .annotation .NonNull ;
2626
27+ import com .microsoft .identity .client .msal .automationapp .BuildConfig ;
2728import com .microsoft .identity .client .msal .automationapp .R ;
2829import com .microsoft .identity .client .msal .automationapp .testpass .broker .AbstractMsalBrokerTest ;
2930import com .microsoft .identity .client .ui .automation .annotations .LTWTests ;
@@ -107,7 +108,13 @@ public void test_2584414_LTW_AuthenticatorHighestPriorityCPLTWAuth() throws Thro
107108
108109 msalTestApp .handleBackButton ();
109110 final String activeBroker = msalTestApp .getActiveBrokerPackageName ();
110- Assert .assertEquals ("Active broker pkg name : " + BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME , activeBroker );
111+
112+ // Check flight, if v2 is enabled, LTW should have the highest priority.
113+ final String activeBrokerApp = BuildConfig .COPY_OF_LOCAL_FLIGHTS_FOR_TEST_PURPOSES .contains ("EnableBrokerDiscoveryV2Protocol:true" ) ?
114+ BrokerLTW .BROKER_LTW_APP_PACKAGE_NAME :
115+ BrokerMicrosoftAuthenticator .AUTHENTICATOR_APP_PACKAGE_NAME ;
116+
117+ Assert .assertEquals ("Active broker pkg name : " + activeBrokerApp , activeBroker );
111118 }
112119 @ Override
113120 public LabQuery getLabQuery () {
You can’t perform that action at this time.
0 commit comments