Search in sources :

Example 1 with BulkSamplePage

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage in project miso-lims by miso-lims.

the class BulkSampleCreateIT method testCreateIdentitySetup.

@Test
public void testCreateIdentitySetup() throws Exception {
    // Goal: ensure all expected fields are present and no extra
    BulkSamplePage page = getCreatePage(1, null, SampleIdentity.CATEGORY_NAME);
    HandsontableUtils.testTableSetup(page, identityColumns, 1);
}
Also used : BulkSamplePage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage) Test(org.junit.Test)

Example 2 with BulkSamplePage

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage in project miso-lims by miso-lims.

the class BulkSampleCreateIT method testCreateOneSingleCellAliquotNoProject.

@Test
public void testCreateOneSingleCellAliquotNoProject() throws Exception {
    // Goal: ensure one Single Cell DNA (aliquot) can be saved
    BulkSamplePage page = getCreatePage(1, null, SampleAliquot.CATEGORY_NAME);
    HandsOnTable table = page.getTable();
    Map<String, String> aliquot = new LinkedHashMap<>();
    aliquot.put(SamColumns.DESCRIPTION, "Description");
    aliquot.put(SamColumns.RECEIVE_DATE, "2017-07-17");
    aliquot.put(SamColumns.RECEIVED_FROM, "University Health Network - BioBank");
    aliquot.put(SamColumns.RECEIVED_BY, "TestGroupOne");
    aliquot.put(SamColumns.RECEIPT_CONFIRMED, "True");
    aliquot.put(SamColumns.RECEIPT_QC_PASSED, "True");
    aliquot.put(SamColumns.RECEIPT_QC_NOTE, "");
    // increment
    aliquot.put(SamColumns.ID_BARCODE, "111");
    aliquot.put(SamColumns.SAMPLE_CLASS, "Single Cell DNA (aliquot)");
    aliquot.put(SamColumns.SAMPLE_TYPE, "GENOMIC");
    aliquot.put(SamColumns.SCIENTIFIC_NAME, "Homo sapiens");
    aliquot.put(SamColumns.PROJECT, "PONE");
    aliquot.put(SamColumns.GROUP_ID, "1");
    aliquot.put(SamColumns.GROUP_DESCRIPTION, "Test one");
    aliquot.put(SamColumns.TISSUE_ORIGIN, "Bn (Brain)");
    aliquot.put(SamColumns.TISSUE_TYPE, "P (Primary tumour)");
    aliquot.put(SamColumns.PASSAGE_NUMBER, "");
    aliquot.put(SamColumns.TIMES_RECEIVED, "1");
    aliquot.put(SamColumns.TUBE_NUMBER, "1");
    aliquot.put(SamColumns.SECONDARY_ID, "tube id 1");
    aliquot.put(SamColumns.TISSUE_MATERIAL, "FFPE");
    aliquot.put(SamColumns.REGION, "Medulla oblongata");
    aliquot.put(SamColumns.STR_STATUS, "Submitted");
    aliquot.put(SamColumns.VOLUME, "10.0");
    aliquot.put(SamColumns.CONCENTRATION, "3.75");
    aliquot.put(SamColumns.QC_STATUS, "Ready");
    aliquot.put(SamColumns.PURPOSE, "Library");
    aliquot.put(SamColumns.INITIAL_CELL_CONC, "12.34");
    aliquot.put(SamColumns.DIGESTION, "abcde");
    aliquot.put(SamColumns.TARGET_CELL_RECOVERERY, "23.45");
    aliquot.put(SamColumns.CELL_VIABILITY, "34.56");
    aliquot.put(SamColumns.LOADING_CELL_CONC, "45.67");
    aliquot.forEach((k, v) -> table.enterText(k, 0, v));
    // need to enter this here, after project is entered otherwise identity lookup fails
    // increment
    aliquot.put(SamColumns.EXTERNAL_NAME, "ext11");
    table.enterText(SamColumns.EXTERNAL_NAME, 0, aliquot.get(SamColumns.EXTERNAL_NAME));
    assertIdentityLookupWasSuccessful(table, 0);
    assertTrue(page.save(false));
    HandsOnTable savedTable = page.getTable();
    // verify attributes against what got saved to the database
    assertAllForSingleCellAliquot(aliquot, getIdForRow(savedTable, 0), true);
}
Also used : HandsOnTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.HandsOnTable) BulkSamplePage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Example 3 with BulkSamplePage

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage in project miso-lims by miso-lims.

