Examples of LiveTableElement


Examples of org.xwiki.test.ui.framework.elements.LiveTableElement

        return this.automaticwatch.getText();
    }

    public LiveTableElement getWatchList()
    {
        return new LiveTableElement("mywatchlist");
    }
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LiveTableElement

    @Test
    public void testAttachmentsPane()
    {
        AllDocsPage docsPage = new AllDocsPage();
        docsPage.gotoPage();
        LiveTableElement liveTable = docsPage.clickAttachmentsTab();
        // Here we test if all the Columns are displayed
        Assert.assertTrue("No Filename column found", liveTable.hasColumn("Filename"));
        Assert.assertTrue("No Space column found", liveTable.hasColumn("Space"));
        Assert.assertTrue("No Date column found", liveTable.hasColumn("Date"));
        Assert.assertTrue("No Author column found", liveTable.hasColumn("Author"));
        Assert.assertTrue("No Type column found", liveTable.hasColumn("Type"));
        Assert.assertTrue("No Page column found", liveTable.hasColumn("Page"));

        // Here we filter the livetable
        liveTable.filterColumn(PAGE_COLUMN_ID, FILTER_STRING);
        List<WebElement> pageResults = getDriver().findElements(By.xpath("//td[@class='pagename']"));

        // Here we get the results that remain after applying the filter
        // and we check if there is a result that doesn't contain the filter, the test will fail
        for (int i = 0; i < pageResults.size(); i++) {
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LiveTableElement

    {
        AllDocsPage page = new AllDocsPage();
        page.gotoPage();

        // Test 1: Verify that the Action column is displayed only for administrators.
        LiveTableElement livetable = page.clickIndexTab();
        Assert.assertTrue("No Actions column found", livetable.hasColumn("Actions"));
        page.logout();
        livetable = page.clickIndexTab();
        Assert.assertFalse("Actions column shouldn't be visible for guests", livetable.hasColumn("Actions"));
        page.login().loginAsAdmin();

        // Test 2: Verify filtering works by filtering on the document name
        // TODO: the line below fails from time to time. Fix it.
        livetable = page.clickIndexTab();
        // TODO: it seems that it doesn't work sometimes. Fix it.
        livetable.filterColumn("xwiki-livetable-alldocs-filter-1", "Treeview");
    }
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LiveTableElement

    }

    public LiveTableElement clickIndexTab()
    {
        this.indexTab.click();
        LiveTableElement lt = new LiveTableElement("alldocs");

        // Since there's a risk that the livetable has finished dislaying before the listener
        // (defined in LiveTableElement's constructor) has been set up, we force a livetable refresh.
        executeJavascript("livetable.clearCache();livetable.showRows(livetable.currentOffset, livetable.limit);");

        lt.waitUntilReady();
        return lt;
    }
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LiveTableElement

    }

    public LiveTableElement clickAttachmentsTab()
    {
        this.attachmentsTab.click();
        LiveTableElement lt = new LiveTableElement("allattachments");

        // Since there's a risk that the livetbale has finished dislaying before the listener
        // (defined in LiveTableElement's constructor) has been set up, we force a livetable refresh.
        executeJavascript("livetable.clearCache();livetable.showRows(livetable.currentOffset, livetable.limit);");

        lt.waitUntilReady();
        return lt;
    }
View Full Code Here

Examples of org.xwiki.test.ui.po.LiveTableElement

        editPage.addLiveTableColumn("First Name");
        Assert.assertTrue(editPage.hasLiveTableColumn("First Name"));
        editPage.moveLiveTableColumnBefore("First Name", "Update date");
        editPage.removeLiveTableColumn("Page name");
        Assert.assertFalse(editPage.hasLiveTableColumn("Page name"));
        LiveTableElement liveTable = ((ApplicationHomePage) editPage.clickSaveAndView()).getEntriesLiveTable();
        liveTable.waitUntilReady();
        // The column titles aren't translated because we haven't generated the document translation bundle.
        Assert.assertFalse(liveTable.hasColumn("xwikiusers.livetable.doc.name"));
        Assert.assertEquals(0, liveTable.getColumnIndex("xwikiusers.livetable.first_name"));
        Assert.assertEquals(1, liveTable.getColumnIndex("xwikiusers.livetable.doc.date"));
    }
