Search in sources :

Example 1 with DeleteContextEntryCommand

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

the class ContextGridTest method testDeleteContextEntry.

@Test
public void testDeleteContextEntry() {
    setupGrid(0);
    grid.deleteContextEntry(0);
    verify(sessionCommandManager).execute(eq(canvasHandler), deleteContextEntryCommandCaptor.capture());
    final DeleteContextEntryCommand deleteContextEntryCommand = deleteContextEntryCommandCaptor.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) DeleteContextEntryCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.context.DeleteContextEntryCommand) Test(org.junit.Test)

Aggregations

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