Search in sources :

Example 1 with DataTable

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable 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 DataTable

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

the class ListTablesIT method testTabbedColumnsSort.

private void testTabbedColumnsSort(String listTarget, boolean skipLogin) {
    // note that this sorts in a single tab only, as different tabs should not have different columns.
    if (!skipLogin) {
        login();
    }
    ListTabbedPage page = getTabbedList(listTarget);
    DataTable table = page.getTable();
    sortColumns(table, page);
    page.clickTab(sortOnTab.get(listTarget));
    Set<String> tabHeadings = page.getTabHeadings();
    tabHeadings.forEach(tabHeading -> {
        page.clickTab(tabHeading);
        assertTrue("clicked tab without errors", isStringEmptyOrNull(page.getErrors().getText()));
    });
}
Also used : DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable) ListTabbedPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListTabbedPage)

Example 3 with DataTable

use of uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable 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 4 with DataTable

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

the class ListTablesIT method testIdentitySearchToolSetup.

@Test
public void testIdentitySearchToolSetup() throws Exception {
    // Goal: ensure all expected columns are present and no extra
    login();
    IdentitySearchPage page = IdentitySearchPage.get(getDriver(), getBaseUrl());
    DataTable table = page.getSamplesTable();
    List<String> headings = table.getColumnHeadings();
    assertEquals("number of columns", samplesColumns.size(), headings.size());
    for (String col : samplesColumns) {
        assertTrue("Check for column: '" + col + "'", headings.contains(col));
    }
}
Also used : DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable) IdentitySearchPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.IdentitySearchPage) Test(org.junit.Test)

Example 5 with DataTable

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

the class ListTablesIT method testWarningTabbed.

private void testWarningTabbed(String target, String query, String warning, String column) {
    ListTabbedPage page = getTabbedList(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 : DataTable(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable) ListTabbedPage(uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListTabbedPage)

Aggregations

DataTable (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.element.DataTable)15 Test (org.junit.Test)7 ListTabbedPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListTabbedPage)5 AbstractListPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.AbstractListPage)4 BulkPoolPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.BulkPoolPage)3 ListPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPage)3 ListLibraryAliquotsPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListLibraryAliquotsPage)2 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 WebElement (org.openqa.selenium.WebElement)1 IdentitySearchPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.IdentitySearchPage)1 LibraryPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.LibraryPage)1 ListPoolsPage (uk.ac.bbsrc.tgac.miso.webapp.integrationtest.page.ListPoolsPage)1