/** CaseId: 68917 -> Ban IP */ @Test public void test02_BanIP() { String catName = "CategoryBanIP_02"; String description = "Add new category in forum"; String forumName = "ForumBanIP_02"; String topic = "TopicBanIP_02"; String message = "New topic 02"; info("Add new category, forum, topic with user admin"); cat.addNewCategoryInForum(catName, "1", 0, null, description, 0, null); forum.quickAddForum(forumName); magtopic.quickStartTopic(topic, message); String ip = Utils.getIPOfLocal(); info("Set banIP is localhost"); setBanIp(ip); magAc.signOut(); info("Check banIp with user demo"); driver.get("http://" + ip + ":8080/portal"); magAc.signIn("demo", "gtn"); goToForums(); click(By.linkText(forumName)); waitForAndGetElement(ELEMENT_START_TOPIC_DISABLE); waitForTextPresent(MSG_BLOCK_CREATE_TOPIC); waitForTextPresent(MSG_BLOCK_POST); waitForTextPresent(MSG_BLOCK_POST_ATTACHMENT); waitForTextPresent(MSG_BLOCK_EDIT_YOUR_POST); click(By.linkText(topic)); waitForAndGetElement(ELEMENT_POST_DISABLE); waitForTextPresent(MSG_BLOCK_CREATE_TOPIC); waitForTextPresent(MSG_BLOCK_POST); waitForTextPresent(MSG_BLOCK_POST_ATTACHMENT); waitForTextPresent(MSG_BLOCK_EDIT_YOUR_POST); magAc.signOut(); driver.get(baseUrl); magAc.signIn("john", "gtn"); goToForums(); deleteBanIp(ip); click(By.linkText(catName)); cat.deleteCategoryInForum(catName); }