public VisualEditorPageObject launchVisualEditorWithMainEdit(String articleName, String wikiURL) { ArticlePageObject article = openArticleByName(wikiURL, articleName); VisualEditorPageObject ve = article.openVEModeWithMainEditButton(); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); return new VisualEditorPageObject(driver); }
@Test(groups = {"ArticleActionsAdmin_002"}) @UseUnstablePageLoadStrategy @Execute(asUser = User.STAFF) public void moveArticle() { new ArticleContent().push(PageContent.ARTICLE_TEXT); ArticlePageObject article = new ArticlePageObject().open(); String articleNewName = TestContext.getCurrentMethodName() + article.getTimeStamp(); RenamePageObject renamePage = article.renameUsingDropdown(); renamePage.rename(articleNewName, false); Assertion.assertTrue( article.getBannerNotifications().isNotificationMessageVisible(), "Banner notification message is not visible"); article.verifyArticleTitle(articleNewName); }
@Test(groups = {"ArticleActionsAdmin_001"}) @UseUnstablePageLoadStrategy @RelatedIssue(issueID = "WW-568") @Execute(asUser = User.STAFF) public void deleteUndeleteArticle() { String articleTitle = "DeleteUndeleArticle"; new ArticleContent().push(PageContent.ARTICLE_TEXT, articleTitle); ArticlePageObject article = new ArticlePageObject().open(articleTitle); DeletePageObject deletePage = article.deleteUsingDropdown(); deletePage.submitDeletion(); SpecialRestorePageObject restore = article.getBannerNotifications().clickUndeleteLinkInBannerNotification(); restore.verifyRestoredArticleName(articleTitle); restore.giveReason(article.getTimeStamp()); restore.restorePage(); Assertion.assertTrue( article.getBannerNotifications().isNotificationMessageVisible(), "Banner notification message is not visible"); article.verifyArticleTitle(articleTitle); }
@Test(groups = {"ArticleEditDropdown_003"}) public void ArticleEditDropdown_003_anon() { ArticlePageObject article = new ArticlePageObject(driver).open(articleName); article.verifyDropdownForAnon(); }
@Test(groups = {"ArticleEditDropdown_002"}) @Execute(asUser = User.USER) public void ArticleEditDropdown_002_user() { ArticlePageObject article = new ArticlePageObject(driver).open(articleName); article.verifyDropdownForUser(); }
@Test(groups = {"ArticleEditDropdown_001"}) @Execute(asUser = User.STAFF) public void ArticleEditDropdown_001_admin() { ArticlePageObject article = new ArticlePageObject(driver).open(articleName); article.verifyDropdownForAdmin(); }