From 5a8158eaa235c931d444d4ac6234a0e91bf506d3 Mon Sep 17 00:00:00 2001 From: RomanTsukanov Date: Wed, 24 Jan 2024 17:59:31 +0400 Subject: [PATCH] Rename the method and add a description --- src/survey.ts | 5 ++++- tests/surveytests.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/survey.ts b/src/survey.ts index 7d7c15e2aa..2c0e5ff1d8 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -5737,7 +5737,10 @@ export class SurveyModel extends SurveyElementCore private conditionRunnerCounter: number = 0; private conditionUpdateVisibleIndexes: boolean = false; private conditionNotifyElementsOnAnyValueOrVariableChanged: boolean = false; - public runAllExpressions(): void { + /** + * Recalculates all [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) in the survey. + */ + public runExpressions(): void { this.runConditions(); } private runConditions() { diff --git a/tests/surveytests.ts b/tests/surveytests.ts index d2918c711d..f8ec6815fa 100644 --- a/tests/surveytests.ts +++ b/tests/surveytests.ts @@ -18765,7 +18765,7 @@ QUnit.test("element.wasREndered", function (assert) { assert.equal(panel2.wasRendered, true, "panel2 wasRendered, #2"); assert.equal(q6.wasRendered, true, "q6 wasRendered, #2"); }); -QUnit.test("survey.runAllExpressions(), #7694", function (assert) { +QUnit.test("survey.runExpressions(), #7694", function (assert) { function func1(params: any[]): any { return 1; } @@ -18789,7 +18789,7 @@ QUnit.test("survey.runAllExpressions(), #7694", function (assert) { assert.equal(q2.isVisible, false, "q2.isVisible #1"); FunctionFactory.Instance.register("func1", func1); - survey.runAllExpressions(); + survey.runExpressions(); assert.equal(q1.value, 1, "q1.value #2"); assert.equal(q2.isVisible, true, "q2.isVisible #2");