From aeafef3124acca80a1589f416e33148d1d1c7250 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Date: Sat, 11 Nov 2023 00:50:05 +0500 Subject: [PATCH] Dev tests comment 1,2 fixes --- web/client/plugins/__tests__/GeoStory-test.jsx | 15 +++++++++++++++ web/client/themes/default/less/common.less | 12 +++++++++++- web/client/themes/default/less/wizard.less | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/web/client/plugins/__tests__/GeoStory-test.jsx b/web/client/plugins/__tests__/GeoStory-test.jsx index 70c09c1fbf..9e691ccee7 100644 --- a/web/client/plugins/__tests__/GeoStory-test.jsx +++ b/web/client/plugins/__tests__/GeoStory-test.jsx @@ -41,6 +41,21 @@ describe('GeoStory Plugin', () => { expect(actions.length).toEqual(1); expect(store.getState().geostory.currentStory.settings.theme.fontFamilies).toEqual(fontFamilies); }); + it('should handle Update Action, sets fontFamilies in merge mode', () => { + const { Plugin, actions, store } = getPluginForTest(GeoStory, stateMocker({geostory})); + const fontFamilies = [{family: "test", src: "test"}]; + + const updateAction = {type: 'UPDATE', path: 'currentPage.title', element: 'New Title', mode: 'merge', options: { uniqueByKey: 'id' }}; + + const mockInitialState = {mode: 'view', isCollapsed: false, focusedContent: {}, currentPage: {title: 'Old Title', id: 1}, settings: {}, oldSettings: {}, updateUrlOnScroll: false}; + const newState = geostory(mockInitialState, updateAction); + + ReactDOM.render( {}}} fontFamilies={fontFamilies} />, document.getElementById("container")); + + expect(newState).toEqual(mockInitialState); + expect(actions.length).toEqual(1); + expect(store.getState().geostory.currentStory.settings.theme.fontFamilies).toEqual(fontFamilies); + }); it('should store the media editor setting with onUpdateMediaEditorSetting', () => { const { Plugin, actions, store } = getPluginForTest(GeoStory, stateMocker({geostory})); const mediaEditorSettings = { diff --git a/web/client/themes/default/less/common.less b/web/client/themes/default/less/common.less index 08eb07bf8c..8fff71902c 100644 --- a/web/client/themes/default/less/common.less +++ b/web/client/themes/default/less/common.less @@ -408,7 +408,17 @@ div#sync-popover.popover { position: absolute; transform: translate(-50%, 0px); } - } +} + +// forced to avoid conflicts with no-image display for not found at link +.rdw-link-decorator-icon +{ + width: 15px !important; + min-width: 10px !important; + min-height: 15px !important; + position: static !important; + vertical-align: text-top; +} .form-control.intl-numeric { float: unset; diff --git a/web/client/themes/default/less/wizard.less b/web/client/themes/default/less/wizard.less index 2fd71f6de8..7f48d9973a 100644 --- a/web/client/themes/default/less/wizard.less +++ b/web/client/themes/default/less/wizard.less @@ -31,7 +31,7 @@ // ************** .ms-wizard { - position: absolute; + // position: absolute; width: 100%; .form-horizontal { .control-label {