the class BulkSampleCreateIT method testCreateOneGdnaStockNoProject.

@Test
public void testCreateOneGdnaStockNoProject() throws Exception {
    // Goal: ensure one gDNA (stock) can be saved
    BulkSamplePage page = getCreatePage(1, null, SampleStock.CATEGORY_NAME);
    HandsOnTable table = page.getTable();
    Map<String, String> gDnaStock = new LinkedHashMap<>();
    gDnaStock.put(SamColumns.DESCRIPTION, "Description");
    gDnaStock.put(SamColumns.RECEIVE_DATE, "2017-07-17");
    gDnaStock.put(SamColumns.RECEIVED_FROM, "University Health Network - BioBank");
    gDnaStock.put(SamColumns.RECEIVED_BY, "TestGroupOne");
    gDnaStock.put(SamColumns.RECEIPT_CONFIRMED, "True");
    gDnaStock.put(SamColumns.RECEIPT_QC_PASSED, "True");
    gDnaStock.put(SamColumns.RECEIPT_QC_NOTE, "");
    // increment
    gDnaStock.put(SamColumns.ID_BARCODE, "107");
    gDnaStock.put(SamColumns.SAMPLE_CLASS, "gDNA (stock)");
    gDnaStock.put(SamColumns.SAMPLE_TYPE, "GENOMIC");
    gDnaStock.put(SamColumns.SCIENTIFIC_NAME, "Homo sapiens");
    gDnaStock.put(SamColumns.PROJECT, "PONE");
    gDnaStock.put(SamColumns.GROUP_ID, "1");
    gDnaStock.put(SamColumns.GROUP_DESCRIPTION, "Test one");
    gDnaStock.put(SamColumns.TISSUE_ORIGIN, "Bn (Brain)");
    gDnaStock.put(SamColumns.TISSUE_TYPE, "P (Primary tumour)");
    gDnaStock.put(SamColumns.PASSAGE_NUMBER, "");
    gDnaStock.put(SamColumns.TIMES_RECEIVED, "1");
    gDnaStock.put(SamColumns.TUBE_NUMBER, "1");
    gDnaStock.put(SamColumns.SECONDARY_ID, "tube id 1");
    gDnaStock.put(SamColumns.TISSUE_MATERIAL, "FFPE");
    gDnaStock.put(SamColumns.REGION, "Medulla oblongata");
    gDnaStock.put(SamColumns.STR_STATUS, "Submitted");
    gDnaStock.put(SamColumns.VOLUME, "10.0");
    gDnaStock.put(SamColumns.CONCENTRATION, "3.75");
    gDnaStock.put(SamColumns.QC_STATUS, "Ready");
    gDnaStock.forEach((k, v) -> table.enterText(k, 0, v));
    // need to enter this here, after project is entered otherwise identity lookup fails
    // increment
    gDnaStock.put(SamColumns.EXTERNAL_NAME, "ext7");
    table.enterText(SamColumns.EXTERNAL_NAME, 0, gDnaStock.get(SamColumns.EXTERNAL_NAME));
    assertIdentityLookupWasSuccessful(table, 0);
    assertTrue(page.save(false));
    HandsOnTable savedTable = page.getTable();
    // verify attributes against what got saved to the database
    assertAllForStock(gDnaStock, getIdForRow(savedTable, 0), true);
}
Also used : HandsOnTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.HandsOnTable) BulkSamplePage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Example 4 with BulkSamplePage

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage in project miso-lims by miso-lims.

the class BulkSampleCreateIT method testCreateOneRnaStockNoProject.

