Skip to content

Commit f4c64ee

Browse files
author
tsv2013
committed
Fixed some u-tests
1 parent bd2304d commit f4c64ee

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

packages/survey-creator-core/tests/creator-base-1.tests.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ test("QuestionAdornerViewModel actionContainer&topActionContainer on demand", ()
22672267
};
22682268
let counter = 0;
22692269
creator.onElementAllowOperations.add((sender, options) => {
2270-
counter ++;
2270+
counter++;
22712271
});
22722272
const q1Model = new QuestionAdornerViewModel(creator, creator.survey.getAllQuestions()[0], undefined);
22732273
expect(q1Model["actionContainerValue"]).toBeFalsy();
@@ -3574,7 +3574,7 @@ test("get survey JSON with pageEditModeValue=single #2711", (): any => {
35743574
try {
35753575
let creator = new CreatorTester({ pageEditMode: "single" });
35763576
creator.text = "";
3577-
expect(creator.JSON).toStrictEqual({});
3577+
expect(creator.JSON).toStrictEqual({ "headerView": "advanced" });
35783578
} finally {
35793579
surveySettings.allowShowEmptyTitleInDesignMode = true;
35803580
surveySettings.allowShowEmptyDescriptionInDesignMode = true;

packages/survey-creator-core/tests/creator-empty.tests.ts

+1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ test("onQuestionAdded fires correctly when drag drop into new page", () => {
218218
newPage.addElement(new QuestionTextModel("q1"));
219219
expect(cnt).toBe(1);
220220
expect(json).toStrictEqual({
221+
"headerView": "advanced",
221222
"pages": [
222223
{
223224
"name": "page1",

packages/survey-creator-core/tests/tabs/integration.tests.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test("saveSurvey and saveTheme actions integration", (): any => {
2020
saveThemeCount++;
2121
callback(saveNo, "success");
2222
};
23-
creator.JSON = { questions: [{ type: "text", name: "q1" }] };
23+
creator.JSON = { headerView: "advanced", questions: [{ type: "text", name: "q1" }] };
2424
const designerPlugin: TabDesignerPlugin = <TabDesignerPlugin>creator.getPlugin("designer");
2525
const saveSurveyAction = designerPlugin["saveSurveyAction"] as Action;
2626
const themePlugin: ThemeTabPlugin = <ThemeTabPlugin>creator.getPlugin("theme");

packages/survey-creator-core/tests/tabs/theme-model-property-grid.tests.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ test("Disable/enable themeMode property for custom theme variations in theme pro
826826
test("headerViewContainer init state", (): any => {
827827
const creator: CreatorTester = new CreatorTester({ showThemeTab: true });
828828
const themePlugin: ThemeTabPlugin = <ThemeTabPlugin>creator.getPlugin("theme");
829-
creator.JSON = { questions: [{ type: "text", name: "q1" }] };
829+
creator.JSON = { headerView: "advanced", questions: [{ type: "text", name: "q1" }] };
830830

831831
themePlugin.activate();
832832
const groupHeader = themePlugin.propertyGrid.survey.pages[1];
@@ -1316,7 +1316,7 @@ test("header survey title font color changed", (): any => {
13161316

13171317
test("header editable after theme changed", (): any => {
13181318
const creator: CreatorTester = new CreatorTester({ showThemeTab: true });
1319-
creator.JSON = { title: "Survey Title", questions: [{ type: "text", name: "q1" }] };
1319+
creator.JSON = { title: "Survey Title", headerView: "advanced", questions: [{ type: "text", name: "q1" }] };
13201320

13211321
const themePlugin: ThemeTabPlugin = <ThemeTabPlugin>creator.getPlugin("theme");
13221322
themePlugin.activate();
@@ -1334,7 +1334,7 @@ test("header editable after theme changed", (): any => {
13341334

13351335
test("advanced header disable inheritWidthFrom and reset it to 'container' if showTOC is true", (): any => {
13361336
const creator: CreatorTester = new CreatorTester({ showThemeTab: true });
1337-
creator.JSON = { title: "Survey Title", questions: [{ type: "text", name: "q1" }] };
1337+
creator.JSON = { title: "Survey Title", headerView: "advanced", questions: [{ type: "text", name: "q1" }] };
13381338

13391339
const themePlugin: ThemeTabPlugin = <ThemeTabPlugin>creator.getPlugin("theme");
13401340
themePlugin.activate();

0 commit comments

Comments
 (0)