Search in sources :

Example 1 with ListPage

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

the class ListTablesIT method testIndexDistanceToolSetup.

@Test
public void testIndexDistanceToolSetup() throws Exception {
    // Goal: ensure all expected columns are present and no extra
    login();
    Set<String> indicesColumns = Sets.newHashSet(Columns.FAMILY, Columns.INDEX_NAME, Columns.SEQUENCE, Columns.POSITION);
    ListPage page = ListPage.getListPage(getDriver(), getBaseUrl(), "tools/indexdistance");
    DataTable table = page.getTable();
    Set<String> expected = indicesColumns;
    // Checkbox column
    expected.add(Columns.SELECTOR);
    // Platform column
    expected.add(Columns.PLATFORM);
    List<String> headings = table.getColumnHeadings();
    assertEquals("number of columns", expected.size(), headings.size());
    for (String col : indicesColumns) {
        assertTrue("Check for column: '" + col + "'", headings.contains(col));
    }
}
Also used : AbstractListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage) ListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage) DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable) Test(org.junit.Test)

Example 2 with ListPage

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

the class ListTablesIT method testWarningNormal.

private void testWarningNormal(String target, String query, String warning, String column) {
    ListPage page = getList(target);
    DataTable table = page.getTable();
    table.searchFor(query);
    assertTrue(String.format("'%s' column does not contain '%s' warning", column, warning), table.doesColumnContainTooltip(column, warning));
}
Also used : AbstractListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage) ListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage) DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable)

Example 3 with ListPage

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

the class ListTablesIT method testColumnsSort.

private void testColumnsSort(String listTarget, boolean skipLogin) {
    // confirm that sortable columns can be sorted on
    if (!skipLogin) {
        login();
    }
    ListPage page = getList(listTarget);
    sortColumns(page.getTable(), page);
}
Also used : AbstractListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage) ListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage)

Example 4 with ListPage

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

the class ListTablesIT method testPageSetup.

private void testPageSetup(String listTarget, Set<String> targetColumns, boolean skipLogin) {
    // Goal: confirm that all expected columns are present
    if (!skipLogin) {
        login();
    }
    ListPage page = getList(listTarget);
    DataTable table = page.getTable();
    List<String> headings = table.getColumnHeadings();
    assertEquals("number of columns", targetColumns.size(), headings.size());
    for (String col : targetColumns) {
        assertTrue("Check for column: '" + col + "'", headings.contains(col));
    }
}
Also used : AbstractListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage) ListPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage) DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable)

Aggregations

AbstractListPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage)4 ListPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage)4 DataTable (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable)3 Test (org.junit.Test)1