use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSequencingOrderPage in project miso-lims by miso-lims.
the class BulkSequencingOrderIT method testCreateSetup.
@Test
public void testCreateSetup() {
BulkSequencingOrderPage page = BulkSequencingOrderPage.getForCreate(getDriver(), getBaseUrl(), Sets.newHashSet(120001L, 120002L, 120003L));
HandsOnTable table = page.getTable();
List<String> headings = table.getColumnHeadings();
List<String> expectedColumns = BulkSequencingOrderPage.Columns.all();
assertEquals(expectedColumns.size(), headings.size());
for (String col : expectedColumns) {
assertTrue("Check for column: '" + col + "'", headings.contains(col));
}
assertEquals(3, table.getRowCount());
}
use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSequencingOrderPage in project miso-lims by miso-lims.
the class BulkSequencingOrderIT method testCreate.
@Test
public void testCreate() {
BulkSequencingOrderPage page = BulkSequencingOrderPage.getForCreate(getDriver(), getBaseUrl(), Sets.newHashSet(120001L));
HandsOnTable table = page.getTable();
// test initial values
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(Columns.NAME, "IPO120001");
attrs.put(Columns.ALIAS, "1IPO_POOL_1");
assertColumnValues(table, 0, attrs, "initial");
// make changes
Map<String, String> changes = Maps.newLinkedHashMap();
changes.put(Columns.PURPOSE, "Production");
changes.put(Columns.INSTRUMENT_MODEL, "Illumina HiSeq 2500");
changes.put(Columns.CONTAINER_MODEL, "Generic 8-Lane Illumina Flow Cell");
changes.put(Columns.PARAMETERS, "1x151");
changes.put(Columns.PARTITIONS, "3");
changes.put(Columns.DESCRIPTION, "test");
fillRow(table, 0, changes);
changes.putAll(attrs);
assertColumnValues(table, 0, changes, "changes pre-save");
assertTrue(page.save(false));
HandsOnTable savedTable = page.getTable();
// not shown after save as it's not actually saved
changes.remove(Columns.INSTRUMENT_MODEL);
assertColumnValues(savedTable, 0, changes, "post-save");
Pool pool = (Pool) getSession().get(PoolImpl.class, 120001L);
@SuppressWarnings("unchecked") List<SequencingOrder> orders = getSession().createCriteria(SequencingOrderImpl.class).add(Restrictions.eq("pool", pool)).list();
assertEquals(1, orders.size());
assertEquals(changes.get(Columns.PARAMETERS), orders.get(0).getSequencingParameter().getName());
assertEquals(Integer.valueOf(3), orders.get(0).getPartitions());
assertEquals("test", orders.get(0).getDescription());
}
Aggregations