From 7c67c9a20ed163e8a069562e0174a81a34037aed Mon Sep 17 00:00:00 2001 From: salexdv Date: Wed, 28 Feb 2024 11:36:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=B8=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B2=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D0=B5=20=D0=B1=D0=B5=D0=B7=20=D0=BF?= =?UTF-8?q?=D1=81=D0=B5=D0=B2=D0=B4=D0=BE=D0=BD=D0=B8=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test_query.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/test_query.js b/src/test_query.js index 8818cb9..fa6f4e4 100644 --- a/src/test_query.js +++ b/src/test_query.js @@ -498,6 +498,31 @@ describe("Проверка автокомлита и подсказок реда }); + it("проверка подсказки ГДЕ при отсутствии псевдонима источника", function () { + bsl = helper(`ВЫБРАТЬ + * + ИЗ + Справочник.Товары + Г`); + let suggestions = bsl.getQueryCompletion(); + expect(suggestions).to.be.an('object'); + expect(suggestions.suggestions).to.be.an('array').that.not.is.empty; + assert.equal(suggestions.suggestions.some(suggest => suggest.label === "ГДЕ"), true); + }); + + it("проверка подсказки реквизитов при отсутствии псевдонима источника", function () { + bsl = helper(`ВЫБРАТЬ + * + ИЗ + Справочник.Товары + ГДЕ + Н`); + let suggestions = bsl.getQueryCompletion(); + expect(suggestions).to.be.an('object'); + expect(suggestions.suggestions).to.be.an('array').that.not.is.empty; + assert.equal(suggestions.suggestions.some(suggest => suggest.label === "Наименование"), true); + }); + setLanguageMode('bsl_query'); mocha.run();