Search in sources :

Example 1 with WidgetPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject in project selenium-tests by Wikia.

the class AllTagsTests method beforeMethod.

@BeforeMethod(alwaysRun = true)
public void beforeMethod() {
    widgets = new ArrayList<>();
    widgets.add(new PollsnackWidgetPageObject(driver));
    widgets.add(new SoundCloudWidgetPageObject(driver));
    widgets.add(new SpotifyWidgetPageObject(driver));
    widgets.add(new TwitterWidgetPageObject(driver));
    widgets.add(new VKWidgetPageObject(driver));
    widgets.add(new WeiboWidgetPageObject(driver));
    widgets.add(new GoogleFormWidgetPageObject(driver));
    widgets.add(new PolldaddyWidgetPageObject(driver));
    widgets.add(new PlaybuzzWidgetPageObject(driver));
    widgets.add(new ApesterWidgetPageObject(driver));
    String content = ">>> " + DateTime.now().getMillis() + " <<<";
    for (WidgetPageObject widget : widgets) {
        content += widget.getSingleTag();
    }
    ArticleContent articleContent = new ArticleContent();
    articleContent.clear(ARTICLE_NAME);
    articleContent.push(content, ARTICLE_NAME);
}
Also used : SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) WidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with WidgetPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject in project selenium-tests by Wikia.

the class AllTagsTests method MercuryAllTagsWidgetTest_003_isLoadedOnSecondVisitFromDifferentArticle.

@Test(groups = "MercuryAllTagsWidgetTest_003")
public void MercuryAllTagsWidgetTest_003_isLoadedOnSecondVisitFromDifferentArticle() {
    init();
    navigate.toPage(ARTICLE_NAME);
    topBar.openSearch().navigateToPage(QUERY_1);
    topBar.openSearch().navigateToPage(QUERY_2);
    for (WidgetPageObject widget : widgets) {
        Assertion.assertTrue(widget.isLoaded(), MercuryMessages.INVISIBLE_MSG);
    }
}
Also used : GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) WidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) Test(org.testng.annotations.Test)

Example 3 with WidgetPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject in project selenium-tests by Wikia.

the class AllTagsTests method MercuryAllTagsWidgetTest_001_isLoadedOnFirstVisitDirectlyFromUrl.

@Test(groups = "MercuryAllTagsWidgetTest_001")
public void MercuryAllTagsWidgetTest_001_isLoadedOnFirstVisitDirectlyFromUrl() {
    init();
    navigate.toPage(ARTICLE_NAME);
    for (WidgetPageObject widget : widgets) {
        Assertion.assertTrue(widget.isLoaded(), MercuryMessages.INVISIBLE_MSG);
    }
}
Also used : GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) WidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) Test(org.testng.annotations.Test)

Example 4 with WidgetPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject in project selenium-tests by Wikia.

the class AllTagsTests method prepareTest.

@BeforeMethod(alwaysRun = true)
public void prepareTest() {
    driver.manage().timeouts().pageLoadTimeout(100, TimeUnit.SECONDS);
    widgets = new ArrayList<>();
    widgets.add(new PollsnackWidgetPageObject(driver));
    widgets.add(new SoundCloudWidgetPageObject(driver));
    widgets.add(new SpotifyWidgetPageObject(driver));
    widgets.add(new TwitterWidgetPageObject(driver));
    widgets.add(new VKWidgetPageObject(driver));
    widgets.add(new WeiboWidgetPageObject(driver));
    widgets.add(new GoogleFormWidgetPageObject(driver));
    widgets.add(new PolldaddyWidgetPageObject(driver));
    widgets.add(new PlaybuzzWidgetPageObject(driver));
    widgets.add(new ApesterWidgetPageObject(driver));
    String content = "";
    for (WidgetPageObject widget : widgets) {
        content += widget.getSingleTag();
    }
    ArticleContent articleContent = new ArticleContent();
    articleContent.clear(ARTICLE_NAME);
    articleContent.push(content, ARTICLE_NAME);
}
Also used : SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) WidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with WidgetPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject in project selenium-tests by Wikia.

the class AllTagsTests method MercuryAllTagsWidgetTest_002_isLoadedOnFirstVisitFromDifferentArticle.

@Test(groups = "MercuryAllTagsWidgetTest_002")
public void MercuryAllTagsWidgetTest_002_isLoadedOnFirstVisitFromDifferentArticle() {
    init();
    navigate.toPage(MercurySubpages.MAIN_PAGE);
    topBar.openSearch().navigateToPage(QUERY_2);
    for (WidgetPageObject widget : widgets) {
        Assertion.assertTrue(widget.isLoaded(), MercuryMessages.INVISIBLE_MSG);
    }
}
Also used : GoogleFormWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject) WeiboWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject) ApesterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject) VKWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject) SoundCloudWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject) PolldaddyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject) TwitterWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject) SpotifyWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject) WidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject) PollsnackWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject) PlaybuzzWidgetPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject) Test(org.testng.annotations.Test)

Aggregations

ApesterWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.ApesterWidgetPageObject)5 GoogleFormWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.GoogleFormWidgetPageObject)5 PlaybuzzWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PlaybuzzWidgetPageObject)5 PolldaddyWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PolldaddyWidgetPageObject)5 PollsnackWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.PollsnackWidgetPageObject)5 SoundCloudWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SoundCloudWidgetPageObject)5 SpotifyWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.SpotifyWidgetPageObject)5 TwitterWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.TwitterWidgetPageObject)5 VKWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.VKWidgetPageObject)5 WeiboWidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WeiboWidgetPageObject)5 WidgetPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.widget.WidgetPageObject)5 Test (org.testng.annotations.Test)3 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 BeforeMethod (org.testng.annotations.BeforeMethod)2