Search in sources :

Example 11 with ChildrenEditor

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.commons.ChildrenEditor in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class CarouselIT method testRemoveItem.

/**
 * Test: Edit Dialog : Remove items
 *
 * 1. create new items with titles
 * 2. open the edit dialog
 * 3. remove the first item and save the edit dialog
 * 4. open the edit dialog
 * 5. verify that the first item has been removed
 * 6. verify the expanded items select
 * 7. save the edit dialog
 */
@Test
@DisplayName("Test: Edit Dialog : Remove items")
public void testRemoveItem() throws InterruptedException {
    createItems();
    CarouselEditDialog editDialog = carousel.openEditDialog(cmpPath);
    ChildrenEditor childrenEditor = editDialog.getChildrenEditor();
    childrenEditor.removeFirstItem();
    Commons.saveConfigureDialog();
    carousel.openEditDialog(cmpPath);
    ElementsCollection items = childrenEditor.getInputItems();
    assertTrue(items.size() == 2, "Number to items added should be 2");
    assertTrue(items.get(0).getValue().equals("item1"), "First input item should be item1");
    assertTrue(items.get(1).getValue().equals("item2"), "Second input item should be item2");
    Commons.saveConfigureDialog();
}
Also used : ChildrenEditor(com.adobe.cq.wcm.core.components.it.seljup.util.components.commons.ChildrenEditor) ElementsCollection(com.codeborne.selenide.ElementsCollection) CarouselEditDialog(com.adobe.cq.wcm.core.components.it.seljup.util.components.carousel.CarouselEditDialog) AuthorBaseUITest(com.adobe.cq.wcm.core.components.it.seljup.AuthorBaseUITest) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

ChildrenEditor (com.adobe.cq.wcm.core.components.it.seljup.util.components.commons.ChildrenEditor)11 ElementsCollection (com.codeborne.selenide.ElementsCollection)9 AuthorBaseUITest (com.adobe.cq.wcm.core.components.it.seljup.AuthorBaseUITest)6 DisplayName (org.junit.jupiter.api.DisplayName)6 Test (org.junit.jupiter.api.Test)6 AccordionEditDialog (com.adobe.cq.wcm.core.components.it.seljup.util.components.accordion.AccordionEditDialog)4 TabsEditDialog (com.adobe.cq.wcm.core.components.it.seljup.util.components.tabs.TabsEditDialog)4 InsertComponentDialog (com.adobe.cq.testing.selenium.pagewidgets.cq.InsertComponentDialog)3 CarouselEditDialog (com.adobe.cq.wcm.core.components.it.seljup.util.components.carousel.CarouselEditDialog)3