Search in sources :

Example 1 with DeleteListRowCommand

use of org.kie.workbench.common.dmn.client.commands.expressions.types.list.DeleteListRowCommand in project kie-wb-common by kiegroup.

the class ListGridTest method testDeleteListRow.

@Test
public void testDeleteListRow() {
    setupGrid();
    grid.deleteRow(0);
    verify(sessionCommandManager).execute(eq(canvasHandler), deleteListRowCommandCaptor.capture());
    final DeleteListRowCommand deleteContextEntryCommand = deleteListRowCommandCaptor.getValue();
    deleteContextEntryCommand.execute(canvasHandler);
    verify(parent).onResize();
    verify(gridPanel).refreshScrollPosition();
    verify(gridPanel).updatePanelSize();
    verify(gridLayer).batch(redrawCommandCaptor.capture());
    final GridLayerRedrawManager.PrioritizedCommand redrawCommand = redrawCommandCaptor.getValue();
    redrawCommand.execute();
    verify(gridLayer).draw();
}
Also used : GridLayerRedrawManager(org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager) DeleteListRowCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.list.DeleteListRowCommand) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DeleteListRowCommand (org.kie.workbench.common.dmn.client.commands.expressions.types.list.DeleteListRowCommand)1 GridLayerRedrawManager (org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager)1