Examples of loginAsAdmin()


Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

    @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason="See http://jira.xwiki.org/browse/XE-1177")
    })
    public void testLoginLogoutAsAdmin()
    {
        LoginPage loginPage = this.vp.login();
        loginPage.loginAsAdmin();

        // Verify that after logging in we're redirected to the page on which the login button was clicked, i.e. the
        // non existent page here.
        Assert.assertEquals(this.nonExistentPageURL, getDriver().getCurrentUrl());

View Full Code Here

Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

            page.logout();
            // Since view is disallowed for unauthenticated users, at this point we see a log in page.
            LoginPage loginPage = new LoginPage();
            // Remove all cookie to simulate a session expiry
            getDriver().manage().deleteAllCookies();
            loginPage.loginAsAdmin();

            // We use startsWith since the URL contains a jsessionid and a srid.
            Assert.assertTrue(getDriver().getCurrentUrl().startsWith(getUtil().getURL("SomeSpace", "SomePage")));
        } finally {
            GlobalRightsAdministrationSectionPage grasp = GlobalRightsAdministrationSectionPage.gotoPage();
View Full Code Here

Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

    {
        String test = "Test string " + System.currentTimeMillis();
        final String space = "Main";
        final String page = "POSTTest";
        LoginPage loginPage = this.vp.login();
        loginPage.loginAsAdmin();
        // start editing a page
        WikiEditPage editPage = WikiEditPage.gotoPage(space, page);
        editPage.setTitle(test);
        editPage.setContent(test);
        // emulate expired session: delete the cookies
View Full Code Here

Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

        if (wantUrl.indexOf('?') > 0) {
            // strip parameters
            wantUrl = wantUrl.substring(0, wantUrl.indexOf('?'));
        }
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(wantUrl));
        loginPage.loginAsAdmin();
        // we should have been redirected back to view, and the page should have been saved
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(getUtil().getURL(space, page)));
        editPage = WikiEditPage.gotoPage(space, page);
        Assert.assertEquals(test, editPage.getTitle());
        Assert.assertEquals(test, editPage.getContent());
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.