Skip to content

Commit 2e7328b

Browse files
authored
Merge pull request #47 from LabKey/fb_merge_discvr-20.7
Merge discvr-20.7 to develop
2 parents cca0d13 + 94a4768 commit 2e7328b

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

.github/workflows/sync-repos.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Designed to keep develop branch as a perfect copy of LabKey fork
2+
name: Sync Repos
3+
24
on:
5+
workflow_dispatch:
36
schedule:
47
- cron: "15 */3 * * *"
58
jobs:

LDK/test/src/org/labkey/test/tests/external/labModules/LabModulesTest.java

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.labkey.test.components.CustomizeView;
4343
import org.labkey.test.components.ext4.ComboBox;
4444
import org.labkey.test.components.ext4.RadioButton;
45+
import org.labkey.test.components.ext4.Window;
4546
import org.labkey.test.util.APIContainerHelper;
4647
import org.labkey.test.util.AdvancedSqlTest;
4748
import org.labkey.test.util.DataRegionTable;
@@ -651,7 +652,7 @@ private void overviewUITest()
651652
assertElementPresent(Ext4Helper.Locators.menuItem("Upload/Import Data"));
652653

653654
waitAndClick(Ext4Helper.Locators.menuItem("Plan Sequence Run (Create Readsets)"));
654-
waitForElement(Ext4Helper.Locators.window("Plan Sequence Run (Create Readsets)"));
655+
new Window.WindowFinder(getDriver()).withTitle("Plan Sequence Run (Create Readsets)").waitFor();
655656
waitAndClick(Ext4Helper.Locators.ext4Button("Close"));
656657

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

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

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

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

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

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

10611062
click(Ext4Helper.Locators.ext4Button("Submit"));
1062-
waitForElement(Ext4Helper.Locators.window("Success"));
1063+
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
10631064
click(Ext4Helper.Locators.ext4Button("OK"));
10641065

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

11251126
click(Ext4Helper.Locators.ext4Button("Submit"));
1126-
waitForElement(Ext4Helper.Locators.window("Success"));
1127+
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
11271128
click(Ext4Helper.Locators.ext4Button("OK"));
11281129
}
11291130

@@ -1217,7 +1218,7 @@ private void workbookCreationTest()
12171218
_helper.goToLabHome();
12181219

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

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

12641265
_helper.clickNavPanelItem("DNA_Oligos:", IMPORT_DATA_TEXT);
1265-
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
1266+
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
12661267
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
12671268

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

12771278
_helper.goToLabHome();
12781279
_helper.clickNavPanelItem("DNA_Oligos:", IMPORT_DATA_TEXT);
1279-
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
1280+
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
12801281
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
12811282
waitForElement(Locator.name("purification"));
12821283
_ext4Helper.clickTabContainingText("Import Spreadsheet");
@@ -1287,7 +1288,7 @@ private void dnaOligosTableTest()
12871288
clickButton("Upload", 0);
12881289
_oligosTotal += 2;
12891290

1290-
waitForElement(Ext4Helper.Locators.window("Success"));
1291+
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
12911292
assertTextPresent("Success! 2 rows inserted.");
12921293
clickButton("OK");
12931294

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

13121313
_helper.clickNavPanelItem("Samples:", IMPORT_DATA_TEXT);
1313-
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
1314+
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
13141315
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
13151316

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

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

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

13621363
dr.clickHeaderMenu("Insert", false, "Insert New");
1363-
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
1364+
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
13641365
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
13651366
waitForElement(Locator.name("samplename")); //ensure we're on the correct Ext4 override page
13661367
verifyFreezerColOrder();
@@ -1389,7 +1390,7 @@ private void samplesTableTest() throws Exception
13891390
dr.checkCheckbox(1);
13901391
dr.checkCheckbox(2);
13911392
dr.clickHeaderMenu("More Actions", false, "Duplicate/Derive Samples");
1392-
waitForElement(Ext4Helper.Locators.window("Duplicate/Derive Samples"));
1393+
new Window.WindowFinder(getDriver()).withTitle("Duplicate/Derive Samples").waitFor();
13931394
Ext4FieldRef.getForLabel(this, "Copies Per Sample").setValue(2);
13941395
File downloaded = clickAndWaitForDownload(Ext4Helper.Locators.ext4Button("Submit"));
13951396
Assert.assertTrue(downloaded.exists());
@@ -1449,7 +1450,7 @@ private void samplesTableTest() throws Exception
14491450
dr.checkCheckbox(2);
14501451
dr.clickHeaderMenu("More Actions", false, "Append Comment");
14511452

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

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

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

16741675
_helper.clickNavPanelItem("Peptides:", IMPORT_DATA_TEXT);
1675-
waitForElement(Ext4Helper.Locators.window(IMPORT_DATA_TEXT));
1676+
new Window.WindowFinder(getDriver()).withTitle(IMPORT_DATA_TEXT).waitFor();
16761677
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
16771678

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

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

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

1698-
waitForElement(Ext4Helper.Locators.window("Success"));
1699+
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
16991700
assertTextPresent("Your upload was successful");
17001701
_peptideTotal = 1;
17011702
clickButton("OK", 0);
@@ -1788,7 +1789,7 @@ private void defaultAssayImportMethodTest()
17881789
.selectComboBoxItem(defaultVal);
17891790
waitAndClick(Ext4Helper.Locators.ext4Button("Submit"));
17901791

1791-
waitForElement(Ext4Helper.Locators.window("Success"));
1792+
new Window.WindowFinder(getDriver()).withTitle("Success").waitFor();
17921793
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("OK"));
17931794
waitForText("Types of Data");
17941795
_helper.goToAssayResultImport(GENOTYPING_ASSAYNAME, false);

0 commit comments

Comments
 (0)