Skip to content

Commit

Permalink
Work for #7755 - Dynamic Panel with the Comment Area - The Other box …
Browse files Browse the repository at this point in the history
…is rendered incorrectly - added vr-test
  • Loading branch information
tsv2013 committed Jan 30, 2024
1 parent ec6e1a9 commit 0996ac3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 24 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 56 additions & 24 deletions visualRegressionTests/tests/defaultV2/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});
});

});

0 comments on commit 0996ac3

Please sign in to comment.