Skip to content

Commit

Permalink
#7141 - fixed vue markup
Browse files Browse the repository at this point in the history
  • Loading branch information
novikov82 committed Oct 17, 2023
1 parent 0492e34 commit dc1c6b1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/survey-vue3-ui/src/Expression.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="question.cssClasses.text" ref="root">
<div :class="question.cssClasses.root" ref="root">
{{ question.formatedValue }}
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/vue/expression.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="question.cssClasses.text">{{ question.formatedValue }}</div>
<div :class="question.cssClasses.root">{{ question.formatedValue }}</div>
</template>

<script lang="ts">
Expand Down
1 change: 1 addition & 0 deletions tests/markup/etalon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from "./etalon_matrixdynamic";
export * from "./etalon_question";
export * from "./etalon_survey";
export * from "./etalon_signaturepad";
export * from "./etalon_expression";
export { markupTests } from "./helper";

registerMarkupTests([
Expand Down
21 changes: 21 additions & 0 deletions tests/markup/etalon_expression.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { StylesManager } from "survey-core";
import { registerMarkupTest } from "./helper";

registerMarkupTest(
{
name: "Test Expression question markup",
json: {
questions: [
{
name: "name",
type: "expression",
expression: "123",
titleLocation: "hidden"
}
]
},
snapshot: "expression",
removeIds: true,
before: () => StylesManager.applyTheme("defaultV2"),
after: () => StylesManager.applyTheme("default"),
});
1 change: 1 addition & 0 deletions tests/markup/snapshots/expression.snap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="sd-expression">123</div>

0 comments on commit dc1c6b1

Please sign in to comment.