Skip to content

Fix data region column name references #168

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

Merged
merged 4 commits into from
Jul 2, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void verifyExperimentWebpart(int row, String description, @Nullable St
assertEquals(description, table.getDataAsText(row, "Description"));
if (type != null)
{
assertEquals(type, table.getDataAsText(row, "ExperimentType"));
assertEquals(type, table.getDataAsText(row, "ExperimentTypeId"));
}

// Make sure each component of the ParentExperiments column is rendered with a link to the begin page for that experiment
Expand Down
48 changes: 24 additions & 24 deletions genotyping/test/src/org/labkey/test/tests/HaplotypeAssayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ private void verifyAribitraryHaplotypeAssay()
clickAndWait(Locator.linkWithText(DRB_RUN));
DataRegionTable drt = new DataRegionTable("Data", this);

verifyColumnDataValues(drt, "MHC-AHaplotype1", "A001", "A023", "A001", "A004", "A002a");
verifyColumnDataValues(drt, "MHC-AHaplotype2", "A023", "A021", "A001", "A023", "A002a");
verifyColumnDataValues(drt, "MHC-DRB Haplotype 1", "D025a", "D012b", "D001c", "D012b", "D002");
verifyColumnDataValues(drt, "MHC-DRB Haplotype 2", "D015c", "D017a", "D017a", "D012b", "D002");
verifyColumnDataValues(drt, "mhcAHaplotype1", "A001", "A023", "A001", "A004", "A002a");
verifyColumnDataValues(drt, "mhcAHaplotype2", "A023", "A021", "A001", "A023", "A002a");
verifyColumnDataValues(drt, "mhcDRBHaplotype1", "D025a", "D012b", "D001c", "D012b", "D002");
verifyColumnDataValues(drt, "mhcDRBHaplotype2", "D015c", "D017a", "D017a", "D012b", "D002");

importRun(STR_RUN, DRB_ASSAY, STR_RUN_FILE, true);

Expand Down Expand Up @@ -286,13 +286,13 @@ private void verifyFirstRun()
verifyColumnDataValues(drt, "Animal", "ID-1", "ID-2", "ID-3", "ID-4", "ID-5");
verifyColumnDataValues(drt, "TotalReads", "1000", "2000", "3000", "4000", "5000");
verifyColumnDataValues(drt, "IdentifiedReads", "300", "1000", "600", "2500", "3250");
verifyColumnDataValues(drt, "%Unknown", "70.0", "50.0", "80.0", "37.5", "35.0");
verifyColumnDataValues(drt, "MHC-AHaplotype1", "A001", "A023", "A001", "A004", "A002a");
verifyColumnDataValues(drt, "MHC-AHaplotype2", "A023", "A021", "A001", "A023", "A002a");
verifyColumnDataValues(drt, "MHC-BHaplotype1", "B015c", "B012b", "B001c", "B012b", "B002");
verifyColumnDataValues(drt, "MHC-BHaplotype2", "B025a", "B017a", "B017a", "B012b", "B002");
verifyColumnDataValues(drt, "PercentUnknown", "70.0", "50.0", "80.0", "37.5", "35.0");
verifyColumnDataValues(drt, "mhcAHaplotype1", "A001", "A023", "A001", "A004", "A002a");
verifyColumnDataValues(drt, "mhcAHaplotype2", "A023", "A021", "A001", "A023", "A002a");
verifyColumnDataValues(drt, "mhcBHaplotype1", "B015c", "B012b", "B001c", "B012b", "B002");
verifyColumnDataValues(drt, "mhcBHaplotype2", "B025a", "B017a", "B017a", "B012b", "B002");
verifyColumnDataValues(drt, "Enabled", "true", "true", "true", "true", "true");
verifyColumnDataValues(drt, "ClientAnimalId", "x123", "x234", "x345", "x456", "x567");
verifyColumnDataValues(drt, "AnimalId/ClientAnimalId", "x123", "x234", "x345", "x456", "x567");

// verify concatenated haplotype strings
List<String> concatenated = drt.getColumnDataAsText("ConcatenatedHaplotypes");
Expand All @@ -307,8 +307,8 @@ private void verifyFirstRun()
goToQuery("Animal");
drt = new DataRegionTable("query", this);
assertEquals("Unexpected number of Animal records", 5, drt.getDataRowCount());
verifyColumnDataValues(drt, "Lab Animal Id", "ID-1", "ID-2", "ID-3", "ID-4", "ID-5");
verifyColumnDataValues(drt, "Client Animal Id", "x123", "x234", "x345", "x456", "x567");
verifyColumnDataValues(drt, "LabAnimalId", "ID-1", "ID-2", "ID-3", "ID-4", "ID-5");
verifyColumnDataValues(drt, "ClientAnimalId", "x123", "x234", "x345", "x456", "x567");

verifyHaplotypeRecordsByType(11, 5, 6);
}
Expand All @@ -325,7 +325,7 @@ private void verifySecondRun()

