Skip to content

Commit e874832

Browse files
committed
fix: update cell value change unit test
1 parent ef5e461 commit e874832

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow/src/test/java/com/vaadin/flow/component/spreadsheet/tests/CellValueChangeEventOnFormulaChangeTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
package com.vaadin.flow.component.spreadsheet.tests;
1010

1111
import static org.junit.Assert.assertEquals;
12+
import static org.junit.Assert.assertTrue;
1213

1314
import java.util.LinkedList;
1415
import java.util.List;
@@ -59,9 +60,11 @@ public void formulaChangeResultingInSameValue() {
5960
// B1 is 0, so the result doesn't change
6061
spreadsheet.getCellValueManager().onCellValueChange(3, 1, "=A1+2*B1");
6162

62-
assertEquals("There should be 1 changed cell", 1, changedCells.size());
63-
assertEquals("The changed cell should be C1",
64-
new CellReference("Sheet0!C1"), changedCells.get(0));
63+
assertEquals("There should be 2 changed cells", 2, changedCells.size());
64+
assertTrue("The changed cells should include C1 with sheet name",
65+
changedCells.contains(new CellReference("Sheet0!C1")));
66+
assertTrue("The changed cells should include C1 without sheet name",
67+
changedCells.contains(new CellReference("C1")));
6568
}
6669

6770
}

0 commit comments

Comments
 (0)