@Test
public void testCreateOneRnaStockNoProject() throws Exception {
    // Goal: ensure whole RNA (stock) can be saved
    BulkSamplePage page = getCreatePage(1, null, SampleStock.CATEGORY_NAME);
    HandsOnTable table = page.getTable();
    Map<String, String> rnaStock = new LinkedHashMap<>();
    rnaStock.put(SamColumns.DESCRIPTION, "Description");
    rnaStock.put(SamColumns.RECEIVE_DATE, "2017-07-17");
    rnaStock.put(SamColumns.RECEIVED_FROM, "University Health Network - BioBank");
    rnaStock.put(SamColumns.RECEIVED_BY, "TestGroupOne");
    rnaStock.put(SamColumns.RECEIPT_CONFIRMED, "True");
    rnaStock.put(SamColumns.RECEIPT_QC_PASSED, "True");
    rnaStock.put(SamColumns.RECEIPT_QC_NOTE, "");
    // increment
    rnaStock.put(SamColumns.ID_BARCODE, "109");
    rnaStock.put(SamColumns.SAMPLE_CLASS, "whole RNA (stock)");
    rnaStock.put(SamColumns.SAMPLE_TYPE, "GENOMIC");
    rnaStock.put(SamColumns.SCIENTIFIC_NAME, "Homo sapiens");
    rnaStock.put(SamColumns.PROJECT, "PONE");
    rnaStock.put(SamColumns.GROUP_ID, "1");
    rnaStock.put(SamColumns.GROUP_DESCRIPTION, "Test one");
    rnaStock.put(SamColumns.TISSUE_ORIGIN, "Bn (Brain)");
    rnaStock.put(SamColumns.TISSUE_TYPE, "P (Primary tumour)");
    rnaStock.put(SamColumns.PASSAGE_NUMBER, "");
    rnaStock.put(SamColumns.TIMES_RECEIVED, "1");
    rnaStock.put(SamColumns.TUBE_NUMBER, "1");
    rnaStock.put(SamColumns.SECONDARY_ID, "tube id 1");
    rnaStock.put(SamColumns.TISSUE_MATERIAL, "FFPE");
    rnaStock.put(SamColumns.REGION, "Medulla oblongata");
    rnaStock.put(SamColumns.STR_STATUS, "Submitted");
    rnaStock.put(SamColumns.DNASE_TREATED, "True");
    rnaStock.put(SamColumns.VOLUME, "10.0");
    rnaStock.put(SamColumns.CONCENTRATION, "3.75");
    rnaStock.put(SamColumns.QC_STATUS, "Ready");
    rnaStock.forEach((k, v) -> table.enterText(k, 0, v));
    // need to enter this here, after project is entered otherwise identity lookup fails
    // increment
    rnaStock.put(SamColumns.EXTERNAL_NAME, "ext9");
    table.enterText(SamColumns.EXTERNAL_NAME, 0, rnaStock.get(SamColumns.EXTERNAL_NAME));
    assertIdentityLookupWasSuccessful(table, 0);
    assertTrue(page.save(false));
    HandsOnTable savedTable = page.getTable();
    // verify attributes against what got saved to the database
    assertAllForRnaStock(rnaStock, getIdForRow(savedTable, 0), true);
}
Also used : HandsOnTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.HandsOnTable) BulkSamplePage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Example 5 with BulkSamplePage

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage in project miso-lims by miso-lims.

the class BulkSampleCreateIT method testCreateOneGdnaAliquotNoProject.

