From d4e7c2ea31eec8b2a1c552cd2ada2f075e98d65a Mon Sep 17 00:00:00 2001 From: labkey-sweta Date: Mon, 4 Dec 2023 21:14:17 -0800 Subject: [PATCH] Automation test update for Issue 49206: Update TOTPAuthenticationTest to expect disabled configurations (#1743) --- src/org/labkey/test/components/react/MultiMenu.java | 1 - .../labkey/test/pages/core/login/LoginConfigurePage.java | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/components/react/MultiMenu.java b/src/org/labkey/test/components/react/MultiMenu.java index ae42d5c63c..fab4d88f9c 100644 --- a/src/org/labkey/test/components/react/MultiMenu.java +++ b/src/org/labkey/test/components/react/MultiMenu.java @@ -254,7 +254,6 @@ public MultiMenuFinder withButtonIcon(String iconClass) _locator = Locators.menuContainer().withChild(BootstrapMenu.Locators.dropdownToggle().withChild(Locator.byClass(iconClass))); return this; } - @Override protected MultiMenuFinder getThis() { diff --git a/src/org/labkey/test/pages/core/login/LoginConfigurePage.java b/src/org/labkey/test/pages/core/login/LoginConfigurePage.java index ae8dbc9586..5dadb41880 100644 --- a/src/org/labkey/test/pages/core/login/LoginConfigurePage.java +++ b/src/org/labkey/test/pages/core/login/LoginConfigurePage.java @@ -71,6 +71,12 @@ public boolean canAddSecondaryConfiguration() return elementCache().secondaryMenuFinder.findOptional(getDriver()).isPresent(); } + public boolean isSecondaryConfOptionEnabled(String option) + { + toggleSecondaryConfiguration(); + return !elementCache().addSecondaryMenu.isMenuItemDisabled(option); + } + private boolean isPrimarySelected() { return elementCache().panelTab1.getAttribute("aria-selected").equals("true"); @@ -197,7 +203,7 @@ protected class ElementCache extends LabKeyPage.ElementCache BootstrapMenu addPrimaryMenu = primaryMenuFinder.findWhenNeeded(this); MultiMenu.MultiMenuFinder secondaryMenuFinder = new MultiMenu.MultiMenuFinder(getDriver()) .withText("Add New Secondary Configuration").timeout(WAIT_FOR_JAVASCRIPT); - BootstrapMenu addSecondaryMenu = secondaryMenuFinder.findWhenNeeded(this); + MultiMenu addSecondaryMenu = secondaryMenuFinder.findWhenNeeded(this); WebElement globalSettingsPanel() {