@Override protected void createTestData(ConfluenceRpc adminRpc) { userHelper.createUser(barney); adminRpc.flushIndexQueue(); }
private Page createDummyPage(long parentPageId) { Page page = new Page(testSpace, "Hackage", "stuff", parentPageId); rpc.createPage(page); rpc.flushIndexQueue(); return page; } }
@Override protected void createTestData(ConfluenceRpc adminRpc) { userHelper.createUser(ampersandUser); adminRpc.removeSpace("~" + adminUser.getUsername()); adminRpc.flushIndexQueue(); // ensure user is indexed }
@Override protected void setUp() throws Exception { super.setUp(); editor = new Editor(client, suite); tinyMce = editor.getTinyMce(); rpc.logIn(adminUser); rpc.flushIndexQueue(); }
@Override protected void setUp() throws Exception { super.setUp(); quickNavBox = new QuickSearch(client); rpc.logIn(adminUser); rpc.flushIndexQueue(); rpc.logOut(); }
@Override protected void setUp() throws Exception { super.setUp(); editor = new Editor(client, suite); rpc.logIn(adminUser); rpc.createPage(testSpace.getKey(), "Another page", "", 0); rpc.flushIndexQueue(); }
public void testPermissionDialogWorksWithWhiteSpaceSpacekey() { Space whiteSpaceSpace = rpc.createPersonalSpace(whiteSpaceUser); rpc.flushIndexQueue(); PageView view = suite.logIn(whiteSpaceUser, whiteSpaceSpace.getHomePage()); view.clickPermissionsMenuItem(); assertThat.visibleByTimeout(PERMISSIONS_DIALOG_ID); }
public void testPersonalSpace() { rpc.createPersonalSpace(testUser); rpc.flushIndexQueue(); spacePicker.type(testUser.getFullName()); spacePicker.waitForResultsToContainExactEntry(testUser.getFullName()); }
private void runAutocompleteForAttachmentOnBlogPost() { String pdfName = "blogstar.jpg"; Attachment attachment = new Attachment(testBlogPost, pdfName, Attachment.PNG_TYPE, "", Classpath.getBytes(testImage.getFilename())); rpc.logIn(adminUser); rpc.createAttachment(attachment); rpc.flushIndexQueue(); testContent = attachment; imageInHref = pdfName; runAutocomplete(); } }
@Override protected void setUp() throws Exception { super.setUp(); this.editor = new Editor(client, suite); pageToEdit = new Page(testSpace, "Captain Caveman", "Oh oh! Ran out of flying power."); rpc.logIn(adminUser); rpc.createPage(pageToEdit); rpc.flushIndexQueue(); editor.logInAndEdit(testUser, pageToEdit); }
@Override protected void setUp() throws Exception { super.setUp(); this.editor = new Editor(client, suite); this.tinyMce = editor.getTinyMce(); pageToEdit = new Page(testSpace, "Captain Caveman", "Oh oh! Ran out of flying power."); rpc.logIn(adminUser); rpc.createPage(pageToEdit); rpc.flushIndexQueue(); }
public void testSpaceLink() { Space space = new Space("BLAH", "<em>B</em>lah"); rpc.createSpace(space); rpc.grantAllPermissionsExceptAdmin(defaultUser, space); rpc.flushIndexQueue(); editor.createPage(space); testContent = space; searchText = space.getName().substring(0, 3); //3 characters is enough link = new EditorLink("space", space.getName(), "/display/" + space.getKey()); runAutocomplete(); }
public void testImageSuggestion() throws Exception { rpc.logIn(adminUser); rpc.createAttachment(testPage.getId(), testImage); rpc.flushIndexQueue(); tinyMce = editor.logInAndEditInRTE(testUser, testPage); tinyMce.selectEmptyFirstParagraph(); editorAutocomplete = EditorAutocomplete.triggerWithCharacter("!", tinyMce); editorAutocomplete.waitForResultsToContain(testImage); }
@Override protected void setUp() throws Exception { super.setUp(); rpc.logIn(adminUser); rpc.createSpace(space); rpc.createBlogPost(blog); rpc.flushIndexQueue(); editor.logInAndCreatePage(adminUser, testSpace); editor.getTinyMce().editorContentFocus(); linkBrowser = editor.openLinkBrowser(); }
public void testQuickNavigation() throws InterruptedException { Page fooPage = new Page(testSpace, "foopage", "foopage"); rpc.createPage(fooPage); Page gadgetPage = new Page(testSpace, "gadget page", GADGET_MARKUP); rpc.createPage(gadgetPage); rpc.flushIndexQueue(); client.open(gadgetPage.getUrl()); String gadgetId = client.getAttribute("//iframe[@class='gadget']@id"); assertSearchingWorks(fooPage, gadgetId); }
public void testImageSearch() throws Exception { rpc.logIn(adminUser); rpc.createAttachment(testPage.getId(), testImage); rpc.flushIndexQueue(); tinyMce = editor.logInAndEditInRTE(testUser, testPage); tinyMce.selectEmptyFirstParagraph(); editorAutocomplete = EditorAutocomplete.triggerWithCharacter("!", tinyMce); editorAutocomplete.type("sta"); editorAutocomplete.waitForResultsToContain(testImage); }
@Override protected void setUp() throws Exception { super.setUp(); rpc.logIn(testUser); rpc.createPage(testSpace.getKey(), "dummy page", "content", testPage.getId()); rpc.logIn(adminUser); rpc.flushIndexQueue(); testUserHover = new UserHoverPopup(client, testUser); adminUserHover = new UserHoverPopup(client, adminUser); }
public void testNoMatchingAttachments() throws Exception { Page monkeyPage = new Page(testSpace, "tweet", "munky trousers!"); rpc.createPage(monkeyPage); rpc.flushIndexQueue(); editor.logInAndEdit(testUser, pageToEdit); MacroBrowser mb = editor.openMacroBrowser(); mb.selectMacro("viewxls", false); clickSmartFieldSuggestion(mb, "page", monkeyPage.getTitle(), monkeyPage.getTitle()); // wait for the attachments select box to populate with the expected entry waitUntilSelectBoxHasOption(mb, FILE_PARAM_NAME, NO_APPROPRIATE_ATTACHMENTS); }
public void TODOXHTML_testAttachmentLink() { Attachment attachment = new Attachment(testPage, testImage); attachment.setId(rpc.createAttachment(attachment)); rpc.flushIndexQueue(); editor.createPage(testSpace); testContent = testImage; searchText = "Starry"; link = new EditorLink("attachment", "" + attachment.getId(), testImage.getTitle(), testImage.getDownloadUrl()); this.isAttachment = true; runAutocomplete(); }
public void testConfluenceContentField() throws Exception { fieldTest("contributors", "page", testPage.getTitle(), testPage.getTitle()); // Test the ConfluenceContent field for content in a different space Space monkeySpace = new Space("MKY", "Monkey Trousers"); rpc.createSpace(monkeySpace); rpc.grantPermission(SpacePermission.VIEW, monkeySpace, testUser); Page monkeyPage = new Page(monkeySpace, "tweet", "munky trousers!"); rpc.createPage(monkeyPage); rpc.flushIndexQueue(); fieldTest("contributors", "page", monkeyPage.getTitle(), monkeySpace.getKey() + ":" + monkeyPage.getTitle()); }