Skip to content

Commit

Permalink
work for #8175 add asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Apr 24, 2024
1 parent e0f3d99 commit 0c5bb4e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tests/mask/mask_settings_tests.ts
Expand Up @@ -234,13 +234,22 @@ QUnit.test("isNumeric: load form data", function (assert) {
maskType: "numeric",
maskSettings: { decimalSeparator: ",", thousandsSeparator: " " },
},
{
type: "text",
name: "klausimas",
maskType: "numeric",
maskSettings: { decimalSeparator: ",", thousandsSeparator: " " },
},
],
},
],
});
survey.data = { klausimas298: "10000.99" };
const q = survey.getQuestionByName("klausimas298") as QuestionTextModel;

assert.equal(q.value, "10000.99");
assert.equal(q.inputValue, "10 000,99");
survey.data = { klausimas298: "10000.99", klausimas: 10000.99 };
const q1 = survey.getQuestionByName("klausimas298") as QuestionTextModel;
const q2 = survey.getQuestionByName("klausimas") as QuestionTextModel;

assert.equal(q1.value, "10000.99");
assert.equal(q1.inputValue, "10 000,99");
assert.equal(q2.value, "10000.99");
assert.equal(q2.inputValue, "10 000,99");
});

0 comments on commit 0c5bb4e

Please sign in to comment.