use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method testMinimalWidthNoCellsInMiddleWithPadding.
/**
* (10)[100](10)
* (10)-(10)
* (10)[50][60](10)
*/
@Test
public void testMinimalWidthNoCellsInMiddleWithPadding() throws Exception {
gridData.appendColumn(column);
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
mockCellsWithPadding(0, 0, PADDING, 100);
mockCellsWithPadding(1, 0, PADDING);
mockCellsWithPadding(2, 0, PADDING, 50, 60);
Assertions.assertThat(column.getMinimumWidth()).isEqualTo(130);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method testMinimalWidthTwoCellsSum.
/**
* [100]
* [50][60]
* [105]
*/
@Test
public void testMinimalWidthTwoCellsSum() throws Exception {
gridData.appendColumn(column);
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
mockCells(0, 0, 100);
mockCells(1, 0, 50, 60);
mockCells(2, 0, 105);
Assertions.assertThat(column.getMinimumWidth()).isEqualTo(110);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method testMinimalWidthDefaultWidth.
/**
* [99]
* [30][30][30]
* [49][50]
*/
@Test
public void testMinimalWidthDefaultWidth() throws Exception {
gridData.appendColumn(column);
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
mockCells(0, 0, 99);
mockCells(1, 0, 30, 30, 30);
mockCells(2, 0, 49, 50);
Assertions.assertThat(column.getMinimumWidth()).isEqualTo(DEFAULT_WIDTH);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method testMinimalWidthOneCellInEachRowWithPadding.
/**
* (10)[100](10)
* (10)[150](10)
* (10)[125](10)
*/
@Test
public void testMinimalWidthOneCellInEachRowWithPadding() throws Exception {
gridData.appendColumn(column);
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
mockCellsWithPadding(0, 0, PADDING, 100);
mockCellsWithPadding(1, 0, PADDING, 150);
mockCellsWithPadding(2, 0, PADDING, 125);
Assertions.assertThat(column.getMinimumWidth()).isEqualTo(170);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method testMinimalWidthOneCellInEachRow.
/**
* [100]
* [150]
* [125]
*/
@Test
public void testMinimalWidthOneCellInEachRow() throws Exception {
gridData.appendColumn(column);
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
gridData.appendRow(new DMNGridRow());
mockCells(0, 0, 100d);
mockCells(1, 0, 150);
mockCells(2, 0, 125);
Assertions.assertThat(column.getMinimumWidth()).isEqualTo(150);
}
Aggregations