Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bot] Merge 24.11 to 24.12 #2185

Merged
merged 2 commits into from
Dec 10, 2024
Merged
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
2 changes: 2 additions & 0 deletions src/org/labkey/test/LabKeySiteWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,8 @@ public void clickProject(String project)
public void clickProject(String project, boolean assertDestination)
{
projectMenu().navigateToProject(project);
// After clicking menu item mouse could be left in a position that would be over an element that could have a pop-up.
mouseOut();
if (assertDestination)
{
acceptTermsOfUse(null, true);
Expand Down
25 changes: 16 additions & 9 deletions src/org/labkey/test/components/domain/DomainFormPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,28 @@ else if (fieldDefinition.getType().equals(FieldDefinition.ColumnType.Time))
else if (fieldDefinition.getType().equals(FieldDefinition.ColumnType.DateAndTime))
{

// Identify the part of the format that is the date and the part that is the time. Take into account
// a data format may include spaces (time does not).
String format = fieldDefinition.getFormat().trim();
int index = format.lastIndexOf(" ");
// Identify the part of the format that is the date and the part that is the time.
String formatStr = fieldDefinition.getFormat().trim();
int index = formatStr.indexOf(":");

if (format.substring(index + 1).contains(":"))
if (index == -1)
{
fieldRow.setDateTimeFormat(
DATE_FORMAT.get(format.substring(0, index)),
TIME_FORMAT.get(format.substring(index + 1)));
// If there is no ':' then it is a date only format.
fieldRow.setDateTimeFormat(DATE_FORMAT.get(formatStr));
}
else
{
fieldRow.setDateTimeFormat(DATE_FORMAT.get(format));
// Split the format into the date part and the time part. Take into account that the date part may
// have several spaces and the time part may have a space if there is an am/pm indicator.
// Find the last index of the ' ' before the ':'.
String tmpStr = formatStr.substring(0, index);
index = tmpStr.lastIndexOf(" ");

fieldRow.setDateTimeFormat(
DATE_FORMAT.get(formatStr.substring(0, index)),
TIME_FORMAT.get(formatStr.substring(index + 1)));
}

}
else
{
Expand Down
3 changes: 2 additions & 1 deletion src/org/labkey/test/tests/SimpleModuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ private void doTestTableAudit()

// check the row level audit details
popLocation();
waitForElement(Locator.linkWithText("vehicle.Models"));
selectSchema(VEHICLE_SCHEMA);
selectQuery(VEHICLE_SCHEMA, "Models");
assertElementPresent(Locator.linkWithText("view data"));
Expand Down Expand Up @@ -1214,7 +1215,7 @@ private void doTestReportCreatedDate()
{
log("Verify module report \"created\" date");
click(Locator.tag("span").withClass("fa-list-ul").notHidden());
waitForText("2015-08-01");
waitForText("August 01 2015");
}

@LogMethod
Expand Down
4 changes: 1 addition & 3 deletions src/org/labkey/test/tests/list/ListDateAndTimeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1113,11 +1113,9 @@ public void testInvalidDateAndTimeInsert() throws IOException, CommandException
* <p>
* Test setting the format property on a date-only, time-only and DateTime field.
* </p>
* @throws IOException Can be thrown by helper that checks if the list already exists.
* @throws CommandException Can be thrown by helper that checks if the list already exists.
*/
@Test
public void testDateAndTimeFormat() throws IOException, CommandException
public void testDateAndTimeFormat()
{
DATE_FORMAT dateFormat01 = DATE_FORMAT.Default;
TIME_FORMAT timeFormat01 = TIME_FORMAT.hh_mm_a;
Expand Down
Loading