diff --git a/packages/survey-angular-ui/src/components/header/header-cell.component.html b/packages/survey-angular-ui/src/components/header/header-cell.component.html index 6a836e1713..bb7ba3e839 100644 --- a/packages/survey-angular-ui/src/components/header/header-cell.component.html +++ b/packages/survey-angular-ui/src/components/header/header-cell.component.html @@ -11,7 +11,7 @@
-
+
diff --git a/packages/survey-angular-ui/src/components/header/header-mobile.component.html b/packages/survey-angular-ui/src/components/header/header-mobile.component.html index bbc23b42b3..dbabc95928 100644 --- a/packages/survey-angular-ui/src/components/header/header-mobile.component.html +++ b/packages/survey-angular-ui/src/components/header/header-mobile.component.html @@ -10,7 +10,7 @@
-
+
\ No newline at end of file diff --git a/packages/survey-angular-ui/src/components/survey-header/survey-header.component.html b/packages/survey-angular-ui/src/components/survey-header/survey-header.component.html index 3857fca0fa..af02f12869 100644 --- a/packages/survey-angular-ui/src/components/survey-header/survey-header.component.html +++ b/packages/survey-angular-ui/src/components/survey-header/survey-header.component.html @@ -5,7 +5,7 @@ [style.maxWidth]="survey.titleMaxWidth" > -
+
diff --git a/packages/survey-vue3-ui/src/Header.vue b/packages/survey-vue3-ui/src/Header.vue index 2bc7555952..4e081c4768 100644 --- a/packages/survey-vue3-ui/src/Header.vue +++ b/packages/survey-vue3-ui/src/Header.vue @@ -11,9 +11,9 @@ v-bind:style="{ maxWidth: survey.titleMaxWidth }" > -
- -
+
+ +
-
-
+ diff --git a/packages/survey-vue3-ui/src/components/header/HeaderMobile.vue b/packages/survey-vue3-ui/src/components/header/HeaderMobile.vue index 61e64f94dd..f234dd4a6e 100644 --- a/packages/survey-vue3-ui/src/components/header/HeaderMobile.vue +++ b/packages/survey-vue3-ui/src/components/header/HeaderMobile.vue @@ -16,9 +16,9 @@
-
+
-
+
diff --git a/src/knockout/components/header/cell.html b/src/knockout/components/header/cell.html index ba0f541733..eb756d54e9 100644 --- a/src/knockout/components/header/cell.html +++ b/src/knockout/components/header/cell.html @@ -14,10 +14,10 @@
-
+
-
+
diff --git a/src/knockout/components/header/mobile.html b/src/knockout/components/header/mobile.html index 9a55a615d5..f484f7ec01 100644 --- a/src/knockout/components/header/mobile.html +++ b/src/knockout/components/header/mobile.html @@ -13,10 +13,10 @@
-
+
-
+
diff --git a/src/knockout/templates/header.html b/src/knockout/templates/header.html index 8901fa03d9..4f264d6abc 100644 --- a/src/knockout/templates/header.html +++ b/src/knockout/templates/header.html @@ -11,10 +11,10 @@ -
+
-
+ diff --git a/src/react/components/header.tsx b/src/react/components/header.tsx index 5ab24af57a..96ffaac323 100644 --- a/src/react/components/header.tsx +++ b/src/react/components/header.tsx @@ -37,9 +37,9 @@ export class HeaderMobile extends React.Component { ) : null} {this.model.survey.renderedHasDescription ? (
-
+
{SurveyElementBase.renderLocString(this.model.survey.locDescription)} -
+
) : null} ); } @@ -74,9 +74,9 @@ export class HeaderCell extends React.Component { ) : null} {this.model.showDescription ? (
-
+
{SurveyElementBase.renderLocString(this.model.survey.locDescription)} -
+
) : null} ); diff --git a/src/react/components/survey-header/survey-header.tsx b/src/react/components/survey-header/survey-header.tsx index 8f6df2235e..2eb3c62e41 100644 --- a/src/react/components/survey-header/survey-header.tsx +++ b/src/react/components/survey-header/survey-header.tsx @@ -45,7 +45,7 @@ export class SurveyHeader extends React.Component { style={{ maxWidth: this.survey.titleMaxWidth }} > - { this.survey.renderedHasDescription ?
{description}
: null } + {this.survey.renderedHasDescription ?
{description}
: null} ); } diff --git a/src/vue/components/header/header-cell.vue b/src/vue/components/header/header-cell.vue index c3af14c4d7..094aec7d9b 100644 --- a/src/vue/components/header/header-cell.vue +++ b/src/vue/components/header/header-cell.vue @@ -17,9 +17,9 @@
-
+
-
+
diff --git a/src/vue/components/header/header-mobile.vue b/src/vue/components/header/header-mobile.vue index 434c11d06a..634a9cc9a3 100644 --- a/src/vue/components/header/header-mobile.vue +++ b/src/vue/components/header/header-mobile.vue @@ -16,9 +16,9 @@
-
+
-
+
diff --git a/src/vue/header.vue b/src/vue/header.vue index 455d2559bb..e3aaf6da90 100644 --- a/src/vue/header.vue +++ b/src/vue/header.vue @@ -17,9 +17,9 @@ v-bind:style="{ maxWidth: survey.titleMaxWidth }" > -
+
-
+
diff --git a/tests/markup/etalon_survey.ts b/tests/markup/etalon_survey.ts index 567bff5ad0..531d313560 100644 --- a/tests/markup/etalon_survey.ts +++ b/tests/markup/etalon_survey.ts @@ -122,5 +122,74 @@ registerMarkupTests( div.appendChild(image); return div; } + }, + { + name: "Test survey description", + json: { + "title": "Test", + "description": "Description", + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "text", + "name": "question1" + } + ] + } + ] + }, + event: "onAfterRenderHeader", + snapshot: "survey-header" + }, + { + name: "Test survey description - header advanced mode", + json: { + "title": "Test", + "description": "Description", + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "text", + "name": "question1" + } + ] + } + ], + "headerView": "advanced" + }, + event: "onAfterRenderSurvey", + getSnapshot: el => { + return el.querySelector(".sv-header__cell.sv-header__cell--middle.sv-header__cell--right")?.outerHTML || ""; + }, + snapshot: "survey-header-advanced" + }, + { + name: "Test survey description - header advanced mode mobile", + json: { + "title": "Test", + "description": "Description", + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "text", + "name": "question1" + } + ] + } + ], + "headerView": "advanced" + }, + event: "onAfterRenderSurvey", + initSurvey: survey => survey.setIsMobile(true), + getSnapshot: el => { + return el.querySelector(".sv-header--mobile")?.outerHTML || ""; + }, + snapshot: "survey-header-advanced-mobile" } ]); \ No newline at end of file diff --git a/tests/markup/snapshots/survey-header-advanced-mobile.snap.html b/tests/markup/snapshots/survey-header-advanced-mobile.snap.html new file mode 100644 index 0000000000..bba1a197ed --- /dev/null +++ b/tests/markup/snapshots/survey-header-advanced-mobile.snap.html @@ -0,0 +1,12 @@ +
+
+

+ Test +

+
+
+
+ Description +
+
+
\ No newline at end of file diff --git a/tests/markup/snapshots/survey-header-advanced.snap.html b/tests/markup/snapshots/survey-header-advanced.snap.html new file mode 100644 index 0000000000..c76a20d7a8 --- /dev/null +++ b/tests/markup/snapshots/survey-header-advanced.snap.html @@ -0,0 +1,14 @@ +
+
+
+

+ Test +

+
+
+
+ Description +
+
+
+
\ No newline at end of file diff --git a/tests/markup/snapshots/survey-header.snap.html b/tests/markup/snapshots/survey-header.snap.html new file mode 100644 index 0000000000..e3e8416df1 --- /dev/null +++ b/tests/markup/snapshots/survey-header.snap.html @@ -0,0 +1,6 @@ +

+ Test +

+
+ Description +
\ No newline at end of file