Skip to content

Commit 9c4774b

Browse files
authored
Test fixes for disabling browser access with keystore flight enabled, Fixes AB#3039504 (#2181)
Fixes for disabling browser access operation when keystore flight is enabled. - Skipped the install cert operation when the flight is enabled - Removed the step from LTW tests as the test cases are verifying passthrough communication is working fine, which is being verified with multiple other operations. [AB#3039504](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3039504)
1 parent 6b5b42a commit 9c4774b

File tree

6 files changed

+7
-20
lines changed

6 files changed

+7
-20
lines changed

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582294.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ public void test_2582294() throws Throwable{
8181
final String state = brokerHostWithoutBrokerSelection.getDeviceState();
8282
Assert.assertTrue("Assert that the device state is true", state.contains("true"));
8383

84-
// click on "install cert" button
85-
// popup to select certificate type is shown
86-
// Choose "Vpn and app user cert" and click on ok
87-
// popup with name of cert is shown. let the default name be there. Upon clicking on ok, a toast message with "Certificate is installed" is shown
88-
brokerHostWithoutBrokerSelection.enableBrowserAccess(username);
89-
9084
// click on "get wpj upn" button
9185
// You should see the upn with which we performed join
9286
final String upn = brokerHostWithoutBrokerSelection.getAccountUpn();

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582295.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ public void test_2582295() throws Throwable{
8282
final String state = brokerHostWithoutBrokerSelection.getDeviceState();
8383
Assert.assertTrue("Assert that the device state is true", state.contains("true"));
8484

85-
// click on "install cert" button
86-
// popup to select certificate type is shown
87-
// Choose "Vpn and app user cert" and click on ok
88-
// popup with name of cert is shown. let the default name be there. Upon clicking on ok, a toast message with "Certificate is installed" is shown
89-
brokerHostWithoutBrokerSelection.enableBrowserAccess(username);
90-
9185
// click on "get wpj upn" button
9286
// You should see the upn with which we performed join
9387
final String upn = brokerHostWithoutBrokerSelection.getAccountUpn();

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582296.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ public void test_2582296() {
9999
final String state = brokerHostWithoutBrokerSelection.multipleWpjApiFragment.getDeviceState(username);
100100
Assert.assertTrue(state.contains("DEVICE_VALID"));
101101

102-
// Click on "Install certificate" button
103-
brokerHostWithoutBrokerSelection.multipleWpjApiFragment.installCertificate(username);
104-
105102
// Click on "Get device token" button
106103
final String token = brokerHostWithoutBrokerSelection.multipleWpjApiFragment.getDeviceToken(username);
107104
Assert.assertTrue(!TextUtils.isEmpty(token.replace("Device token:", "")));

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/ltw/TestCase2582297.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ public void test_2582297() throws Throwable {
101101
final String state = brokerHostWithoutBrokerSelection.multipleWpjApiFragment.getDeviceState(username);
102102
Assert.assertTrue(state.contains("DEVICE_VALID"));
103103

104-
// Click on "Install certificate" button
105-
brokerHostWithoutBrokerSelection.multipleWpjApiFragment.installCertificate(username);
106-
107104
// Click on "Get device token" button
108105
final String token = brokerHostWithoutBrokerSelection.multipleWpjApiFragment.getDeviceToken(username);
109106
Assert.assertTrue(!TextUtils.isEmpty(token.replace("Device token:", "")));

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/mwpj/TestCase2519783.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import com.microsoft.identity.labapi.utilities.constants.AzureEnvironment
3434
import com.microsoft.identity.labapi.utilities.constants.TempUserType
3535
import com.microsoft.identity.labapi.utilities.constants.UserType
3636
import org.junit.Assert
37+
import org.junit.Assume
3738
import org.junit.Before
3839
import org.junit.Test
3940

@@ -81,6 +82,8 @@ class TestCase2519783 : AbstractMsalBrokerTest() {
8182
fun before() {
8283
mUsGovAccount = mLabClient.getLabAccount(getUsGovLabQuery())
8384
mBrokerHostApp = broker as BrokerHost
85+
Assume.assumeFalse( "EnableKeyStoreKeyFactory flight is set, Test will be skipped",
86+
mBrokerHostApp.flights.contains("\"EnableKeyStoreKeyFactory\":\"true\""));
8487
mBrokerHostApp.enableMultipleWpj()
8588
}
8689

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/mwpj/TestCase2563668.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ class TestCase2563668 : AbstractMsalBrokerTest() , ICustomBrokerInstallationTest
8181
Assert.assertTrue(claims.containsKey("deviceid"))
8282
Assert.assertEquals(deviceIdObtainedUsingLegacyBroker, claims["deviceid"])
8383

84-
//Install certificate
85-
mBrokerHostApp.multipleWpjApiFragment.installCertificate(mLabAccount.username)
84+
if (!mBrokerHostApp.flights.contains("\"EnableKeyStoreKeyFactory\":\"true\"")) {
85+
//Install certificate
86+
mBrokerHostApp.multipleWpjApiFragment.installCertificate(mLabAccount.username)
87+
}
8688

8789
//Get device state
8890
val deviceState = mBrokerHostApp.multipleWpjApiFragment.getDeviceState(mLabAccount.username)

0 commit comments

Comments
 (0)