Search in sources :

Example 1 with LiveTableElement

use of org.xwiki.test.ui.po.LiveTableElement in project xwiki-platform by xwiki.

the class ApplicationHomePage method getEntriesLiveTable.

/**
 * @return the live table used to browser application data
 */
public LiveTableElement getEntriesLiveTable() {
    if (entriesLiveTable == null) {
        WebElement table = getDriver().findElement(By.className("xwiki-livetable"));
        entriesLiveTable = new LiveTableElement(table.getAttribute("id"));
    }
    return entriesLiveTable;
}
Also used : LiveTableElement(org.xwiki.test.ui.po.LiveTableElement) WebElement(org.openqa.selenium.WebElement)

Example 2 with LiveTableElement

use of org.xwiki.test.ui.po.LiveTableElement in project xwiki-platform by xwiki.

the class AllDocsPage method clickAttachmentsTab.

public LiveTableElement clickAttachmentsTab() {
    this.attachmentsTab.click();
    LiveTableElement lt = new LiveTableElement("allattachments");
    lt.waitUntilReady();
    return lt;
}
Also used : LiveTableElement(org.xwiki.test.ui.po.LiveTableElement)

Example 3 with LiveTableElement

use of org.xwiki.test.ui.po.LiveTableElement in project xwiki-platform by xwiki.

the class AllDocsPage method clickDeletedAttachmentsTab.

public LiveTableElement clickDeletedAttachmentsTab() {
    this.deletedAttachmentsTab.click();
    LiveTableElement lt = new LiveTableElement("attachmentTrash");
    lt.waitUntilReady();
    return lt;
}
Also used : LiveTableElement(org.xwiki.test.ui.po.LiveTableElement)

Example 4 with LiveTableElement

use of org.xwiki.test.ui.po.LiveTableElement in project xwiki-platform by xwiki.

the class DocumentsMacroPage method getDocumentsExampleLiveTable.

public LiveTableElement getDocumentsExampleLiveTable() {
    LiveTableElement lt = new LiveTableElement("example");
    lt.waitUntilReady();
    return lt;
}
Also used : LiveTableElement(org.xwiki.test.ui.po.LiveTableElement)

Example 5 with LiveTableElement

use of org.xwiki.test.ui.po.LiveTableElement in project xwiki-platform by xwiki.

the class AllDocsTest method tableViewTabActions.

@Test
public void tableViewTabActions() throws Exception {
    // Test 1: Verify that the Action column is displayed only for logged in users
    // Create a test user
    getUtil().createUserAndLogin(getTestClassName() + "_" + getTestMethodName(), "password");
    AllDocsPage page = AllDocsPage.gotoPage();
    LiveTableElement livetable = page.clickIndexTab();
    assertTrue("No Actions column found", livetable.hasColumn("Actions"));
    // Logs out to be guest to verify that the Action columns is no longer displayed
    getUtil().forceGuestUser();
    page = AllDocsPage.gotoPage();
    livetable = page.clickIndexTab();
    assertFalse("Actions column shouldn't be visible for guests", livetable.hasColumn("Actions"));
    // Test 2: Verify filtering works by filtering on the document name
    livetable = page.clickIndexTab();
    livetable.filterColumn("xwiki-livetable-alldocs-filter-2", getTestMethodName());
    // We get one result for the user we've created
    assertEquals(1, livetable.getRowCount());
    assertTrue(livetable.hasRow("Title", getTestClassName() + "_" + getTestMethodName()));
}
Also used : AllDocsPage(org.xwiki.index.test.po.AllDocsPage) LiveTableElement(org.xwiki.test.ui.po.LiveTableElement) Test(org.junit.Test) AbstractTest(org.xwiki.test.ui.AbstractTest)

Aggregations

LiveTableElement (org.xwiki.test.ui.po.LiveTableElement)26 Test (org.junit.Test)16 AbstractTest (org.xwiki.test.ui.AbstractTest)15 ApplicationHomePage (org.xwiki.appwithinminutes.test.po.ApplicationHomePage)8 IgnoreBrowsers (org.xwiki.test.ui.browser.IgnoreBrowsers)6 ApplicationHomeEditPage (org.xwiki.appwithinminutes.test.po.ApplicationHomeEditPage)5 EntryEditPage (org.xwiki.appwithinminutes.test.po.EntryEditPage)5 EntryNamePane (org.xwiki.appwithinminutes.test.po.EntryNamePane)5 ViewPage (org.xwiki.test.ui.po.ViewPage)4 ByteArrayInputStream (java.io.ByteArrayInputStream)2 WebElement (org.openqa.selenium.WebElement)2 ApplicationClassEditPage (org.xwiki.appwithinminutes.test.po.ApplicationClassEditPage)2 ClassFieldEditPane (org.xwiki.appwithinminutes.test.po.ClassFieldEditPane)2 AllDocsPage (org.xwiki.index.test.po.AllDocsPage)2 WikiEditPage (org.xwiki.test.ui.po.editor.WikiEditPage)2 ServerSetupTest (com.icegreen.greenmail.util.ServerSetupTest)1 UsernamePasswordCredentials (org.apache.commons.httpclient.UsernamePasswordCredentials)1 WebDriver (org.openqa.selenium.WebDriver)1 AdministrationPage (org.xwiki.administration.test.po.AdministrationPage)1 AppWithinMinutesHomePage (org.xwiki.appwithinminutes.test.po.AppWithinMinutesHomePage)1