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

#6844 Incorrect question gap in detail form #6940

Merged
merged 1 commit into from
Sep 12, 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
1 change: 1 addition & 0 deletions src/question_matrixdropdownbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2303,6 +2303,7 @@ export class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseModel<Mat
if (this.isDesignMode) return this.detailPanel;
var panel = this.createNewDetailPanel();
panel.readOnly = this.isReadOnly;
panel.setSurveyImpl(row);
var json = this.detailPanel.toJSON();
new JsonObject().toObject(json, panel);
panel.renderWidth = "100%";
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions visualRegressionTests/tests/defaultV2/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,33 @@ frameworks.forEach(framework => {
});
});

test("Matrix detail questions in one row", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, {
elements: [
{
type: "matrixdynamic",
name: "matrix",
rowCount: 2,
detailPanelMode: "underRow",
columns: [{ name: "col1" }],
detailElements: [{ type: "text", name: "q1" }, { type: "text", name: "q2", startWithNewLine: false }],
minWidth: "800px",
maxWidth: "800px",
width: "800px"
},
],
});
await t
.click(Selector("#show-detail").nth(0))
.click(Selector("body"), { offsetX: 5, offsetY: 5 });

const questionRoot = Selector(".sd-question");
await takeElementScreenshot("question-matrix-detail-one-row.png", questionRoot, t, comparer);
});
});

test("Matrix many columns", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(800, 600);
Expand Down
Loading