Search in sources :

Example 1 with SocialMediaTab

use of com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.SocialMediaTab in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class PageTests method testSocialMediaPageProperties.

public void testSocialMediaPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // Open the Social Media tab
    SocialMediaTab socialMediaTab = propertiesPage.clickTab("social media", SocialMediaTab.class);
    // test social media sharing
    socialMediaTab.socialMediaSharing("facebook").click();
    socialMediaTab.socialMediaSharing("pinterest").click();
    page.setVariantPath(variantPath);
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    socialMediaTab = propertiesPage.clickTab("social media", SocialMediaTab.class);
    // check if facebook is checked
    assertTrue(socialMediaTab.socialMediaSharing("facebook").isChecked(), "Social media sharing should be enabled for Facebook");
    // check if pinterest is checked
    assertTrue(socialMediaTab.socialMediaSharing("pinterest").isChecked(), "Social media sharing should be enabled for Pinterest");
    // check if variant path is set correctly
    assertTrue(page.getVariantPath().equals(variantPath), "Variant path should be set to " + variantPath);
}
Also used : PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) SocialMediaTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.SocialMediaTab)

Aggregations

PropertiesPage (com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)1 SocialMediaTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.SocialMediaTab)1