diff --git a/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png b/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png new file mode 100644 index 0000000000..88e10f7922 Binary files /dev/null and b/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png differ diff --git a/visualRegressionTests/tests/defaultV2/paneldynamic.ts b/visualRegressionTests/tests/defaultV2/paneldynamic.ts index 686c35460c..8f96d925ff 100644 --- a/visualRegressionTests/tests/defaultV2/paneldynamic.ts +++ b/visualRegressionTests/tests/defaultV2/paneldynamic.ts @@ -53,9 +53,9 @@ const theme = "defaultV2"; frameworks.forEach(framework => { fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json); - }); + await applyTheme(theme); + await initSurvey(framework, json); + }); test("Paneldynamic progressTop mode", async (t) => { await wrapVisualTest(t, async (t, comparer) => { @@ -95,16 +95,16 @@ frameworks.forEach(framework => { frameworks.forEach(framework => { fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json, { - onGetPanelFooterActions: (_, opt) => { - opt.actions.push({ - title: "Duplicate", - action: () => { } - }); - } + await applyTheme(theme); + await initSurvey(framework, json, { + onGetPanelFooterActions: (_, opt) => { + opt.actions.push({ + title: "Duplicate", + action: () => { } + }); + } + }); }); - }); test("Check paneldynamic with custom actions", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1920, 1080); @@ -153,9 +153,9 @@ frameworks.forEach(framework => { }; fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json); - }); + await applyTheme(theme); + await initSurvey(framework, json); + }); test("Two Paneldynamics in one row", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1920, 1920); @@ -260,9 +260,9 @@ frameworks.forEach(framework => { }; fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json); - }); + await applyTheme(theme); + await initSurvey(framework, json); + }); test("Navigation panel by tabs", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1280, 900); @@ -379,9 +379,9 @@ frameworks.forEach(framework => { }; fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json); - }); + await applyTheme(theme); + await initSurvey(framework, json); + }); test("Paneldynamic without buttons", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1280, 900); @@ -416,9 +416,9 @@ frameworks.forEach(framework => { }; fixture`${framework} ${title} ${theme}` .page`${url_test}${theme}/${framework}`.beforeEach(async t => { - await applyTheme(theme); - await initSurvey(framework, json); - }); + await applyTheme(theme); + await initSurvey(framework, json); + }); test("Paneldynamic confirm dialog", async (t) => { await wrapVisualTest(t, async (t, comparer) => { await t.resizeWindow(1280, 900); @@ -458,4 +458,36 @@ frameworks.forEach(framework => { await takeElementScreenshot("paneldynamic-focused-tab", Selector(".sd-question--paneldynamic"), t, comparer); }); }); + test("Comment bottom padding in dynamic panel", async (t) => { + await wrapVisualTest(t, async (t, comparer) => { + await t.resizeWindow(800, 600); + const json = { + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "paneldynamic", + "name": "question1", + "showCommentArea": true, + "panelCount": 1, + "templateElements": [ + { + "type": "text", + "name": "question2" + } + ] + } + ] + } + ], + "showQuestionNumbers": "off" + }; + + await initSurvey(framework, json); + await t.wait(100); + await takeElementScreenshot("panel-dynamic-comment.png", ".sd-question--paneldynamic", t, comparer); + }); + }); + });