Search in sources :

Example 11 with SearchCriteria

use of it.vige.rubia.search.SearchCriteria in project rubia-forums by flashboss.

the class SearchTopicTest method searchTopicsWithReset.

@Test
public void searchTopicsWithReset() {
    goTo(driver);
    SearchCriteria searchForumCriteria = new SearchCriteria();
    searchForumCriteria.setAuthor(null);
    searchForumCriteria.setCategory(null);
    searchForumCriteria.setDisplayAs(TOPICS.name());
    searchForumCriteria.setForum(null);
    searchForumCriteria.setKeywords("First");
    searchForumCriteria.setPageNumber(0);
    searchForumCriteria.setPageSize(0);
    searchForumCriteria.setSearching(null);
    searchForumCriteria.setSortBy(null);
    searchForumCriteria.setSortOrder(null);
    searchForumCriteria.setTimePeriod(null);
    reset(driver, searchForumCriteria);
    List<Topic> topics = getTopics(driver, searchForumCriteria);
    assertTrue(topics == null);
}
Also used : RemoveTopic.removeTopic(it.vige.rubia.selenium.forum.action.RemoveTopic.removeTopic) ViewPageTopicSearch.searchTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.searchTopic) CreateTopic.createTopic(it.vige.rubia.selenium.forum.action.CreateTopic.createTopic) Topic(it.vige.rubia.model.Topic) ViewPageTopicSearch.getTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getTopic) SearchCriteria(it.vige.rubia.search.SearchCriteria) Test(org.junit.Test)

Example 12 with SearchCriteria

use of it.vige.rubia.search.SearchCriteria in project rubia-forums by flashboss.

the class SearchTopicTest method verifyPostProfileFromTopicPage.

@Test
public void verifyPostProfileFromTopicPage() {
    goTo(driver);
    SearchCriteria searchForumCriteria = new SearchCriteria();
    searchForumCriteria.setAuthor("root");
    searchForumCriteria.setCategory(null);
    searchForumCriteria.setDisplayAs(TOPICS.name());
    searchForumCriteria.setForum(null);
    searchForumCriteria.setKeywords("Topic");
    searchForumCriteria.setPageNumber(0);
    searchForumCriteria.setPageSize(0);
    searchForumCriteria.setSearching(null);
    searchForumCriteria.setSortBy(null);
    searchForumCriteria.setSortOrder(null);
    searchForumCriteria.setTimePeriod(null);
    List<Topic> topics = searchTopic(driver, searchForumCriteria);
    Topic topic = topics.get(2);
    Poster poster = getPoster(driver, topic);
    assertTrue(poster != null);
    assertEquals("root", poster.getUserId());
    assertTrue(poster.getPostCount() >= 4);
}
Also used : Poster(it.vige.rubia.model.Poster) ViewPageTopicSearch.getPoster(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getPoster) RemoveTopic.removeTopic(it.vige.rubia.selenium.forum.action.RemoveTopic.removeTopic) ViewPageTopicSearch.searchTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.searchTopic) CreateTopic.createTopic(it.vige.rubia.selenium.forum.action.CreateTopic.createTopic) Topic(it.vige.rubia.model.Topic) ViewPageTopicSearch.getTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getTopic) SearchCriteria(it.vige.rubia.search.SearchCriteria) Test(org.junit.Test)

Example 13 with SearchCriteria

use of it.vige.rubia.search.SearchCriteria in project rubia-forums by flashboss.

the class SearchTopicTest method searchTopicsNoFields.

@Test
public void searchTopicsNoFields() {
    goTo(driver);
    SearchCriteria searchForumCriteria = new SearchCriteria();
    List<Topic> topics = searchTopic(driver, searchForumCriteria);
    assertTrue(topics == null);
}
Also used : RemoveTopic.removeTopic(it.vige.rubia.selenium.forum.action.RemoveTopic.removeTopic) ViewPageTopicSearch.searchTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.searchTopic) CreateTopic.createTopic(it.vige.rubia.selenium.forum.action.CreateTopic.createTopic) Topic(it.vige.rubia.model.Topic) ViewPageTopicSearch.getTopic(it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getTopic) SearchCriteria(it.vige.rubia.search.SearchCriteria) Test(org.junit.Test)

Example 14 with SearchCriteria

use of it.vige.rubia.search.SearchCriteria in project rubia-forums by flashboss.

the class SearchPostTest method searchPostsNoFields.

@Test
public void searchPostsNoFields() {
    goTo(driver);
    SearchCriteria searchTopicCriteria = new SearchCriteria();
    List<Post> posts = searchPost(driver, searchTopicCriteria);
    assertTrue(posts == null);
}
Also used : ViewPagePostSearch.searchPost(it.vige.rubia.selenium.search.action.ViewPagePostSearch.searchPost) Post(it.vige.rubia.model.Post) SearchCriteria(it.vige.rubia.search.SearchCriteria) Test(org.junit.Test)

Aggregations

SearchCriteria (it.vige.rubia.search.SearchCriteria)14 Test (org.junit.Test)13 Post (it.vige.rubia.model.Post)8 Topic (it.vige.rubia.model.Topic)8 CreateTopic.createTopic (it.vige.rubia.selenium.forum.action.CreateTopic.createTopic)7 RemoveTopic.removeTopic (it.vige.rubia.selenium.forum.action.RemoveTopic.removeTopic)7 ViewPageTopicSearch.getTopic (it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getTopic)7 ViewPageTopicSearch.searchTopic (it.vige.rubia.selenium.search.action.ViewPageTopicSearch.searchTopic)7 ViewPagePostSearch.searchPost (it.vige.rubia.selenium.search.action.ViewPagePostSearch.searchPost)6 Poster (it.vige.rubia.model.Poster)4 ViewPageTopicSearch.getPoster (it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getPoster)2 Date (java.util.Date)2 ResourceBundle (java.util.ResourceBundle)2 ViewPageTopicSearch.getPosterLastPost (it.vige.rubia.selenium.search.action.ViewPageTopicSearch.getPosterLastPost)1