Skip to content

Commit

Permalink
Dev tests comment 1,2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mumairr committed Nov 10, 2023
1 parent 8962cba commit aeafef3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
15 changes: 15 additions & 0 deletions web/client/plugins/__tests__/GeoStory-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(<Plugin webFont={{load: () => {}}} 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 = {
Expand Down
12 changes: 11 additions & 1 deletion web/client/themes/default/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/client/themes/default/less/wizard.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// **************

.ms-wizard {
position: absolute;
// position: absolute;
width: 100%;
.form-horizontal {
.control-label {
Expand Down

0 comments on commit aeafef3

Please sign in to comment.