From a47037a2768d664047d9a0fc3f603f38faf5d30e Mon Sep 17 00:00:00 2001 From: Dmitry Kuzin Date: Wed, 26 Jul 2023 16:35:08 +0400 Subject: [PATCH 1/2] Fix input color/range height --- src/defaultV2-theme/blocks/sd-input.scss | 7 +++++++ .../defaultV2/etalons/question-color.png | Bin 0 -> 3670 bytes .../tests/defaultV2/question.ts | 19 ++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 visualRegressionTests/tests/defaultV2/etalons/question-color.png diff --git a/src/defaultV2-theme/blocks/sd-input.scss b/src/defaultV2-theme/blocks/sd-input.scss index 0fa9a96855..fee7136f92 100644 --- a/src/defaultV2-theme/blocks/sd-input.scss +++ b/src/defaultV2-theme/blocks/sd-input.scss @@ -98,6 +98,13 @@ width: calcSize(3); } +.sd-input[type="color"], +.sd-input[type="range"] { + box-sizing: content-box; + width: calc(100% - 4 * #{$base-unit}); + height: multiply(1.5, $font-editorfont-size); +} + .sd-input[type="range"]::-webkit-slider-runnable-track { @include runnable-track; } diff --git a/visualRegressionTests/tests/defaultV2/etalons/question-color.png b/visualRegressionTests/tests/defaultV2/etalons/question-color.png new file mode 100644 index 0000000000000000000000000000000000000000..3a2c0a3fc569f9534680e68efe2315f7fb77bc23 GIT binary patch literal 3670 zcmdT{S6q|J5=W|1R1~EvQUw&Ggc3?P^bioF1_hB0N>PduKscz#1?jy9G=wH-0BM3K zy@UV>y-Ev&9(obDU%Zd!<^F!>-iPz>&9^(VGrK$U-<{cTqq{mRj9iRVR8%ZbT}@*u zD(YsSopY8RpiH0qiNKEJJ+?p69mT$(}*=%?!5{`FA7` z1=i-)1*SG(?NY8~BeEGRUO`}sq?Nmk(Q3Z0<&-214libeH3#wGU|C`FF>283<`3*J zU!e6=MI{CX*UTmUH6Zay(+rafTN8U_O}o&GE;o6aE_d4=`w`EyXQL*iGHiU&+ zE>>3%Ugg0XF9^l2E_KUK&Fu`?ENsqqS=D%jeveREuS?ij9xC^k01HCnQDY;uzRU22 zAe9%B2$5o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8I1Nm2t7_LX_7_?$d6;LN4hR7fpC{ncV%W#dyfySgx~2Y<^={14 zMi)f$w`-duPh-t&zRBxQlp2$d_P_cFOqKjf{B-hDDex3emmKt!Vtr{0@0oINlE)Od z!!R}dH3_+y*B$(aZP!Z*q}*(_rZ)CYLAde(1b`X=01^+n+ScJc?XQDjDlnrqAjC8C z(Vxiw6`ZT-lmmN?DIdjAr&E7Df&WBKW0JT9CFFKK^PN{3=etsX%m;K1HXR#hX83`P z8b@AbXNT62Te<5tJH-Px6OgFf+z_R;Y6>z*&v#n6JwMmgVI_kPVCKiy5%uN5Dx=Q9 Rz(bJ=s&!YhRQ=Jbe*@20zb^m) literal 0 HcmV?d00001 diff --git a/visualRegressionTests/tests/defaultV2/question.ts b/visualRegressionTests/tests/defaultV2/question.ts index 1655c14eaf..c1a00b3550 100644 --- a/visualRegressionTests/tests/defaultV2/question.ts +++ b/visualRegressionTests/tests/defaultV2/question.ts @@ -57,6 +57,25 @@ frameworks.forEach(framework => { }); }); + test("Check question color", async (t) => { + await wrapVisualTest(t, async (t, comparer) => { + await t.resizeWindow(1920, 1080); + await initSurvey(framework, { + questions: [ + { + type: "text", + inputType: "color", + name: "question_color", + width: "708px", + title: "Color question" + }, + ] + }); + const questionRoot = Selector(".sd-question"); + await takeElementScreenshot("question-color.png", questionRoot, t, comparer); + }); + }); + test("Check question num + expand/collapse", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1920, 1080); From 41d68e444a073930c0d14b2c377f74d02b169d43 Mon Sep 17 00:00:00 2001 From: Dmitry Kuzin Date: Wed, 26 Jul 2023 16:43:23 +0400 Subject: [PATCH 2/2] Update range input etalon --- .../defaultV2/etalons/question-text-range.png | Bin 4202 -> 4278 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/visualRegressionTests/tests/defaultV2/etalons/question-text-range.png b/visualRegressionTests/tests/defaultV2/etalons/question-text-range.png index 5c2cc6e2683c0d20d5b27b48a3b2d7026765ab88..30ffc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