Skip to content
Merged
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
16 changes: 16 additions & 0 deletions src/org/labkey/test/tests/issues/IssuesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ public void generalTest() throws Exception
fields.add(new FieldDefinition("Note", new FieldDefinition.StringLookup("lists", getLookupTableName("issues", "Note"))));
fields.add(new FieldDefinition("Module", new FieldDefinition.StringLookup("lists", getLookupTableName("issues", "Module"))));

fields.add(new FieldDefinition("StringWithDefault", FieldDefinition.ColumnType.String));

clickProject(getProjectName());
waitAndClickAndWait(Locator.linkContainingText(ISSUE_SUMMARY_WEBPART_NAME));
IssuesAdminPage adminPage = _issuesHelper.goToAdmin();
Expand All @@ -272,6 +274,14 @@ public void generalTest() throws Exception
}
clickButton("Save");

// configure a string field with a default value
adminPage = _issuesHelper.goToAdmin();
adminPage.getFieldsPanel().getField("StringWithDefault")
.clickAdvancedSettings()
.clickDefaultValuesLink(); // should land us in
setFormElement(Locator.input("stringWithDefault"), "StringWithDefault (default value)");
clickButton("Save Defaults");

clickProject(getProjectName());
waitAndClickAndWait(Locator.linkContainingText(ISSUE_SUMMARY_WEBPART_NAME));

Expand All @@ -295,6 +305,9 @@ public void generalTest() throws Exception
if (!isElementPresent(fifthStringLocator))
fifthStringLocator = Locator.name("myfifthstring");
selectOptionByText(fifthStringLocator, "Polonium");
// clear out the default value on insert
setFormElement(Locator.name("stringWithDefault"), "");

clickButton("Save");

// find issueId - parse the text from first space to :
Expand All @@ -305,6 +318,7 @@ public void generalTest() throws Exception
"Milestone", "My Integer", "My Second Integer", "My First String", "My Third String", "My Fourth String", "My Fifth String");
assertTextNotPresent("MySecondString", "My Second String");
assertElementPresent(Locator.linkWithText("http://www.issues.test"));
assertTextNotPresent("StringWithDefault", "StringWithDefault (default value)");

// ListAction
clickAndWait(Locator.linkWithText("Issues List"));
Expand Down Expand Up @@ -596,6 +610,8 @@ public void requiredFieldsTest()
@Test
public void viewSelectedDetailsTest()
{


DataRegionTable issuesTable = new DataRegionTable(ISSUE_LIST_REGION_NAME, getDriver());

issuesTable.setFilter("Status", "Has Any Value", null);
Expand Down