Skip to content

Commit

Permalink
Fixed u-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 authored Dec 30, 2023
1 parent b47efc7 commit 57cddea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/survey-creator-knockout/tests/creator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test("getObjectDisplayName", () => {
// expect(true).toEqual(true);
// });

test("isChost value for attached element", (): any => {
test("isGhost value for attached element", (): any => {
const creator = new SurveyCreator();
creator.JSON = {
elements: [
Expand All @@ -39,9 +39,9 @@ test("isChost value for attached element", (): any => {
expect(designerPlugin.model.newPage).toBeTruthy();
let pageAdornerModel = new CreatorSurveyPageComponent(creator as any, designerPlugin.model.newPage as any);
expect(pageAdornerModel.isGhost).toBeTruthy();
expect(designerPlugin.model.newPage["onPropChangeFunctions"].filter(f => f.name === "title").length).toBe(3);
expect(designerPlugin.model.newPage["onPropChangeFunctions"].filter(f => f.name === "title").length).toBe(1);

pageAdornerModel = new CreatorSurveyPageComponent(creator as any, creator.survey.pages[0] as any);
expect(pageAdornerModel.isGhost).toBeFalsy();
expect(creator.survey.pages[0]["onPropChangeFunctions"].filter(f => f.name === "title").length).toBe(0);
});
});

0 comments on commit 57cddea

Please sign in to comment.