Package org.xwiki.test.ui.po

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


    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

        // 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

        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

        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

        String appHomePageTitle = appName + " Home";
        entryEditPage.clickSaveAndView().clickBreadcrumbLink(appHomePageTitle);
        homePage = new ApplicationHomePage();

        // Assert the entry we have just created is listed in the live table.
        LiveTableElement entriesLiveTable = homePage.getEntriesLiveTable();
        entriesLiveTable.waitUntilReady();
        Assert.assertTrue(entriesLiveTable.hasRow("City Name", "London"));

        // Assert that the application space index lists only the home page and the entry we have just created. The rest
        // of the documents (class, template, sheet, preferences) should be marked as hidden.
        LiveTableElement appSpaceIndexLiveTable = SpaceIndexPage.gotoPage(appName).getLiveTable();
        appSpaceIndexLiveTable.waitUntilReady();
        Assert.assertEquals(2, appSpaceIndexLiveTable.getRowCount());
        Assert.assertTrue(appSpaceIndexLiveTable.hasRow("Page", "WebHome"));
        Assert.assertTrue(appSpaceIndexLiveTable.hasRow("Page", firstEntryName));

        // Go back to the application home page.
        getDriver().navigate().back();

        // Click the edit button.
View Full Code Here

        Assert.assertEquals("Foo", entryViewPage.getDocumentTitle());
        Assert.assertTrue(entryViewPage.getContent().contains("Bar"));
        entryViewPage.clickBreadcrumbLink(appName + " Home");

        // Check the entries live table.
        LiveTableElement liveTable = new ApplicationHomePage().getEntriesLiveTable();
        liveTable.waitUntilReady();
        Assert.assertEquals(1, liveTable.getRowCount());
        Assert.assertTrue(liveTable.hasRow("My Title", "Foo"));
        Assert.assertTrue(liveTable.hasRow("My Content", "Bar"));

        // Check that the title and the content of the class have not been changed.
        getUtil().gotoPage(appName + "Code", appName + "Class", "edit", "editor=wiki");
        WikiEditPage editPage = new WikiEditPage();
        Assert.assertEquals(appName + " Class", editPage.getTitle());
View Full Code Here

        entryEditPage.setValue("description", "This is a test panel.");
        entryEditPage.clickSaveAndView();

        getUtil().gotoPage(getTestClassName(), getTestMethodName());
        homePage = new ApplicationHomePage();
        LiveTableElement entriesLiveTable = homePage.getEntriesLiveTable();
        entriesLiveTable.waitUntilReady();
        // The column title is not translated because we haven't generated the document translation bundle.
        Assert.assertTrue(entriesLiveTable.hasRow("panel.livetable.doc.name", entryName));
    }
View Full Code Here

        // Navigate to the Home Page and click on the SpaceIndex.
        HomePage homePage = HomePage.gotoPage();
        homePage.getSpacesPane().clickSpaceIndex(spaceName);

        // Assert the content of the space index live table.
        LiveTableElement spaceIndexLiveTable = new SpaceIndexPage().getLiveTable();
        spaceIndexLiveTable.waitUntilReady();
        Assert.assertEquals(1, spaceIndexLiveTable.getRowCount());
        Assert.assertTrue(spaceIndexLiveTable.hasRow("Page", "WebHome"));
        Assert.assertTrue(spaceIndexLiveTable.hasRow("Space", spaceName));
    }
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.po.LiveTableElement

Copyright © 2018 www.massapicom. 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.