Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/org/labkey/test/BootstrapLocators.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public static Locator.XPathLocator button(String text)
return button().withText(text);
}

public static final String APP_USER_MENU_CLASS = "user-dropdown";
// Part of '@labkey/components/navigation/UserMenuGroup.tsx'
public static final Locator appUserMenu = Locator.byClass(APP_USER_MENU_CLASS);

// '@labkey/components/base/Alert.tsx'
public static final Locator infoBanner = Locator.tagWithClass("div", BannerType.INFO.getCss());
public static final Locator successBanner = Locator.tagWithClass("div", BannerType.SUCCESS.getCss());
Expand Down
5 changes: 2 additions & 3 deletions src/org/labkey/test/LabKeySiteWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import org.labkey.test.components.dumbster.EmailRecordTable;
import org.labkey.test.components.html.RadioButton;
import org.labkey.test.components.html.SiteNavBar;
import org.labkey.test.components.ui.navigation.UserMenu;
import org.labkey.test.pages.core.admin.CustomizeSitePage;
import org.labkey.test.pages.core.admin.ShowAdminPage;
import org.labkey.test.pages.core.login.SignInPage;
Expand Down Expand Up @@ -147,7 +146,7 @@ public void simpleSignIn()
{
beginAtAcceptingAlerts(buildURL("login", "login"));
waitForAnyElement("Should be on login or Home portal", Locator.id("email"), SiteNavBar.Locators.userMenu,
UserMenu.appUserMenu());
BootstrapLocators.appUserMenu);
}

if (PasswordUtil.getUsername().equals(getCurrentUser()))
Expand All @@ -162,7 +161,7 @@ public void simpleSignIn()
// verify we're signed in now
if (!waitFor(() ->
{
if(isElementPresent(UserMenu.appUserMenu()))
if (isElementPresent(BootstrapLocators.appUserMenu))
{
goToHome();
}
Expand Down
3 changes: 3 additions & 0 deletions src/org/labkey/test/components/ManageSampleStatusesPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import java.util.List;
import java.util.stream.Collectors;

/**
* Wraps 'components/samples/ManageSampleStatusesPanel.tsx'
*/
public class ManageSampleStatusesPanel extends WebDriverComponent<ManageSampleStatusesPanel.ElementCache>
{
private final WebDriver _driver;
Expand Down
10 changes: 10 additions & 0 deletions src/org/labkey/test/components/html/BootstrapMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@
public class BootstrapMenu extends BaseBootstrapMenu
{
/* componentElement should contain the toggle anchor *and* the UL containing list items */
public BootstrapMenu(WebElement componentElement, WebDriver driver)
{
super(componentElement, driver);
}

/**
* @deprecated Non-standard parameter order
*/
@Deprecated (since = "26.8")
public BootstrapMenu(WebDriver driver, WebElement componentElement)
{
super(componentElement, driver);
}


static public BootstrapMenuFinder finder(WebDriver driver)
{
return new BootstrapMenuFinder(driver);
Expand Down
135 changes: 0 additions & 135 deletions src/org/labkey/test/components/ui/navigation/NavBar.java

This file was deleted.

67 changes: 0 additions & 67 deletions src/org/labkey/test/components/ui/navigation/UserMenu.java

This file was deleted.

46 changes: 46 additions & 0 deletions src/org/labkey/test/pages/experiment/DeleteDataClassPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.labkey.test.pages.experiment;

import org.labkey.test.Locator;
import org.labkey.test.pages.LabKeyPage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;


public class DeleteDataClassPage extends LabKeyPage<DeleteDataClassPage.ElementCache>
{
public DeleteDataClassPage(WebDriver driver)
{
super(driver);
}

public void confirmDelete()
{
clickAndWait(elementCache().deleteButton);
}

@Override
protected ElementCache newElementCache()
{
return new ElementCache();
}

protected class ElementCache extends LabKeyPage<?>.ElementCache
{
WebElement deleteButton = Locator.lkButton("Confirm Delete").findWhenNeeded(this);
}
}
70 changes: 70 additions & 0 deletions src/org/labkey/test/pages/experiment/ShowDataClassPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright (c) 2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.labkey.test.pages.experiment;

import org.labkey.test.Locator;
import org.labkey.test.WebDriverWrapper;
import org.labkey.test.WebTestHelper;
import org.labkey.test.pages.LabKeyPage;
import org.labkey.test.util.DataRegionTable;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.Map;

public class ShowDataClassPage extends LabKeyPage<ShowDataClassPage.ElementCache>
{
public ShowDataClassPage(WebDriver driver)
{
super(driver);
}

public static ShowDataClassPage beginAt(WebDriverWrapper webDriverWrapper, String containerPath, int rowId)
{
webDriverWrapper.beginAt(WebTestHelper.buildURL("experiment", containerPath, "showDataClass", Map.of("rowId", rowId)));
return new ShowDataClassPage(webDriverWrapper.getDriver());
}

public CreateDataClassPage clickEditDataClass()
{
clickAndWait(elementCache().editDataClassButton);
return new CreateDataClassPage(getDriver());
}

public DeleteDataClassPage clickDeleteDataClass()
{
clickAndWait(elementCache().deleteDataClassButton);
return new DeleteDataClassPage(getDriver());
}

public DataRegionTable getDataRegion()
{
return elementCache()._dataRegionTable;
}

@Override
protected ElementCache newElementCache()
{
return new ElementCache();
}

protected class ElementCache extends LabKeyPage<ElementCache>.ElementCache
{
private final WebElement editDataClassButton = Locator.lkButton("Edit Data Class").findWhenNeeded(this);
private final WebElement deleteDataClassButton = Locator.lkButton("Delete Data Class").findWhenNeeded(this);
private final DataRegionTable _dataRegionTable = new DataRegionTable.DataRegionFinder(getDriver()).withName("query").findWhenNeeded(this);
}
}
Loading