Search in sources :

Example 1 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class ArticleCommentsTests method ArticleComments_002_replyComment.

@Test(groups = "ArticleComments_002")
@Execute(asUser = User.COMMENTS_REGULAR_USER)
public void ArticleComments_002_replyComment() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    String comment = PageContent.COMMENT_TEXT + DateTime.now().getMillis();
    MiniEditorComponentObject editor = article.triggerCommentArea();
    editor.switchAndWrite(comment);
    article.submitComment();
    article.verifyCommentText(comment);
    article.verifyCommentCreator(User.COMMENTS_REGULAR_USER.getUserName());
    article.triggerCommentReply();
    String commentReply = PageContent.REPLY_TEXT + article.getTimeStamp();
    editor.switchAndReplyComment(commentReply);
    article.submitReplyComment();
    article.verifyCommentReply(commentReply);
    article.verifyReplyCreator(User.COMMENTS_REGULAR_USER.getUserName());
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class BlogCommentsTests method BlogComments_003_User_editComment.

@Test(groups = "BlogComments_003")
@Execute(asUser = User.USER)
public void BlogComments_003_User_editComment() {
    WikiBasePageObject base = new WikiBasePageObject();
    UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
    userProfile.clickOnBlogTab();
    BlogPageObject blogPage = userProfile.openFirstPost();
    MiniEditorComponentObject editor = blogPage.triggerCommentArea();
    String comment = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
    editor.switchAndWrite(comment);
    blogPage.submitComment();
    blogPage.verifyCommentText(comment);
    blogPage.verifyCommentCreator(credentials.userName);
    blogPage.triggerEditCommentArea();
    String commentEdited = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
    editor.switchAndEditComment(commentEdited);
    blogPage.submitEditComment();
    blogPage.verifyCommentText(commentEdited);
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class VetAddingVideoTests method VetAddVideo_002_MessageWallLibrary.

@Test(groups = { "VetAddVideo_002" })
@RelatedIssue(issueID = "QAART-889")
@Execute(asUser = User.USER)
public void VetAddVideo_002_MessageWallLibrary() {
    MessageWall wall = new MessageWall(driver).open(credentials.userName);
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    wall.clickBoldButton();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    VetAddVideoComponentObject vetAddingVideo = mini.clickAddVideo();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    mini.verifyVideoMiniEditor();
    wall.submit();
    wall.verifyPostedMessageVideo(title);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 4 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl.

@Test(groups = { "VetArticleComments_001" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-758", comment = "This issue is related to API call and should not cause permanent " + "test failure. Otherwise the failure must be caused by other issue")
public void RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject().open();
    MiniEditorComponentObject editor = article.triggerCommentArea();
    VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("microsoft");
    String expectedCaption = PageContent.CAPTION + article.getTimeStamp();
    vetAddingVideo.addVideoByUrl(video.getUrl()).setCaption(expectedCaption).submit();
    Assertion.assertTrue(article.getArticleComment().isVideoVisible());
    article.submitComment();
    Assertion.assertEquals(article.getArticleComment().getLatestCommentCaption(), expectedCaption, "Latest comment caption doesn't equal to expected caption");
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 5 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallFeaturesTests method userCanWriteMessageInItallic.

@Test(groups = { "MessageWallFeatures_003", "MessageWallFeatures", "MessageWallTests" })
@Execute(asUser = User.USER_MESSAGE_WALL)
public void userCanWriteMessageInItallic() {
    MessageWall wall = new MessageWall(driver).open(User.USER_MESSAGE_WALL.getUserName());
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    wall.setTitle(title);
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    wall.clickItalicButton();
    mini.switchAndWrite(message);
    wall.submit();
    wall.verifyMessageItalicText(title, message, User.USER_MESSAGE_WALL.getUserName());
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)34 Test (org.testng.annotations.Test)32 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)22 Execute (com.wikia.webdriver.common.core.annotations.Execute)19 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)13 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)6 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)4 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)4 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)4 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)2 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)2 MessageWallCloseRemoveThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWallCloseRemoveThreadPageObject)2 MessageWallThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWallThreadPageObject)2 WebElement (org.openqa.selenium.WebElement)2 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)1 MiniEditorPreviewComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorPreviewComponentObject)1 SpecialWikiActivityPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWikiActivityPageObject)1