View Full Code Here

Examples of org.xwiki.test.ui.po.LiveTableElement

    public void testSaveAndContinue()
    {
        editPage.setDescription("wait for WYSIWYG to load");
        editPage.clickSaveAndContinue();
        ApplicationHomePage viewPage = editPage.clickCancel();
        LiveTableElement liveTable = viewPage.getEntriesLiveTable();
        liveTable.waitUntilReady();
        // The column title isn't translated because we haven't generated the document translation bundle.
        Assert.assertTrue(liveTable.hasColumn("xwikiusers.livetable.doc.name"));
    }
View Full Code Here

Examples of org.xwiki.test.ui.po.LiveTableElement

        // Keep deprecated columns.
        editPage.removeAllDeprecatedLiveTableColumns(false);
        Assert.assertFalse(editPage.isDeprecatedLiveTableColumnsWarningDisplayed());
        Assert.assertTrue(editPage.isLiveTableColumnDeprecated("foo"));
        ApplicationHomePage viewPage = editPage.clickSaveAndView();
        LiveTableElement liveTable = viewPage.getEntriesLiveTable();
        liveTable.waitUntilReady();
        // The column title isn't translated because we haven't generated the document translation bundle.
        Assert.assertTrue(liveTable.hasColumn("xwikiusers.livetable.foo"));

        // Edit again and remove the deprecated column.
        editPage = viewPage.editInline();
        Assert.assertTrue(editPage.isDeprecatedLiveTableColumnsWarningDisplayed());
        editPage.removeLiveTableColumn("foo");
View Full Code Here

Examples of org.xwiki.test.ui.po.LiveTableElement

        entryEditPage = entryNamePane.clickAdd();
        entryEditPage.setValue("staticList1", "value2");
        entryEditPage.clickSaveAndView().clickBreadcrumbLink(appName + " Home");

        // Filter the Static List column of the live table.
        LiveTableElement liveTable = new ApplicationHomePage().getEntriesLiveTable();
        liveTable.waitUntilReady();
        Assert.assertEquals(2, liveTable.getRowCount());
        String filterInputId = getFilterInputId(liveTable.getColumnIndex("Static List"));
        liveTable.filterColumn(filterInputId, "Second Choice");
        Assert.assertEquals(1, liveTable.getRowCount());
        Assert.assertTrue(liveTable.hasRow("Page name", "Bar"));
        liveTable.filterColumn(filterInputId, "First Choice");
        Assert.assertEquals(1, liveTable.getRowCount());
        Assert.assertTrue(liveTable.hasRow("Page name", "Foo"));
        liveTable.filterColumn(filterInputId, "All");
        Assert.assertEquals(2, liveTable.getRowCount());
    }
View Full Code Here

Examples of org.xwiki.test.ui.po.LiveTableElement

        entryEditPage = entryNamePane.clickAdd();
        entryEditPage.setTitle("The Empty Bar");
        entryEditPage.clickSaveAndView().clickBreadcrumbLink(appName + " Home");

        // Filter the Title column of the live table.
        LiveTableElement liveTable = new ApplicationHomePage().getEntriesLiveTable();
        liveTable.waitUntilReady();
        Assert.assertEquals(2, liveTable.getRowCount());
        String filterInputId = getFilterInputId(0);
        liveTable.filterColumn(filterInputId, "mighty");
        Assert.assertEquals(1, liveTable.getRowCount());
        Assert.assertTrue(liveTable.hasRow("Page name", "Foo"));
        liveTable.filterColumn(filterInputId, "empty");
        Assert.assertEquals(1, liveTable.getRowCount());
        Assert.assertTrue(liveTable.hasRow("Page name", "Bar"));
        liveTable.filterColumn(filterInputId, "");
        Assert.assertEquals(2, liveTable.getRowCount());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.