// validate extra column in view
DataRegionTable drt = new DataRegionTable("Data", this);
verifyColumnDataValues(drt, "ClientAnimalId", "x456", "x567", "x678", "x789", "x888", "x999");
verifyColumnDataValues(drt, "AnimalId/ClientAnimalId", "x456", "x567", "x678", "x789", "x888", "x999");

// verify that the animal and haplotype rows were properly inserted
goToQuery("Animal");
Expand All @@ -344,11 +344,11 @@ private void verifySecondRun(String prefix)
verifyColumnDataValues(drt, "Animal", "ID-4", "ID-5", "ID-6", "ID-7", "ID-8", "ID-9");
verifyColumnDataValues(drt, "TotalReads", "4000", "5000", "6000", "7000", " ", "0");
verifyColumnDataValues(drt, "IdentifiedReads", "2500", "3250", "3000", "3500", " ", "1");
verifyColumnDataValues(drt, "%Unknown", "37.5", "35.0", "50.0", "50.0", " ", " ");
verifyColumnDataValues(drt, prefix+"-AHaplotype1", "A001", " ", "A033", "A004", "A004", "A004");
verifyColumnDataValues(drt, prefix+"-AHaplotype2", "A023", " ", "A033", " ", "A004", "A004");
verifyColumnDataValues(drt, prefix+"-BHaplotype1", "B015c", " ", "B012b", "B033", "B033", "B033");
verifyColumnDataValues(drt, prefix+"-BHaplotype2", "B025a", " ", "B012b", "B033", "B033", "B033");
verifyColumnDataValues(drt, "PercentUnknown", "37.5", "35.0", "50.0", "50.0", " ", " ");
verifyColumnDataValues(drt, prefix+"AHaplotype1", "A001", " ", "A033", "A004", "A004", "A004");
verifyColumnDataValues(drt, prefix+"AHaplotype2", "A023", " ", "A033", " ", "A004", "A004");
verifyColumnDataValues(drt, prefix+"BHaplotype1", "B015c", " ", "B012b", "B033", "B033", "B033");
verifyColumnDataValues(drt, prefix+"BHaplotype2", "B025a", " ", "B012b", "B033", "B033", "B033");
verifyColumnDataValues(drt, "Enabled", "true", "true", "true", "true", "true", "true");

// verify concatenated haplotype strings
Expand Down Expand Up @@ -398,14 +398,14 @@ private void verifyExtraHaplotypeAssignment()
waitForElement(Locator.paginationText(1, 39, 39));

// ADD: animal ID-5, haplotype A001
DataRegionTable.findDataRegion(this).clickInsertNewRow();
DataRegionTable.DataRegion(getDriver()).find().clickInsertNewRow();
selectOptionByText(Locator.name("quf_HaplotypeId"), "A001");
selectOptionByText(Locator.name("quf_AnimalAnalysisId"), animalAnalysisId);
setFormElement(Locator.name("quf_DiploidNumber"), "1");
clickButton("Submit");

// ADD: animal ID-5, haplotype B002
DataRegionTable.findDataRegion(this).clickInsertNewRow();
DataRegionTable.DataRegion(getDriver()).find().clickInsertNewRow();
selectOptionByText(Locator.name("quf_HaplotypeId"), "B002");
selectOptionByText(Locator.name("quf_AnimalAnalysisId"), animalAnalysisId);
setFormElement(Locator.name("quf_DiploidNumber"), "1");
Expand All @@ -416,10 +416,10 @@ private void verifyExtraHaplotypeAssignment()
goToAssayRun("first run");
drt = new DataRegionTable("Data", this);
drt.setFilter("AnimalId", "Equals", "ID-5");
verifyColumnDataValues(drt, "MHC-AHaplotype1", "A001");
verifyColumnDataValues(drt, "MHC-AHaplotype2", "A002a");
verifyColumnDataValues(drt, "MHC-BHaplotype1", "B002");
verifyColumnDataValues(drt, "MHC-BHaplotype2", "B002");
verifyColumnDataValues(drt, "mhcAHaplotype1", "A001");
verifyColumnDataValues(drt, "mhcAHaplotype2", "A002a");
verifyColumnDataValues(drt, "mhcBHaplotype1", "B002");
verifyColumnDataValues(drt, "mhcBHaplotype2", "B002");
drt.clearFilter("AnimalId");

// NOTE: this should clean up what it has done in order to make the test more modular...
Expand Down