Skip to content

Commit

Permalink
resolve #5939 Theme Editor - Logo alignment property is not working f…
Browse files Browse the repository at this point in the history
…or a basic header (#5954)

Co-authored-by: OlgaLarina <[email protected]>
  • Loading branch information
OlgaLarina and OlgaLarina authored Oct 11, 2024
1 parent 4b8a95f commit 406a4eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ export class ThemeTabPlugin implements ICreatorPlugin {
}
if (options.name == "logoPosition") {
this.creator.survey.logoPosition = options.value;
this.model.survey.logoPosition = options.value;
}
this.resetTheme.enabled = true;
this.saveThemeAction.enabled = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,15 @@ test("set headerViewContainer basic", (): any => {

const themePlugin: ThemeTabPlugin = <ThemeTabPlugin>creator.getPlugin("theme");
themePlugin.activate();
const simulatorSurvey = themePlugin.model.survey;
const themeModel = themePlugin.themeModel as ThemeModel;
const groupHeader = themePlugin.propertyGrid.survey.pages[0].getElementByName("header");
const headerViewContainer = groupHeader.elements[0].contentPanel;
const surveyTitleQuestion = headerViewContainer.getElementByName("surveyTitle");
const surveyDescriptionQuestion = headerViewContainer.getElementByName("surveyDescription");
const header = themeModel.header as HeaderModel;

expect(simulatorSurvey.logoPosition).toEqual("left");
expect(creator.survey.logoPosition).toEqual("left");
expect(header["surveyTitle"]).toStrictEqual({ family: "Open Sans", weight: "700", size: 32 });
expect(header["surveyDescription"]).toStrictEqual({ family: "Open Sans", weight: "400", size: 16 });
Expand All @@ -806,6 +808,7 @@ test("set headerViewContainer basic", (): any => {

expect(creator.theme.header).toBeUndefined();
expect(creator.survey.logoPosition).toEqual("right");
expect(simulatorSurvey.logoPosition).toEqual("right");
});

test("set headerViewContainer basic restore", (): any => {
Expand Down

0 comments on commit 406a4eb

Please sign in to comment.