Search in sources :

Example 61 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class WikiBasePageObject method openCKModeWithSectionEditButton.

public VisualEditModePageObject openCKModeWithSectionEditButton(int section) {
    WebElement sectionEditButton = sectionEditButtons.get(section);
    wait.forElementVisible(sectionEditButton);
    sectionEditButton.click();
    PageObjectLogging.log("openCKModeWithSectionEditButton", "RTE edit button clicked at section: " + section, true, driver);
    return new VisualEditModePageObject();
}
Also used : VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WebElement(org.openqa.selenium.WebElement)

Example 62 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class EditingPreferencesTests method EditPreferences_002_selectCK.

@Test(groups = { "EditPreferences_002" })
@Execute(asUser = User.USER_5, onWikia = URLsContent.VE_ENABLED_WIKI)
@RelatedIssue(issueID = "MAIN-9722", comment = "test failing randomly")
public void EditPreferences_002_selectCK() {
    EditPreferencesPage editPrefPage = new EditPreferencesPage(driver).openEditingSection();
    editPrefPage.selectPreferredEditor(CK);
    PreferencesPageObject prefPage = editPrefPage.clickSaveButton();
    List<Notification> confirmNotifications = prefPage.getNotifications(NotificationType.CONFIRM);
    Assertion.assertEquals(confirmNotifications.size(), 1, PreferencesPageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
    Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), PreferencesPageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
    String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
    ArticlePageObject aritclePage = new ArticlePageObject().open(articleName);
    VisualEditModePageObject ck = aritclePage.navigateToArticleEditPage();
    Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
    ck.clickPublishButton();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EditPreferencesPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.preferences.EditPreferencesPage) PreferencesPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.preferences.PreferencesPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 63 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class UserAndRights method blockedUserShouldSeeMessageOnArticleEdit.

@Test(groups = { "usersAndRights002" }, dependsOnMethods = { "staffCanBlockUser" })
@Execute(asUser = User.BLOCKED_USER)
public void blockedUserShouldSeeMessageOnArticleEdit() {
    VisualEditModePageObject edit = new WikiBasePageObject().goToArticleDefaultContentEditPage(wikiURL, PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis());
    edit.verifyUserLoggedIn(User.BLOCKED_USER);
    edit.verifyBlockedUserMessage();
}
Also used : VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 64 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsAnon method ArticleCRUDAnonymous_003_AddingSlideshow.

@Test(groups = { "ArticleFeatureCRUDAnonymous_003", "ArticleFeaturesCRUDAnon" })
public void ArticleCRUDAnonymous_003_AddingSlideshow() {
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.clickSlideshowButton();
    DetachedRegisterPage auth = new DetachedRegisterPage();
    assertTrue(auth.isDisplayed());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Test(org.testng.annotations.Test)

Example 65 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsAnon method ArticleCRUDAnonymous_001_AddingImage.

@Test(groups = { "ArticleFeatureCRUDAnonymous_001", "ArticleFeaturesCRUDAnon" })
public void ArticleCRUDAnonymous_001_AddingImage() {
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.clickPhotoButton();
    DetachedRegisterPage auth = new DetachedRegisterPage();
    assertTrue(auth.isDisplayed());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Test(org.testng.annotations.Test)

Aggregations

VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)89 Test (org.testng.annotations.Test)81 Execute (com.wikia.webdriver.common.core.annotations.Execute)58 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)41 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)38 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)21 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)17 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)12 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)12 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)11 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)9 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 DetachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage)6 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)5 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)4 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)4 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)3 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)3