Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/sync-repos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Designed to keep develop branch as a perfect copy of LabKey fork
name: Sync Repos

on:
workflow_dispatch:
schedule:
- cron: "15 */3 * * *"
jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.labkey.test.components.CustomizeView;
import org.labkey.test.components.ext4.ComboBox;
import org.labkey.test.components.ext4.RadioButton;
import org.labkey.test.components.ext4.Window;
import org.labkey.test.util.APIContainerHelper;
import org.labkey.test.util.AdvancedSqlTest;
import org.labkey.test.util.DataRegionTable;
Expand Down Expand Up @@ -651,7 +652,7 @@ private void overviewUITest()
assertElementPresent(Ext4Helper.Locators.menuItem("Upload/Import Data"));

waitAndClick(Ext4Helper.Locators.menuItem("Plan Sequence Run (Create Readsets)"));
waitForElement(Ext4Helper.Locators.window("Plan Sequence Run (Create Readsets)"));
new Window.WindowFinder(getDriver()).withTitle("Plan Sequence Run (Create Readsets)").waitFor();
waitAndClick(Ext4Helper.Locators.ext4Button("Close"));

}
Expand Down Expand Up @@ -852,13 +853,13 @@ private void dataSourcesTest() throws Exception
Ext4CmpRef addDataSourceBtn = _ext4Helper.queryOne("#" + manageDataSources + " button[text='Add Default Sources']", Ext4CmpRef.class);
waitAndClick(Locator.id(addDataSourceBtn.getId()));
waitAndClick(Ext4Helper.Locators.menuItem(DATA_SOURCE + " (\"/home\".core.Users)"));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));

addDataSourceBtn = _ext4Helper.queryOne("#" + manageDataSources + " button[text='Add Default Sources']", Ext4CmpRef.class);
waitAndClick(Locator.id(addDataSourceBtn.getId()));
waitAndClick(Ext4Helper.Locators.menuItem(GROUP_SOURCE + " (core.Groups)"));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));

waitForText("Item Type");
Expand All @@ -868,7 +869,7 @@ private void dataSourcesTest() throws Exception
Ext4CmpRef addDemographicsSourceBtn = _ext4Helper.queryOne("#" + manageDemographicsSources + " button[text='Add Default Sources']", Ext4CmpRef.class);
waitAndClick(Locator.id(addDemographicsSourceBtn.getId()));
waitAndClick(Ext4Helper.Locators.menuItem(SUBJECT_LIST + " (laboratory.subjects)"));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));

waitForText("Table Name");
Expand Down Expand Up @@ -990,7 +991,7 @@ private void deleteSourceByLabel(String label, String parentItemId)

List<Ext4CmpRef> removeBtns = _ext4Helper.componentQuery("#" + parentItemId + " button[text='Remove']", Ext4CmpRef.class);
click(Locator.id(removeBtns.get(idx.intValue()).getId()));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));

waitForText("Loading...");
Expand Down Expand Up @@ -1059,7 +1060,7 @@ private void settingsTest()
Assert.assertFalse("Radio was not toggled", (Boolean) Ext4FieldRef.getForBoxLabel(this, "View All Major Events").getValue());

click(Ext4Helper.Locators.ext4Button("Submit"));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));

//should redirect to lab home
Expand Down Expand Up @@ -1123,7 +1124,7 @@ private void settingsTest()
assertTrue("Incorrect value for samples checkbox", (Boolean)_ext4Helper.queryOne(samplesSelector, Ext4FieldRef.class).getValue());

click(Ext4Helper.Locators.ext4Button("Submit"));
waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
click(Ext4Helper.Locators.ext4Button("OK"));
}

Expand Down Expand Up @@ -1217,7 +1218,7 @@ private void workbookCreationTest()
_helper.goToLabHome();

_helper.clickNavPanelItem("View and Edit Workbooks:", "Create New Workbook");
waitForElement(Ext4Helper.Locators.window("Create Workbook"));
new Window.WindowFinder(getDriver()).withTitle("Create Workbook").waitFor();
assertElementNotPresent(Ext4Helper.Locators.ext4Radio("Add To Existing Workbook"));
waitForElement(Ext4Helper.Locators.ext4Button("Close"));
click(Ext4Helper.Locators.ext4Button("Close"));
Expand Down Expand Up @@ -1248,7 +1249,7 @@ private void workbookCreationTest()
sleep(150); //there's a buffer when committing changes
clickButton("Submit", 0);

waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
assertTextPresent("Your upload was successful");
_oligosTotal++;
clickButton("OK", 0);
Expand All @@ -1262,7 +1263,7 @@ private void dnaOligosTableTest()
_helper.goToLabHome();

_helper.clickNavPanelItem("DNA_Oligos:", IMPORT_DATA_TEXT);
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));

waitForElement(Locator.name("purification"));
Expand All @@ -1276,7 +1277,7 @@ private void dnaOligosTableTest()

_helper.goToLabHome();
_helper.clickNavPanelItem("DNA_Oligos:", IMPORT_DATA_TEXT);
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
waitForElement(Locator.name("purification"));
_ext4Helper.clickTabContainingText("Import Spreadsheet");
Expand All @@ -1287,7 +1288,7 @@ private void dnaOligosTableTest()
clickButton("Upload", 0);
_oligosTotal += 2;

waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
assertTextPresent("Success! 2 rows inserted.");
clickButton("OK");

Expand All @@ -1310,7 +1311,7 @@ private void samplesTableTest() throws Exception
_helper.goToLabHome();

_helper.clickNavPanelItem("Samples:", IMPORT_DATA_TEXT);
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));

waitForElement(Locator.name("samplename"));
Expand Down Expand Up @@ -1339,7 +1340,7 @@ private void samplesTableTest() throws Exception
_helper.setFormField("location", "Location1");
clickButton("Submit", 0);

waitForElement(Ext4Helper.Locators.window("Error"));
new Window.WindowFinder(getDriver()).withTitle("Error").waitFor();
waitForText("Cannot have a negative value for box_row");
clickButton("OK", 0);

Expand All @@ -1360,7 +1361,7 @@ private void samplesTableTest() throws Exception
dr.clickHeaderButton("Insert"); //collapse menu

dr.clickHeaderMenu("Insert", false, "Insert New");
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
waitForElement(Locator.name("samplename")); //ensure we're on the correct Ext4 override page
verifyFreezerColOrder();
Expand Down Expand Up @@ -1389,7 +1390,7 @@ private void samplesTableTest() throws Exception
dr.checkCheckbox(1);
dr.checkCheckbox(2);
dr.clickHeaderMenu("More Actions", false, "Duplicate/Derive Samples");
waitForElement(Ext4Helper.Locators.window("Duplicate/Derive Samples"));
new Window.WindowFinder(getDriver()).withTitle("Duplicate/Derive Samples").waitFor();
Ext4FieldRef.getForLabel(this, "Copies Per Sample").setValue(2);
File downloaded = clickAndWaitForDownload(Ext4Helper.Locators.ext4Button("Submit"));
Assert.assertTrue(downloaded.exists());
Expand Down Expand Up @@ -1449,7 +1450,7 @@ private void samplesTableTest() throws Exception
dr.checkCheckbox(2);
dr.clickHeaderMenu("More Actions", false, "Append Comment");

waitForElement(Ext4Helper.Locators.window("Append Comment"));
new Window.WindowFinder(getDriver()).withTitle("Append Comment").waitFor();
final String comment = "This is text I added";
Ext4FieldRef.getForLabel(this, "Comment").setValue(comment);
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
Expand All @@ -1465,7 +1466,7 @@ private void samplesTableTest() throws Exception
dr.checkCheckbox(1);
dr.clickHeaderMenu("More Actions", false, "Append Comment");

waitForElement(Ext4Helper.Locators.window("Append Comment"));
new Window.WindowFinder(getDriver()).withTitle("Append Comment").waitFor();
Ext4FieldRef.getForLabel(this, "Comment").setValue("This should append to the end");
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
dr = new DataRegionTable.DataRegionFinder(getDriver()).withName("query").find();
Expand All @@ -1484,7 +1485,7 @@ private void samplesTableTest() throws Exception
sampleId1 = dr.getDataAsText(1, dr.getColumnIndex("freezerid"));
sampleId2 = dr.getDataAsText(2, dr.getColumnIndex("freezerid"));
dr.clickHeaderMenu("More Actions", false, "Mark Removed");
waitForElement(Ext4Helper.Locators.window("Mark Removed"));
new Window.WindowFinder(getDriver()).withTitle("Mark Removed").waitFor();
Ext4FieldRef.getForLabel(this, "Date Removed").setValue("2017-01-02");
Ext4FieldRef.getForLabel(this, "Comment").setValue("I removed these samples");
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
Expand Down Expand Up @@ -1658,7 +1659,7 @@ private void insertDummySampleRow(String suffix)
sleep(150); //there's a buffer when committing changes
waitAndClick(Ext4Helper.Locators.ext4ButtonEnabled("Submit"));

waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
assertTextPresent("Your upload was successful");
_samplesTotal++;
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("OK"));
Expand All @@ -1672,7 +1673,7 @@ private void peptideTableTest() throws Exception
_helper.goToLabHome();

_helper.clickNavPanelItem("Peptides:", IMPORT_DATA_TEXT);
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));

waitForElement(Locator.name("sequence"));
Expand All @@ -1687,15 +1688,15 @@ private void peptideTableTest() throws Exception

//test error conditions in trigger script
String errorMsg = "Sequence can only contain valid amino acid characters: ARNDCQEGHILKMFPSTWYV*";
waitForElement(Ext4Helper.Locators.window("Error"));
new Window.WindowFinder(getDriver()).withTitle("Error").waitFor();
assertTextPresent(errorMsg);
clickButton("OK", 0);

_helper.setFormField("sequence", sequence);
sleep(150); //there's a buffer when committing changes
clickButton("Submit", 0);

waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
assertTextPresent("Your upload was successful");
_peptideTotal = 1;
clickButton("OK", 0);
Expand Down Expand Up @@ -1788,7 +1789,7 @@ private void defaultAssayImportMethodTest()
.selectComboBoxItem(defaultVal);
waitAndClick(Ext4Helper.Locators.ext4Button("Submit"));

waitForElement(Ext4Helper.Locators.window("Success"));
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("OK"));
waitForText("Types of Data");
_helper.goToAssayResultImport(GENOTYPING_ASSAYNAME, false);
Expand Down