Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work for #6933: fix separator showing when there is no action bar #6974

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -289,3 +289,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);
});
});
});