@Test public void testRefreshItemsHTML() { final HTMLElement element = mock(HTMLElement.class); dragArea.firstChild = element; mockDragAreaWithChildren(element); when(dragArea.removeChild(element)).then(a -> { dragArea.firstChild = null; return element; }); view.refreshItemsHTML(); verify(dragArea).removeChild(element); verify(dragArea).appendChild(element); }
@Override public void refreshItemsHTML() { final List<HTMLElement> draggableElements = querySelector(getDragArea()).getSortedDraggableElements(); removeChildren(getDragArea()); draggableElements.forEach(getDragArea()::appendChild); }
DNDListComponentView implements DNDListComponent.View { @Override public void refreshItemsHTML() { final List<HTMLElement> draggableElements = querySelector(getDragArea()).getSortedDraggableElements(); removeChildren(getDragArea()); draggableElements.forEach(getDragArea()::appendChild); } }
DNDListComponentView implements DNDListComponent.View { @Override public void refreshItemsHTML() { final List<HTMLElement> draggableElements = querySelector(getDragArea()).getSortedDraggableElements(); removeChildren(getDragArea()); draggableElements.forEach(getDragArea()::appendChild); } @Inject  DNDListComponentView(final HTMLDivElement dragArea); }
DNDListComponentView implements DNDListComponent.View { @Override public void refreshItemsHTML() { final List<HTMLElement> draggableElements = querySelector(getDragArea()).getSortedDraggableElements(); removeChildren(getDragArea()); draggableElements.forEach(getDragArea()::appendChild); } @Inject  DNDListComponentView(final HTMLDivElement dragArea); @Override void init(final DNDListComponent presenter); @Override HTMLElement registerItem(final HTMLElement htmlElement); @Override void refreshItemsPosition(); @Override void refreshItemsHTML(); @Override void consolidateHierarchicalLevel(final boolean isElementsDraggedByUser); @Override void consolidateYPosition(); @Override void clear(); @Override Optional<HTMLElement> getPreviousElement(final Element reference); @Override void refreshDragAreaSize(); @Override HTMLDivElement getDragArea(); }
DNDListComponentView implements DNDListComponent.View { @Override public void refreshItemsHTML() { final List<HTMLElement> draggableElements = querySelector(getDragArea()).getSortedDraggableElements(); removeChildren(getDragArea()); draggableElements.forEach(getDragArea()::appendChild); } @Inject  DNDListComponentView(final HTMLDivElement dragArea); @Override void init(final DNDListComponent presenter); @Override HTMLElement registerItem(final HTMLElement htmlElement); @Override void refreshItemsPosition(); @Override void refreshItemsHTML(); @Override void consolidateHierarchicalLevel(final boolean isElementsDraggedByUser); @Override void consolidateYPosition(); @Override void clear(); @Override Optional<HTMLElement> getPreviousElement(final Element reference); @Override void refreshDragAreaSize(); @Override HTMLDivElement getDragArea();  }