Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-chrisj committed Feb 20, 2024
2 parents f93d33c + da03dae commit de100fe
Show file tree
Hide file tree
Showing 27 changed files with 219 additions and 301 deletions.
1 change: 1 addition & 0 deletions data/api/EmbeddedQueryWebPart.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="queryTestDiv1"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
+function(){
new LABKEY.QueryWebPart({
Expand Down
1 change: 1 addition & 0 deletions data/api/buttonCustomizationCustomizer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="queryTestDiv1"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
LABKEY.requiresExt3ClientAPI(function() {
var qwp1 = new LABKEY.QueryWebPart({
Expand Down
1 change: 1 addition & 0 deletions data/api/buttonCustomizationEcho.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="params"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
var html = "";
var parameters = LABKEY.ActionURL.getParameters();
Expand Down
1 change: 1 addition & 0 deletions data/api/executeSql.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div><input type="button" value="Execute SQL" id="button_loadqwp"/></div>
<div id="qwp-div">Query Web Part DIV</div>

<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
LABKEY.Utils.onReady(function() {
document.getElementById('button_loadqwp')['onclick'] = loadQWP;
Expand Down
1 change: 1 addition & 0 deletions data/api/extIntegrationTest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="testDiv"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
LABKEY.requiresExt4Sandbox(function() {
var generateData = function(n, floor) {
Expand Down
1 change: 1 addition & 0 deletions data/api/filterTest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="17021"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">

LABKEY.requiresExt3ClientAPI(function() {
Expand Down
92 changes: 0 additions & 92 deletions data/api/folderTest.html

This file was deleted.

1 change: 1 addition & 0 deletions data/api/webdavTest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="testDiv"></div>
<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">
LABKEY.requiresExt3ClientAPI(function(){
var div = Ext.get('testDiv');
Expand Down
1 change: 1 addition & 0 deletions data/api/workbookAPITest.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<div id='deleteWorkbookDiv'></div><br>
<button id="runButton">RunAPITest</button>

<!-- Used as HTML wiki source, so nonce is NOT required -->
<script type="text/javascript">


Expand Down
Binary file modified data/studies/SpecimenCustomizeStudy.folder.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion modules/editableModule/resources/views/webpart.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>This is a web part view in the simple test module.</p>
<a id="testlink" href="<%=contextPath%>/project<%=containerPath%>/begin.view">begin</a>
<a id="testlink" href="<%=contextPath%><%=containerPath%>/project-begin.view">begin</a>
<script type="text/javascript" nonce="<%=scriptNonce%>">
var webpart=<%=webpartContext%>;
</script>
4 changes: 2 additions & 2 deletions modules/simpletest/resources/views/testCustomLogin.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<label for="email">Email</label>
<input id="email" name="email" type="text" class="input-block" tabindex="1" >
<label for="password">
Password <a href="login-resetPassword.view?">(forgot password)</a>
Password <a href="login-resetPassword.view">(forgot password)</a>
</label>
<input id="password" name="password" type="password" class="input-block" tabindex="2" autofocus>
<input type=checkbox name="remember" id="remember" checked>
Expand All @@ -17,7 +17,7 @@
<div class="auth-header auth-item">Terms of Use</div>
<div class="toucontent auth-item termsOfUseContent"></div>
<div class="auth-item">
<input type="checkbox" name="approvedTermsOfUse" id="approvedTermsOfUse" class="auth-item" unchecked>
<input type="checkbox" name="approvedTermsOfUse" id="approvedTermsOfUse" class="auth-item">
<label for="approvedTermsOfUse">I agree to these terms</label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<label for="email">Email</label>
<input id="email" name="email" type="text" class="input-block" tabindex="1" >
<label for="password">
Password <a href="login-resetPassword.view?">(forgot password)</a>
Password <a href="login-resetPassword.view">(forgot password)</a>
</label>
<input id="password" name="password" type="password" class="input-block" tabindex="2" autofocus>
<input type=checkbox name="remember" id="remember" checked>
Expand All @@ -18,12 +18,12 @@
<div class="auth-header auth-item">Terms of Use</div>
<div class="toucontent auth-item termsOfUseContent"></div>
<div class="auth-item">
<input type="checkbox" name="approvedTermsOfUse" id="approvedTermsOfUse" class="auth-item" unchecked>
<input type="checkbox" name="approvedTermsOfUse" id="approvedTermsOfUse" class="auth-item">
<label for="approvedTermsOfUse">I agree to these terms</label>
</div>
</div>
<input type="hidden" name="termsOfUseType" id="termsOfUseType">
<input type="hidden" id="returnUrl" name="returnUrl" value="<%=contextPath%>/project/Shared/start.view">
<input type="hidden" id="returnUrl" name="returnUrl" value="<%=contextPath%>/Shared/project-start.view">
<div class="auth-item auth-credentials-submit">
<input type="submit" tab-index="-1" style="position: absolute; left: -9999px; width: 1px; height: 1px;" class="loginSubmitButton"/>
<a class="labkey-button primary signin-btn"><span>Sign In</span></a>
Expand Down
21 changes: 9 additions & 12 deletions src/org/labkey/test/components/ui/FilterStatusValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public WebDriver getDriver()

public String getText()
{
return elementCache().textSpan().getText();
return elementCache().textSpan.getText();
}

private boolean isActive()
Expand All @@ -52,16 +52,16 @@ public void remove()
getWrapper().mouseOver(getComponentElement());
getWrapper().mouseOver(elementCache().icon);
WebDriverWrapper.waitFor(()-> isActive() && isClose(),
"the filter status item with text ["+getText()+"] did not become active", 500);
"The filter status item with text ["+getText()+"] did not become active.", 500);
elementCache().icon.click();

// if the item you're dismissing is not the rightmost, it won't become stale; instead, its text will
// If the item you're dismissing is not the rightmost, it won't become stale; instead, its text will
// be swapped out with the one to its right. So, we check to see that either the text has changed or
// the item became stale.
WebDriverWrapper.waitFor(()-> {
return ExpectedConditions.stalenessOf(getComponentElement()).apply(getDriver())
|| !getText().equals(originalText);
}, "the value item ["+originalText+"] did not disappear", 1000);
// the item became stale. ExpectedConditions.textToBePresentInElement returns false if element is stale.
WebDriverWrapper.waitFor(()-> ExpectedConditions.not(
ExpectedConditions.textToBePresentInElement(elementCache().textSpan, originalText))
.apply(getDriver())
, "The value item ["+originalText+"] did not disappear.", 1000);
}

/**
Expand All @@ -82,10 +82,7 @@ protected ElementCache newElementCache()

protected class ElementCache extends Component<?>.ElementCache
{
public WebElement textSpan()
{
return Locator.tag("span").findElement(getComponentElement());
}
public final WebElement textSpan = Locator.tag("span").refindWhenNeeded(getComponentElement());

public final WebElement icon = Locator.tag("i").findWhenNeeded(getComponentElement());
}
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/test/tests/AdminConsoleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void testRibbonBar()
waitForElement(Locator.xpath("//div[contains(text(), 'Cannot enable the ribbon message without providing a message to show')]"));

String linkText = "and also click this...";
String html = "READ ME!!! <a href='<%=contextPath%>/project/home/begin.view'>" + linkText + "</a>";
String html = "READ ME!!! <a href='<%=contextPath%>" + "/home/project-begin.view'>" + linkText + "</a>";

//only check if not already checked
checkbox = Locator.checkboxByName("showRibbonMessage").findElement(getDriver());
Expand All @@ -84,7 +84,7 @@ public void testRibbonBar()
Locator ribbonLink = Locator.tagWithClassContaining("div", "alert").append(Locator.linkContainingText("and also click this..."));
assertElementPresent(ribbonLink);
String href = ribbonLink.findElement(getDriver()).getAttribute("href");
String expected = WebTestHelper.getBaseURL() + "/project/home/begin.view";
String expected = WebTestHelper.getBaseURL() + "/home/project-begin.view";
assertEquals("Incorrect URL", expected, href);

goToHome();
Expand Down
3 changes: 1 addition & 2 deletions src/org/labkey/test/tests/BaseTermsOfUseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ public List<String> getAssociatedModules()

protected void goToProjectBegin(String projectName)
{
beginAt("project/" + projectName + "/begin.view?");
beginAt(projectName + "/project-begin.view");
}

}
2 changes: 1 addition & 1 deletion src/org/labkey/test/tests/ContainerContextTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public void testIssue15751() throws Exception
insertJobIntoSubFolder(SUB_FOLDER_B);

log("** Viewing pipeline status from project container. Sort by Description (report name) and include sub-folders");
beginAt("/pipeline-status/" + getProjectName() + "/showList.view?StatusFiles.sort=Description&StatusFiles.containerFilterName=CurrentAndSubfolders");
beginAt("/" + getProjectName() + "/pipeline-status-showList.view?StatusFiles.sort=Description&StatusFiles.containerFilterName=CurrentAndSubfolders");

log("** Checking URLs go to correct container...");
String href = getAttribute(Locator.tagWithText("a", "COMPLETE").index(0), "href");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class CrossSiteScriptingForDeleteTest extends BaseWebDriverTest
{
protected static final String PROJECT_NAME = "CrossSiteScriptingForDeleteTest";
protected static final String REPORT_NAME = BaseWebDriverTest.INJECT_CHARS_1;
private static final String LINK_REPORT_URL = "/project/home/begin.view";
private static final String LINK_REPORT_URL = "/home/project-begin.view";

@BeforeClass
public static void initTest()
Expand Down
6 changes: 3 additions & 3 deletions src/org/labkey/test/tests/FileAttachmentColumnTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private void doSetup()

private void createList()
{
beginAt("/project/" + getProjectName() +"/"+ FOLDER_NAME + "/begin.view?");
beginAt(getProjectName() + "/" + FOLDER_NAME + "/project-begin.view");
clickTab("Portal");

ListHelper listHelper = new ListHelper(getDriver());
Expand Down Expand Up @@ -130,7 +130,7 @@ private void createList()

private void createSampleType()
{
beginAt("/project/" + getProjectName() +"/"+ FOLDER_NAME + "/begin.view?");
beginAt(getProjectName() + "/" + FOLDER_NAME + "/project-begin.view");
clickTab("Portal");

PortalHelper portalHelper = new PortalHelper(getDriver());
Expand Down Expand Up @@ -160,7 +160,7 @@ private void createSampleType()
@Before
public void preTest()
{
beginAt("/project/" + getProjectName() +"/"+ FOLDER_NAME + "/begin.view?");
beginAt(getProjectName() + "/" + FOLDER_NAME + "/project-begin.view");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/tests/JUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private static TestSuite _suite(Predicate<Map<String,Object>> accept, boolean sk
CloseableHttpResponse response = null;
try (CloseableHttpClient client = WebTestHelper.getHttpClient())
{
final String url = WebTestHelper.getBaseURL() + "/junit-testlist.view?";
final String url = WebTestHelper.getBaseURL() + "/junit-testlist.view";
HttpGet method = new HttpGet(url);
try
{
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/tests/NonStudyReportsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class NonStudyReportsTest extends ReportTest
private static final String DISCUSSION_BODY_3 = "Editing a discussion response";
private static final String LINK_REPORT1_NAME = "Link report 1" + BaseWebDriverTest.INJECT_CHARS_2;
private static final String LINK_REPORT1_DESCRIPTION = "Link report 1" + BaseWebDriverTest.INJECT_CHARS_2;
private static final String LINK_REPORT1_URL = "/project/home/begin.view";
private static final String LINK_REPORT1_URL = "/home/project-begin.view";
private static final String LINK_REPORT2_NAME = "Link report 2" + BaseWebDriverTest.INJECT_CHARS_2;
private static final String LINK_REPORT2_DESCRIPTION = "This link report points links to an external page.";
protected final PortalHelper portalHelper = new PortalHelper(this);
Expand Down
32 changes: 16 additions & 16 deletions src/org/labkey/test/tests/SecurityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,23 @@ public void testSteps() throws IOException
protected void cantReachAdminToolFromUserAccount()
{
final String historyTabTitle = "History:";
final Set<String> unreachableUrls = new HashSet<>(Arrays.asList("/admin/showAdmin.view?", "/user/showUsers.view?",
"/security/group.view?group=Administrators", "/security/group.view?group=Developers",
"/user/showUsers.view?", "/security/project.view?returnUrl=%2Fuser%2FshowUsers.view%3F", "/admin/createFolder.view?",
"/analytics/begin.view?", "/login/configure.view?", "/admin/customizeEmail.view?", "/admin/filesSiteSettings.view?",
"/admin/projectSettings.view?", "/flow/flowAdmin.view?", "/admin/reorderFolders.view?", "/admin/customizeSite.view?",
"/core/configureReportsAndScripts.view?", "/audit/showAuditLog.view?", "/search/admin.view?",
"/ms2/showMS2Admin.view?", "/experiment-types/begin.view?", "/pipeline-status/showList.view?",
"/pipeline/setup.view?", "/ms2/showProteinAdmin.view?", "/admin/actions.view?", "/admin/caches.view?",
"/admin/dbChecker.view?", "/query/dataSourceAdmin.view?", "/admin/dumpHeap.view?", "/admin/environmentVariables.view?",
"/admin/memTracker.view?", "/admin/queries.view?", "/admin/resetErrorMark.view?", "/admin/showThreads.view?",
"/admin-sql/scripts.view?", "/admin/systemProperties.view?", "/admin/emailTest.view?", "/admin/showAllErrors.view?",
"/admin/showErrorsSinceMark.view?", "/admin/showPrimaryLog.view?",
final Set<String> unreachableUrls = new HashSet<>(Arrays.asList("/admin-showAdmin.view", "/user-showUsers.view",
"/security-group.view?group=Administrators", "/security-group.view?group=Developers",
"/user-showUsers.view", "/security-project.view?returnUrl=%2Fuser%2FshowUsers.view%3F", "/admin-createFolder.view",
"/analytics-begin.view", "/login-configure.view", "/admin-customizeEmail.view", "/admin-filesSiteSettings.view",
"/admin-projectSettings.view", "/flow-flowAdmin.view", "/admin-reorderFolders.view", "/admin-customizeSite.view",
"/core-configureReportsAndScripts.view", "/audit-showAuditLog.view", "/search-admin.view",
"/ms2-showMS2Admin.view", "/experiment-types-begin.view", "/pipeline-status-showList.view",
"/pipeline-setup.view", "/ms2-showProteinAdmin.view", "/admin-actions.view", "/admin-caches.view",
"/admin-dbChecker.view", "/query-dataSourceAdmin.view", "/admin-dumpHeap.view", "/admin-environmentVariables.view",
"/admin-memTracker.view", "/admin-queries.view", "/admin-resetErrorMark.view", "/admin-showThreads.view",
"/admin-sql-scripts.view", "/admin-systemProperties.view", "/admin-emailTest.view", "/admin-showAllErrors.view",
"/admin-showErrorsSinceMark.view", "/admin-showPrimaryLog.view",

/* Management actions shouldn't be reachable by non-admins */
"/admin-missingValues.view", "/admin-manageFolders.view", "/admin-moduleProperties.view", "/admin-concepts.view",
"/search-searchSettings.view", "/admin-notifications.view", "/admin-exportFolder.view", "/admin-importFolder.view",
"/admin-fileRoots.view", "/admin-folderInformation.view"
"/admin-missingValues.view", "/admin-manageFolders.view", "/admin-moduleProperties.view", "/admin-concepts.view",
"/search-searchSettings.view", "/admin-notifications.view", "/admin-exportFolder.view", "/admin-importFolder.view",
"/admin-fileRoots.view", "/admin-folderInformation.view"
));


Expand Down Expand Up @@ -430,7 +430,7 @@ protected void checkGroupMembership(String userName, String groupName, int expec
@LogMethod
protected void tokenAuthenticationTest() throws IOException
{
beginAt("/project/SecurityVerifyProject/begin.view?");
beginAt("/SecurityVerifyProject/project-begin.view");
String homePageUrl = removeUrlParameters(getURL().toString()); // Absolute URL for redirect, get rid of '?'
String relUrl = getCurrentRelativeURL();
boolean newSchool = relUrl.contains("project-");
Expand Down
Loading

0 comments on commit de100fe

Please sign in to comment.