use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkQCPage in project miso-lims by miso-lims.
the class BulkLibraryQCIT method testAutoUpdateConcentration.
@Test
public void testAutoUpdateConcentration() throws Exception {
// Goal: ensure that volume and volume units are updated by the QC
BulkQCPage page = getAddPage(Arrays.asList(2201L), 1);
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(QcColumns.DATE, "2018-07-10");
attrs.put(QcColumns.TYPE, "update concentration qc");
attrs.put(QcColumns.RESULT, "24.78");
fillRow(table, 0, attrs);
assertFalse(table.isWritable(QcColumns.LIBRARY_ALIAS, 0));
assertFalse(table.isWritable(QcColumns.UNITS, 0));
assertColumnValues(table, 0, attrs, "pre-save");
assertTrue(page.save(false));
LibraryQC saved = getLatestQc();
assertQCAttributes(attrs, saved);
assertEquals(String.format("Expected concentration to be updated to %s, instead got %f", "24.78", saved.getLibrary().getConcentration()), 0, saved.getLibrary().getConcentration().compareTo(new BigDecimal("24.78")));
assertEquals(String.format("Expected concentration units to be updated to %s, instead got %s", ConcentrationUnit.NANOMOLAR.getUnits(), saved.getLibrary().getConcentrationUnits().getUnits()), ConcentrationUnit.NANOMOLAR, saved.getLibrary().getConcentrationUnits());
}
use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkQCPage in project miso-lims by miso-lims.
the class BulkLibraryQCIT method testEditQcSetup.
@Test
public void testEditQcSetup() throws Exception {
// Goal: ensure all expected fields are present and no extra
Set<String> expectedHeadings = Sets.newHashSet();
expectedHeadings.addAll(qcColumns);
BulkQCPage page = getEditPage(Arrays.asList(2201L));
HandsOnTable table = page.getTable();
List<String> headings = table.getColumnHeadings();
assertEquals(expectedHeadings.size(), headings.size());
for (String col : expectedHeadings) {
assertTrue("Check for column: '" + col + "'", headings.contains(col));
}
assertEquals(1, table.getRowCount());
}
use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkQCPage in project miso-lims by miso-lims.
the class BulkPoolQCIT method testEditQcSetup.
@Test
public void testEditQcSetup() throws Exception {
// Goal: ensure all expected fields are present and no extra
Set<String> expectedHeadings = Sets.newHashSet();
expectedHeadings.addAll(qcColumns);
BulkQCPage page = getEditPage(Arrays.asList(2201L));
HandsOnTable table = page.getTable();
List<String> headings = table.getColumnHeadings();
assertEquals(expectedHeadings.size(), headings.size());
for (String col : expectedHeadings) {
assertTrue("Check for column: '" + col + "'", headings.contains(col));
}
assertEquals(1, table.getRowCount());
}
use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkQCPage in project miso-lims by miso-lims.
the class BulkPoolQCIT method testAutoUpdateVolume.
@Test
public void testAutoUpdateVolume() throws Exception {
// Goal: ensure that volume and volume units are updated by the QC
BulkQCPage page = getAddPage(Arrays.asList(2201L), 1);
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(QcColumns.DATE, "2018-07-10");
attrs.put(QcColumns.TYPE, "update volume qc");
attrs.put(QcColumns.RESULT, "10.43");
fillRow(table, 0, attrs);
assertFalse(table.isWritable(QcColumns.POOL_ALIAS, 0));
assertFalse(table.isWritable(QcColumns.UNITS, 0));
assertColumnValues(table, 0, attrs, "pre-save");
assertTrue(page.save(false));
PoolQC saved = getLatestQc();
assertQCAttributes(attrs, saved);
assertEquals(String.format("Expected volume to be updated to %s, instead got %f", "10.43", saved.getPool().getVolume()), 0, saved.getPool().getVolume().compareTo(new BigDecimal("10.43")));
assertEquals(String.format("Expected volume units to be updated to %s, instead got %s", VolumeUnit.MICROLITRES.getUnits(), saved.getPool().getVolumeUnits().getUnits()), VolumeUnit.MICROLITRES, saved.getPool().getVolumeUnits());
}
use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkQCPage in project miso-lims by miso-lims.
the class BulkSampleQCIT method testAddQc.
@Test
public void testAddQc() throws Exception {
// Goal: ensure a sample QC can be added
BulkQCPage page = getAddPage(Arrays.asList(2201L), 1);
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(QcColumns.DATE, "2018-07-10");
attrs.put(QcColumns.TYPE, "test edit qc");
attrs.put(QcColumns.RESULT, "32.6");
fillRow(table, 0, attrs);
assertFalse(table.isWritable(QcColumns.SAMPLE_ALIAS, 0));
assertFalse(table.isWritable(QcColumns.UNITS, 0));
assertColumnValues(table, 0, attrs, "pre-save");
assertTrue(page.save(false));
SampleQC saved = getLatestQc();
assertQCAttributes(attrs, saved);
}
Aggregations