public TinyMce logInAndCreatePage(User user, Space space) { return logInAndEdit(user, space.getCreatePageUrl()); }
public void createPage(Space space) { client.open(space.getCreatePageUrl(), EDITOR_TIMEOUT_MILLIS); }
public void disabled_testPagePreviewWithPermissions() { // test user is setup with page permissions for the test space // test edit page String newContent = "New content"; editor.logInAndEdit(testUser, testPage); tinyMce.setHtmlContent(newContent); editorPreview = editor.switchToPreview(); assertTrue(editorPreview.getPreviewContent().contains(newContent)); editor.save(); assertThat.wikiContentContains(newContent); // test add page client.open(testSpace.getCreatePageUrl()); editor.setTitle("Foo"); tinyMce.setHtmlContent(newContent); editor.switchToPreview(); assertTrue(editorPreview.getPreviewContent().contains(newContent)); editor.save(); assertThat.wikiContentContains(newContent); }
public void disabled_testDiscardDraftInPreviewTab() { // TODO this fails in OnDemand because the user menu does not exist if (TestProperties.isOnDemandAlaCarte()) return; rpc.logIn(adminUser); rpc.grantPermission(SpacePermission.PAGE_EDIT, testSpace, testUser); editor.logInAndCreatePage(testUser, testSpace); editor.setContent("stuff"); editor.triggerDraftAndCheckUserDrafts(); client.open(testSpace.getCreatePageUrl()); assertThat.infoVisibleWithText("discard"); editor.discardDraft(); assertThat.infoNotVisible(); assertThat.successVisibleWithText("discarded"); String newContent = "foo bar"; TinyMce tinyMce = editor.switchToRichText(); tinyMce.setHtmlContent(newContent); editorPreview = editor.switchToPreview(); assertThat.infoNotVisible(); assertTrue(editorPreview.getPreviewContent().contains(newContent)); editor.cancel(); }
public void disabled_testAnonymousUserInsertLinkInDraft() { rpc.logIn(adminUser); rpc.grantAnonymousUsePermission(); try { rpc.grantAnonymousPermission(SpacePermission.VIEW, testSpace); rpc.grantAnonymousPermission(SpacePermission.PAGE_EDIT, testSpace); suite.logOut(); client.open(testSpace.getCreatePageUrl()); LinkBrowser dialog = editor.openLinkBrowser(); dialog.selectTab(LinkBrowser.Tab.SEARCH); dialog.typeInSearch(testPage.getTitle()); dialog.clickSearchButton(); dialog.waitForDataTable(1); dialog.selectFromDataTable(testPage.getTitle()); dialog.clickInsert(); assertThat.assertLinkInserted(testPage.getTitle(), testPage); } finally { rpc.logIn(adminUser); rpc.revokeAnonymousUsePermission(); } }
client.open(testSpace.getCreatePageUrl()); editor.setTitle("Testing the Page Gadget"); gotoPageGadgetConfig();