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;
}
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;
}
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;
}
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;
}
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()));
}
Aggregations