Skip to content

Commit dfb1db0

Browse files
committed
FIx unit test
1 parent 89c779b commit dfb1db0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/survey-creator-core/tests/property-grid/property-grid.tests.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3673,12 +3673,12 @@ test("Pages Collection Editor - The Trash Bin (Remove) button is unavailable whe
36733673
const creator = new CreatorTester(undefined, undefined, false);
36743674
const propertyGrid = new PropertyGridModelTester(creator.survey, creator);
36753675
const pagesQuestion = <QuestionMatrixDynamicModel>propertyGrid.survey.getQuestionByName("pages");
3676-
expect(pagesQuestion.visibleRows).toHaveLength(0);
3676+
const rowsCount = pagesQuestion.visibleRows.length;
36773677
const action = pagesQuestion.getTitleActions().filter(action => action.id === "add-item")[0];
36783678
expect(action).toBeTruthy();
36793679
action.action();
36803680
action.action();
3681-
expect(pagesQuestion.visibleRows).toHaveLength(2);
3681+
expect(pagesQuestion.visibleRows).toHaveLength(rowsCount + 2);
36823682

36833683
const rows = pagesQuestion.renderedTable.rows;
36843684
expect(rows[0].isErrorsRow).toBeFalsy();

0 commit comments

Comments
 (0)