Skip to content

Commit dc7ae47

Browse files
committed
Merge branch 'develop' into fb_chris_misc_issues
2 parents 445de90 + e5a42e4 commit dc7ae47

25 files changed

Lines changed: 1043 additions & 379 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Name: simpletest
2-
SchemaVersion: 25.000
2+
SchemaVersion: 25.001
33
SupportedDatabases: mssql, pgsql
44
ManageVersion: true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE UNIQUE INDEX AK_Name ON vehicle.Manufacturers (Name);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE UNIQUE INDEX AK_Name ON vehicle.Manufacturers (Name);

src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,21 @@ public Optional<WebElement> optionalWarningAlert()
255255
return elementCache().optionalWarningAlert();
256256
}
257257

258+
public void setActionComment(String comment)
259+
{
260+
elementCache().commentInput.sendKeys(comment);
261+
}
262+
263+
public void clearActionComment()
264+
{
265+
elementCache().commentInput.clear();
266+
}
267+
268+
public boolean isCommentInputPresent()
269+
{
270+
return elementCache().commentInputLocator.findOptionalElement(getDriver()).isPresent();
271+
}
272+
258273

259274
/**
260275
* Dialog that allows the user to set the genId value.
@@ -419,6 +434,9 @@ public final WebElement helpTarget(String divLabelText)
419434

420435
final Locator uniqueIdMsgLoc = Locator.tagWithClass("div", "uniqueid-msg");
421436

437+
public Locator.XPathLocator commentInputLocator = Locator.tagWithId("textarea", "actionComments");
438+
public WebElement commentInput = commentInputLocator.refindWhenNeeded(getDriver());
439+
422440
public List<Input> parentAliases()
423441
{
424442
return Input.Input(Locator.name("alias"), getDriver()).findAll(propertiesPanel);

src/org/labkey/test/components/ui/entities/EntityBulkUpdateDialog.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.labkey.test.BootstrapLocators;
55
import org.labkey.test.Locator;
66
import org.labkey.test.WebDriverWrapper;
7+
import org.labkey.test.WebTestHelper;
78
import org.labkey.test.components.Component;
89
import org.labkey.test.components.UpdatingComponent;
910
import org.labkey.test.components.bootstrap.ModalDialog;
@@ -262,11 +263,6 @@ public Integer getCountFromTitle()
262263

263264
// dismiss the dialog
264265

265-
public void clickEditWithGrid()
266-
{
267-
dismiss("Edit with Grid");
268-
}
269-
270266
public String clickUpdateExpectingError()
271267
{
272268
elementCache().updateButton.click();
@@ -279,7 +275,7 @@ public void clickUpdate()
279275
clickUpdate(false);
280276
}
281277

282-
public void clickUpdate(boolean skipChangeCounterCheck)
278+
public void clickUpdate(boolean skipAuditEventCheck)
283279
{
284280
Integer rowCount = getCountFromTitle();
285281

@@ -290,14 +286,14 @@ public void clickUpdate(boolean skipChangeCounterCheck)
290286
});
291287

292288
// check for the expected number of Data Changes in the latest audit event records
293-
AuditLogHelper auditLogHelper = new AuditLogHelper(getWrapper());
289+
AuditLogHelper auditLogHelper = new AuditLogHelper(getWrapper(), () -> WebTestHelper.getRemoteApiConnection(false));
294290
String auditEventName = auditLogHelper.getAuditEventNameFromURL();
295-
if (!skipChangeCounterCheck && auditEventName != null)
291+
if (!skipAuditEventCheck && auditEventName != null)
296292
{
297293
try
298294
{
299295
int changeCounter = auditLogHelper.isSourcesRoute() ? _changeCounter + 1 : _changeCounter; // Source updates include the name value in the diff (even when not changed)
300-
auditLogHelper.checkTimelineAuditEventDiffCountForLastTransaction(getWrapper().getCurrentContainerPath(), auditEventName, changeCounter, rowCount);
296+
auditLogHelper.checkAuditEventDiffCountForLastTransaction(getWrapper().getCurrentContainerPath(), auditEventName, changeCounter, rowCount);
301297
}
302298
catch (CommandException | IOException e)
303299
{

src/org/labkey/test/components/ui/grids/DetailTableEdit.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.labkey.test.BootstrapLocators;
66
import org.labkey.test.Locator;
77
import org.labkey.test.WebDriverWrapper;
8+
import org.labkey.test.WebTestHelper;
89
import org.labkey.test.components.Component;
910
import org.labkey.test.components.WebDriverComponent;
1011
import org.labkey.test.components.html.Checkbox;
@@ -503,7 +504,7 @@ public DetailDataPanel clickSave()
503504
return clickSave(false);
504505
}
505506

506-
public DetailDataPanel clickSave(boolean skipChangeCounterCheck)
507+
public DetailDataPanel clickSave(boolean skipAuditEventCheck)
507508
{
508509
String title = getSourceTitle();
509510
var componentEl = getComponentElement();
@@ -515,14 +516,14 @@ public DetailDataPanel clickSave(boolean skipChangeCounterCheck)
515516
.until(ExpectedConditions.stalenessOf(elementCache().saveButton));
516517

517518
// check for the expected number of Data Changes in the latest audit event records
518-
AuditLogHelper auditLogHelper = new AuditLogHelper(getWrapper());
519+
AuditLogHelper auditLogHelper = new AuditLogHelper(getWrapper(), () -> WebTestHelper.getRemoteApiConnection(false));
519520
String auditEventName = auditLogHelper.getAuditEventNameFromURL();
520-
if (!skipChangeCounterCheck && auditEventName != null)
521+
if (!skipAuditEventCheck && auditEventName != null)
521522
{
522523
try
523524
{
524525
int changeCounter = auditLogHelper.isSourcesRoute() ? _changeCounter + 1 : _changeCounter; // Source updates include the name value in the diff (even when not changed)
525-
auditLogHelper.checkTimelineAuditEventDiffCountForLastTransaction(getWrapper().getCurrentContainerPath(), auditEventName, changeCounter, 1);
526+
auditLogHelper.checkAuditEventDiffCountForLastTransaction(getWrapper().getCurrentContainerPath(), auditEventName, changeCounter, 1);
526527
}
527528
catch (CommandException | IOException e)
528529
{

src/org/labkey/test/components/ui/notifications/ServerNotificationItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ protected ElementCache newElementCache()
193193

194194
protected class ElementCache extends Component<?>.ElementCache
195195
{
196-
private final WebElement status = Locator.tagWithClass("i", "fa").refindWhenNeeded(this);
196+
private final WebElement status = Locator.byClass("fa").refindWhenNeeded(this);
197197
private final WebElement message = Locator.tagWithClass("span", "server-notification-message").refindWhenNeeded(this);
198198
private final WebElement date = Locator.tagWithClass("div", "server-notification-data").refindWhenNeeded(this);
199199
private final WebElement userName = Locator.tagWithClass("span", "server-notification-data").refindWhenNeeded(this);
200-
private final WebElement link = Locator.tagWithClass("span", "server-notifications-link").childTag("a").refindWhenNeeded(this);
200+
private final WebElement link = Locator.tag("a").refindWhenNeeded(this);
201201
}
202202

203203

src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ public final WebElement noNotificationsElement()
274274
public final WebElement markAll()
275275
{
276276
return Locator.tagWithClass("h3", "navbar-menu-header")
277-
.child(Locator.tagWithClass("div", "server-notifications-link"))
277+
.child(Locator.byClass("clickable-text"))
278278
.refindWhenNeeded(elementCache().menuContent);
279279
}
280280

281-
public final WebElement viewAllLink = Locator.tagWithText("div", "View all activity").refindWhenNeeded(this);
281+
public final WebElement viewAllLink = Locator.linkContainingText("View all activity").refindWhenNeeded(this);
282282

283283
}
284284

src/org/labkey/test/tests/AdvancedImportOptionsTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public class AdvancedImportOptionsTest extends BaseWebDriverTest implements Post
7171
private static final boolean EXPECTED_IMPORT_ERRORS = false;
7272
private static final int EXPECTED_COMPLETED_IMPORT_JOBS = 1;
7373
private static final int EXPECTED_COMPLETED_MULTI_FOLDER_JOBS = 2;
74-
private Boolean _studyDesignPreviouslyEnabled;
7574
private Boolean _advancedImportOptionsEnabled;
7675

7776
@Override
@@ -96,7 +95,6 @@ protected BrowserType bestBrowser()
9695
public static void doSetup()
9796
{
9897
AdvancedImportOptionsTest test = getCurrentTest();
99-
test._studyDesignPreviouslyEnabled = OptionalFeatureHelper.enableOptionalFeature(test.createDefaultConnection(), "studyDesignFlag");
10098
test._advancedImportOptionsEnabled = OptionalFeatureHelper.enableOptionalFeature(test.createDefaultConnection(), "advancedImportFlag");
10199
}
102100

@@ -108,8 +106,6 @@ public void doCleanup(boolean afterTest) throws TestTimeoutException
108106
_containerHelper.deleteProject(IMPORT_PROJECT_FILE02, false);
109107
_containerHelper.deleteProject(IMPORT_PROJECT_FILE03, false);
110108
_containerHelper.deleteProject(IMPORT_PROJECT_MULTI, false);
111-
if (_studyDesignPreviouslyEnabled != null)
112-
OptionalFeatureHelper.setOptionalFeature(createDefaultConnection(), "studyDesignFlag", _studyDesignPreviouslyEnabled);
113109

114110
if (_advancedImportOptionsEnabled != null)
115111
OptionalFeatureHelper.setOptionalFeature(createDefaultConnection(), "advancedImportFlag", _advancedImportOptionsEnabled);

0 commit comments

Comments
 (0)