Search in sources :

Example 21 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CreateWikiTests_loggedInUser method CreateNewWiki_001_createDeleteWiki.

@Test(groups = { "CNW", "CreateNewWikiLoggedIn_001" })
@Execute(asUser = User.USER_CNW)
public void CreateNewWiki_001_createDeleteWiki() {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    String wikiName = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.verifyNextButtonEnabled();
    CreateNewWikiPageObjectStep2 cnw2 = cnw1.submit();
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.verifyWikiTitleOnCongratualtionsLightBox(wikiName);
    article.closeNewWikiCongratulationsLightBox();
    article.verifyWikiTitleHeader(wikiName);
    DeletePageObject deletePage = article.deleteUsingDropdown();
    deletePage.submitDeletion();
    article.verifyUserLoggedIn(User.USER_CNW.getUserName());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 22 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute 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 23 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute 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 24 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CommunityPageSalesPitchDialogTests method verifySalesPitchDialogDisplayedOnlyOnFourthPageview.

@Execute(disableCommunityPageSalesPitchDialog = "false")
public void verifySalesPitchDialogDisplayedOnlyOnFourthPageview() {
    String articleTitle = PageContent.ARTICLE_NAME_PREFIX + ArticlePageObject.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject();
    // 2nd pageview
    article.open(articleTitle);
    // 3rd pageview
    article.open(articleTitle);
    // 4th pageview
    article.open(articleTitle);
    Assertion.assertTrue(new SalesPitchDialog().isDialogVisible());
    // 5th pageview
    article.open(articleTitle);
    Assertion.assertFalse(new SalesPitchDialog().isDialogVisible());
    // 6th pageview
    article.open(articleTitle);
    Assertion.assertFalse(new SalesPitchDialog().isDialogVisible());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SalesPitchDialog(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Example 25 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CommunityPageSalesPitchDialogTests method verifyClickHelpOutButtonRedirectToSpecialCommunity.

@Execute(disableCommunityPageSalesPitchDialog = "false")
public void verifyClickHelpOutButtonRedirectToSpecialCommunity() {
    String articleTitle = PageContent.ARTICLE_NAME_PREFIX + ArticlePageObject.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject();
    // 2nd pageview
    article.open(articleTitle);
    // 3rd pageview
    article.open(articleTitle);
    // 4th pageview
    article.open(articleTitle);
    Assertion.assertTrue(new SalesPitchDialog().clickHelpOutButton().isCommunityPageOpen());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SalesPitchDialog(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)413 Test (org.testng.annotations.Test)402 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)146 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)68 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)58 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)55 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)30 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)30 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)24 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)23 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)22 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)21 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)19 ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)18 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)17