Skip to content

Commit

Permalink
Fixed f-tests and updated etalons
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Nov 13, 2024
1 parent 9263540 commit 5721654
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/survey-creator-angular/src/row.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class CreatorRowComponent extends CreatorModelComponent<RowViewModel> {
}
createModel() {
this.model = new RowViewModel(this.creator, this.row, <any>undefined);
this.model.subscribeElementChanges();
}
getPropertiesToTrack(): string[] {
return ["creator", "row"];
Expand Down
1 change: 1 addition & 0 deletions packages/survey-creator-knockout/src/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class KnockoutRowViewModel extends RowViewModel {
public templateData: any
) {
super(creator, row, templateData);
this.subscribeElementChanges();
}
}

Expand Down
10 changes: 9 additions & 1 deletion packages/survey-creator-vue/src/tabs/designer/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { useCreatorModel } from "@/creator-model";
import type { QuestionRowModel } from "survey-core";
import { SurveyCreatorModel, RowViewModel } from "survey-creator-core";
import { computed } from "vue";
import { computed, onMounted, onUnmounted } from "vue";
const props = defineProps<{
componentData: { creator: SurveyCreatorModel; row: QuestionRowModel };
Expand All @@ -25,4 +25,12 @@ const model = useCreatorModel(
value.dispose();
}
);
onMounted(() => {
model.subscribeElementChanges();
});
onUnmounted(() => {
model.unsubscribeElementChanges();
});
</script>
4 changes: 2 additions & 2 deletions visualRegressionTests-V2/tests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test("Test question type converter", async (t) => {
await takeElementScreenshot("convert-to-popup.png", Selector(".sv-popup__container").filterVisible(), t, comparer);
});
});
test("Test question type converter on page for panel", async (t) => {
test("Test question type converter on page for panel - 1", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1000, 800);

Expand Down Expand Up @@ -97,7 +97,7 @@ test("Test question type converter on page for panel", async (t) => {
});
});

test("Test question type converter on page for panel", async (t) => {
test("Test question type converter on page for panel - 2", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1000, 800);

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions visualRegressionTests/tests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test("Test question type converter", async (t) => {
await takeElementScreenshot("convert-to-popup.png", Selector(".sv-popup__container").filterVisible(), t, comparer);
});
});
test("Test question type converter on page for panel", async (t) => {
test.only("Test question type converter on page for panel - 1", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1000, 800);

Expand Down Expand Up @@ -97,7 +97,7 @@ test("Test question type converter on page for panel", async (t) => {
});
});

test("Test question type converter on page for panel", async (t) => {
test.only("Test question type converter on page for panel - 2", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1000, 800);

Expand Down

0 comments on commit 5721654

Please sign in to comment.