@Test(groups = {"FBButton_005", "FacebookButton"})
 @Execute(asUser = User.USER)
 public void FBButton_005_PrefsButton_Visible() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   PreferencesPageObject prefsPage = base.openSpecialPreferencesPage(wikiURL);
   prefsPage.selectTab(tabNames.FACEBOOK);
   prefsPage.verifyFBButtonVisible();
 }
 @Test(groups = {"anonSearch", "Search", "Search1"})
 public void anonSearch() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   base.openWikiPage(testedWiki);
   NavigationBar navigation = new NavigationBar(driver);
   IntraWikiSearchPageObject search = navigation.searchFor(SearchContent.SEARCH_PHRASE_RESULTS);
   search.verifyFirstArticleNameTheSame(SearchContent.SEARCH_PHRASE_RESULTS);
 }
 @Test(groups = {"FBButton_004", "FacebookButton"})
 public void FBButton_004_ForcedLoginButton_Visible() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   SpecialNewFilesPageObject specialPage = base.openSpecialNewFiles(wikiURL);
   specialPage.verifySpecialPage();
   specialPage.addPhoto();
   specialPage.verifyModalLoginAppeared();
   specialPage.verifyModalFBButtonVisible();
 }
 @Test(groups = {"CuratedContent001", "CuratedContent"})
 public void curatedContent001_saveWithoutImage() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
   SpecialCuratedContentPageObject cc = base.openSpecialCuratedContent(wikiURL);
   // add new element without image
   cc.addNewElement(CATEGORY, LABEL);
   // verify error message and save button not clickable
   cc.verifyImageErrorInLastElement();
   cc.verifySaveNotClickable();
 }
 @Test(
     enabled = false,
     groups = {"PinMapTests_009", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_009_VerifyArticlePlaceholder() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject addPinModal = selectedMap.placePinInMap();
   addPinModal.verifyAssociatedArticlePlaceholder();
 }
 @RelatedIssue(issueID = " ", comment = "This maps test should not fail")
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Test(groups = {"PinMapTests_004", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_004_VerifyPopUpAfterClickPin() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   selectedMap.clickOnPin(0);
   selectedMap.verifyPopUpVisible();
 }
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Test(
     enabled = false,
     groups = {"PinMapTests_006", "PinMapTests", "InteractiveMaps", "PinMapTests_004"})
 @Execute(asUser = User.USER)
 public void PinMapTests_006_VerifyChangePinData() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   selectedMap.clickOnFilterBoxTitle();
   AddPinComponentObject pinModal = selectedMap.placePinInMap();
   String pinTitle = base.getTimeStamp();
   String pinDescription = base.getTimeStamp() + base.getTimeStamp();
   pinModal.typePinName(pinTitle);
   pinModal.selectPinType();
   pinModal.typePinDescription(pinDescription);
   selectedMap = pinModal.clickSaveButton();
   pinModal = selectedMap.clickOnEditPin();
   pinModal.clearPinName();
   pinModal.typePinName(base.getTimeStamp() + base.getTimeStamp());
   pinModal.clearPinDescription();
   pinModal.typePinDescription(base.getTimeStamp());
   selectedMap = pinModal.clickSaveButton();
   selectedMap.verifyPinDataWasChanged(pinTitle, pinDescription);
   selectedMap.refreshPage();
   selectedMap.clickOnPin(0);
 }
 @Test(groups = {"CuratedContent002", "CuratedContent"})
 public void curatedContent002_saveWithImage() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
   SpecialCuratedContentPageObject cc = base.openSpecialCuratedContent(wikiURL);
   // add new element and add image to that element
   cc.addNewElement(CATEGORY, LABEL);
   PhotoAddComponentObject addPhotoModal = cc.clickImageOnLastElement();
   addPhotoModal.clickAddThisPhoto(1);
   cc.verifyImageInLastElement();
   cc.clickSave();
   cc.verifySuccesfulSave();
   // clean the added element
   cc.removeLastElement();
   cc.clickSave();
   cc.verifySuccesfulSave();
 }
 @Test
 @UseUnstablePageLoadStrategy
 public void signUpWithFacebook() {
   new RemoveFacebookPageObject(driver)
       .removeWikiaApps(user.getEmail(), user.getPassword())
       .logOutFB();
   WikiBasePageObject base = new WikiBasePageObject(driver);
   base.openWikiPage(wikiURL);
   FacebookMainPageObject fbLogin = base.openFacebookMainPage();
   FacebookUserPageObject userFB;
   userFB = fbLogin.login(user.getEmail(), user.getPassword());
   userFB.verifyPageLogo();
   SignUpPageObject signUp = userFB.navigateToSpecialSignUpPage(wikiURL);
   FacebookSignupModalComponentObject fbModal = signUp.clickFacebookSignUp();
   fbModal.acceptWikiaAppPolicy();
   String userName = "******" + DateTime.now().getMillis();
   String password = "******" + DateTime.now().getMillis();
   fbModal.typeUserName(userName);
   fbModal.typePassword(password);
   fbModal.createAccount();
   base.openWikiPage(wikiURL);
   base.appendToUrl("noads=1");
   base.verifyUserLoggedIn(userName);
   base.logOut(wikiURL);
 }
 @Test(
     enabled = false,
     groups = {"PinMapTests_001", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_001_VerifyPinModalContent() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject pinDialog = selectedMap.placePinInMap();
   pinDialog.verifyPinTitleFieldIsDisplayed();
   pinDialog.verifyAssociatedArticleFieldIsDisplayed();
   pinDialog.verifyAssociatedArticleImagePlaceholderIsDisplayed();
   pinDialog.verifyPinCategorySelectorIsDisplayed();
   pinDialog.verifyDescriptionFieldIsDisplayed();
   selectedMap = pinDialog.clickCancelButton();
 }
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Test(
     enabled = false,
     groups = {"PinMapTests_005", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_005_VerifyDeletePin() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   selectedMap.clickOnFilterBoxTitle();
   selectedMap.clickOnPin(0);
   String pinName = selectedMap.getOpenPinName();
   selectedMap.verifyPopUpVisible();
   AddPinComponentObject editPinModal = selectedMap.clickOnEditPin();
   selectedMap = editPinModal.clickDeletePin();
   selectedMap.verifyPinNotExists(pinName);
 }
 @Test(
     enabled = false,
     groups = {"PinMapTests_003", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_003_VerifyPinCreationErrors() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject addPinModal = selectedMap.placePinInMap();
   addPinModal.clickSaveButton();
   addPinModal.verifyErrorExists();
   addPinModal.typePinName(InteractiveMapsContent.PIN_DESCRIPTION);
   addPinModal.clickSaveButton();
   addPinModal.verifyErrorExists();
   addPinModal.selectPinType();
   addPinModal.clickSaveButton();
   addPinModal.verifyErrorExists();
 }
 @Test(
     enabled = false,
     groups = {"PinMapTests_008", "PinMapTests", "InteractiveMaps"})
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Execute(asUser = User.USER)
 public void PinMapTests_008_VerifyErrorMessageWhenAssociatedArticleNotExist() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject addPinModal = selectedMap.placePinInMap();
   addPinModal.typePinName(InteractiveMapsContent.PIN_NAME);
   addPinModal.typeAssociatedArticle(InteractiveMapsContent.ARTICLE_WHICH_DOES_NOT_EXIST);
   addPinModal.selectPinType();
   addPinModal.clickSaveButton();
   addPinModal.verifyErrorContent(
       InteractiveMapsContent.ARTICLE_NOT_EXIST_ERROR.replace(
           "%articlename%", InteractiveMapsContent.ARTICLE_WHICH_DOES_NOT_EXIST));
 }
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Test(
     enabled = false,
     groups = {"PinMapTests_007", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_007_VerifyValidExternalUrlCanBeAdded() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject addPinModal = selectedMap.placePinInMap();
   addPinModal.typePinName(InteractiveMapsContent.PIN_NAME);
   addPinModal.typeAssociatedArticle(InteractiveMapsContent.EXTERNAL_LINK);
   addPinModal.selectPinType();
   selectedMap = addPinModal.clickSaveButton();
   selectedMap.verifyPinTitleLink();
   selectedMap.clickOpenPinTitle();
   selectedMap.verifyUrlInNewWindow(InteractiveMapsContent.EXTERNAL_LINK);
 }
 @DontRun(env = {"dev", "sandbox", "preview"})
 @Test(
     enabled = false,
     groups = {"PinMapTests_002", "PinMapTests", "InteractiveMaps"})
 @Execute(asUser = User.USER)
 public void PinMapTests_002_VerifySuggestionsAndAssociatedImage() {
   WikiBasePageObject base = new WikiBasePageObject();
   InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
   InteractiveMapPageObject selectedMap =
       specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
   selectedMap.verifyMapOpened();
   AddPinComponentObject pinDialog = selectedMap.placePinInMap();
   pinDialog.verifyPinTitleFieldIsDisplayed();
   pinDialog.typePinName(InteractiveMapsContent.PIN_NAME);
   String placeholderSrc = pinDialog.getAssociatedArticleImageSrc();
   pinDialog.typeAssociatedArticle(InteractiveMapsContent.ASSOCIATED_ARTICLE_NAME);
   pinDialog.clickSuggestion(0);
   pinDialog.verifyAssociatedImageIsVisible(placeholderSrc);
   pinDialog.selectPinType();
   selectedMap = pinDialog.clickSaveButton();
   selectedMap.verifyPinPopupImageIsVisible();
 }
 @Test(groups = {"FBButton_002", "FacebookButton"})
 public void FBButton_002_SignUpButton_Visible() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   SignUpPageObject signUpPage = base.openSpecialSignUpPage(wikiURL);
   signUpPage.verifyFBButtonVisible();
 }
 @Test(groups = {"FBButton_003", "FacebookButton"})
 public void FBButton_003_LoginButton_Visible() {
   WikiBasePageObject base = new WikiBasePageObject(driver);
   SpecialUserLoginPageObject login = base.openSpecialUserLogin(wikiURL);
   login.verifyFBButtonVisible();
 }