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();
}
Aggregations