Skip to content

Commit

Permalink
Merge branch 'master' into bug/6966-resize-observer-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Sep 18, 2023
2 parents 1e6ef38 + 573b195 commit 7b83ab2
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/defaultV2-theme/blocks/sd-paneldynamic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
border: none;
}

.sd-paneldynamic__separator:only-child {
display: none;
}

.sd-paneldynamic__panel-wrapper {
padding-bottom: calc(1 * var(--sd-base-padding));
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions visualRegressionTests/tests/defaultV2/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,110 @@ frameworks.forEach(framework => {
});
});
});

frameworks.forEach(framework => {
const json = {
"logoPosition": "right",
"pages": [
{
"name": "page1",
"elements": [
{
type: "paneldynamic",
name: "relatives",
title: "Panel Dynamic",
templateTitle: "Information about: {panel.relativeType}",
templateElements: [
{
name: "relativeType",
type: "dropdown",
title: "Relative",
choices: [
"father",
"mother",
"brother",
"sister",
"son",
"daughter"
],
isRequired: true
},
{
name: "isalive",
type: "radiogroup",
title: "Alive?",
startWithNewLine: false,
isRequired: true,
colCount: 0,
choices: ["Yes", "No"]
},
{
name: "liveage",
type: "dropdown",
title: "Age",
isRequired: true,
startWithNewLine: false,
visibleIf: "{panel.isalive} = 'Yes'",
choicesMin: 1,
choicesMax: 115
},
{
name: "deceasedage",
type: "dropdown",
title: "Deceased Age",
isRequired: true,
startWithNewLine: false,
visibleIf: "{panel.isalive} = 'No'",
choices: [
{
value: -1,
text: "Unknown"
}
],
choicesMin: 1,
choicesMax: 115
},
{
name: "causeofdeathknown",
type: "radiogroup",
title: "Cause of Death Known?",
isRequired: true,
colCount: 0,
startWithNewLine: false,
visibleIf: "{panel.isalive} = 'No'",
choices: ["Yes", "No"]
},
{
name: "causeofdeath",
type: "text",
title: "Cause of Death",
isRequired: true,
startWithNewLine: false,
visibleIf:
"{panel.isalive} = 'No' and {panel.causeofdeathknown} = 'Yes'"
}
],
panelCount: 1,
maxPanelCount: 1,
minPanelCount: 1
}
]
}
]
};
fixture`${framework} ${title} ${theme}`
.page`${url_test}${theme}/${framework}`.beforeEach(async t => {
await explicitErrorHandler();
await applyTheme(theme);
await initSurvey(framework, json);
});
test("Paneldynamic without buttons", async (t)=>{
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1280, 900);
await ClientFunction(() => {
document.body.focus();
})();
await takeElementScreenshot("paneldynamic-without-buttons", Selector(".sd-question--paneldynamic"), t, comparer);
});
});
});

0 comments on commit 7b83ab2

Please sign in to comment.