@Test
public void testCreateOneGdnaAliquotNoProject() throws Exception {
    // Goal: ensure one gDNA (aliquot) can be saved
    BulkSamplePage page = getCreatePage(1, null, SampleAliquot.CATEGORY_NAME);
    HandsOnTable table = page.getTable();
    Map<String, String> gDnaAliquot = new LinkedHashMap<>();
    gDnaAliquot.put(SamColumns.DESCRIPTION, "Description");
    gDnaAliquot.put(SamColumns.RECEIVE_DATE, "2017-07-17");
    gDnaAliquot.put(SamColumns.RECEIVED_FROM, "University Health Network - BioBank");
    gDnaAliquot.put(SamColumns.RECEIVED_BY, "TestGroupOne");
    gDnaAliquot.put(SamColumns.RECEIPT_CONFIRMED, "True");
    gDnaAliquot.put(SamColumns.RECEIPT_QC_PASSED, "True");
    gDnaAliquot.put(SamColumns.RECEIPT_QC_NOTE, "");
    // increment
    gDnaAliquot.put(SamColumns.ID_BARCODE, "111");
    gDnaAliquot.put(SamColumns.SAMPLE_CLASS, "gDNA (aliquot)");
    gDnaAliquot.put(SamColumns.SAMPLE_TYPE, "GENOMIC");
    gDnaAliquot.put(SamColumns.SCIENTIFIC_NAME, "Homo sapiens");
    gDnaAliquot.put(SamColumns.PROJECT, "PONE");
    gDnaAliquot.put(SamColumns.GROUP_ID, "1");
    gDnaAliquot.put(SamColumns.GROUP_DESCRIPTION, "Test one");
    gDnaAliquot.put(SamColumns.TISSUE_ORIGIN, "Bn (Brain)");
    gDnaAliquot.put(SamColumns.TISSUE_TYPE, "P (Primary tumour)");
    gDnaAliquot.put(SamColumns.PASSAGE_NUMBER, "");
    gDnaAliquot.put(SamColumns.TIMES_RECEIVED, "1");
    gDnaAliquot.put(SamColumns.TUBE_NUMBER, "1");
    gDnaAliquot.put(SamColumns.SECONDARY_ID, "tube id 1");
    gDnaAliquot.put(SamColumns.TISSUE_MATERIAL, "FFPE");
    gDnaAliquot.put(SamColumns.REGION, "Medulla oblongata");
    gDnaAliquot.put(SamColumns.STR_STATUS, "Submitted");
    gDnaAliquot.put(SamColumns.VOLUME, "10.0");
    gDnaAliquot.put(SamColumns.CONCENTRATION, "3.75");
    gDnaAliquot.put(SamColumns.QC_STATUS, "Ready");
    gDnaAliquot.put(SamColumns.PURPOSE, "Library");
    gDnaAliquot.forEach((k, v) -> table.enterText(k, 0, v));
    // need to enter this here, after project is entered otherwise identity lookup fails
    // increment
    gDnaAliquot.put(SamColumns.EXTERNAL_NAME, "ext11");
    table.enterText(SamColumns.EXTERNAL_NAME, 0, gDnaAliquot.get(SamColumns.EXTERNAL_NAME));
    assertIdentityLookupWasSuccessful(table, 0);
    assertTrue(page.save(false));
    HandsOnTable savedTable = page.getTable();
    // verify attributes against what got saved to the database
    assertAllForAliquot(gDnaAliquot, getIdForRow(savedTable, 0), true);
}
Also used : HandsOnTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.HandsOnTable) BulkSamplePage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)58 BulkSamplePage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkSamplePage)58 HandsOnTable (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.HandsOnTable)48 LinkedHashMap (java.util.LinkedHashMap)31 HashMap (java.util.HashMap)8 Project (uk.ac.bbsrc.tgac.miso.core.data.Project)8 ProjectImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.ProjectImpl)8 SampleStock (uk.ac.bbsrc.tgac.miso.core.data.SampleStock)2 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)2 SampleStockImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockImpl)2 SampleTissueImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl)2 Sample (uk.ac.bbsrc.tgac.miso.core.data.Sample)1 SampleAliquot (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot)1 SampleIdentity (uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity)1 SampleSlide (uk.ac.bbsrc.tgac.miso.core.data.SampleSlide)1 SampleTissueProcessing (uk.ac.bbsrc.tgac.miso.core.data.SampleTissueProcessing)1 SampleAliquotImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)1 SampleIdentityImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleIdentityImpl)1 SampleImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleImpl)1 SampleSlideImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleSlideImpl)1