Skip to content

Commit 5b8e526

Browse files
committed
fix(test): disable forced advanced auth in adminLoginAndValidate for WebView path
When useWebServerFlow=false, adminLoginAndValidate intends to start with the in-app WebView so it can reach the Login Options and Login for Admins menu items. But ensureRegularAuthServer was called without forceAdvancedAuthentication=false, so the SDK re-launched a Custom Tab over the WebView after the server re-selection. The Compose hierarchy was then behind the tab, causing openLoginOptions() to crash with "No compose hierarchies found in the app". Pass forceAdvancedAuthentication=useWebServerFlow so that the WebView path also clears the forced-advanced-auth flag, matching the in-app WebView surface that topBarPage (a plain LoginPageObject) expects to drive.
1 parent b4c41a0 commit 5b8e526

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • native/NativeSampleApps/AuthFlowTester/src/androidTest/java/com/salesforce/samples/authflowtester/testUtility

native/NativeSampleApps/AuthFlowTester/src/androidTest/java/com/salesforce/samples/authflowtester/testUtility/AuthFlowTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ abstract class AuthFlowTest {
468468
else LoginPageObject(composeTestRule)
469469
val chromePage = ChromeCustomTabPageObject(composeTestRule)
470470

471-
ensureRegularAuthServer(expectCustomTab = useWebServerFlow)
471+
ensureRegularAuthServer(expectCustomTab = useWebServerFlow, forceAdvancedAuthentication = useWebServerFlow)
472472

473473
// Reach Login Options via the top bar (back-out is a no-op on the WebView path).
474474
topBarPage.backOutToLoginActivity()

0 commit comments

Comments
 (0)