diff --git a/tests/javascript/form_editor/store/map_form_data_after_loading.spec.js b/tests/javascript/form_editor/store/map_form_data_after_loading.spec.js index cbfefc02e9..1f9036cf19 100644 --- a/tests/javascript/form_editor/store/map_form_data_after_loading.spec.js +++ b/tests/javascript/form_editor/store/map_form_data_after_loading.spec.js @@ -20,6 +20,10 @@ const data = { all: '1', }, }, + fixed_bar: { + animation: 'slideright', + }, + popup: {}, }, }, styles: 'styles definition', @@ -138,5 +142,11 @@ describe('Form Data Load Mapper', () => { expect(map(mapData).settings.formPlacement.slideIn).to.have.property('styles').that.deep.eq({ width: { unit: 'percent', value: 104 } }); expect(map(mapData).settings.formPlacement.others).to.have.property('styles').that.deep.eq({ width: { unit: 'percent', value: 105 } }); }); + + it('Maps animation', () => { + expect(map(data).settings.formPlacement.fixedBar).to.have.property('animation').that.eq('slideright'); + expect(map(data).settings.formPlacement.popup).to.have.property('animation').that.eq('slideup');// default + expect(map(data).settings.formPlacement.belowPosts).to.not.have.property('animation'); + }); }); }); diff --git a/tests/javascript/form_editor/store/map_form_data_before_saving.spec.js b/tests/javascript/form_editor/store/map_form_data_before_saving.spec.js index d62f9a773e..367c74031b 100644 --- a/tests/javascript/form_editor/store/map_form_data_before_saving.spec.js +++ b/tests/javascript/form_editor/store/map_form_data_before_saving.spec.js @@ -20,6 +20,10 @@ const data = { all: true, }, }, + fixedBar: { + animation: 'slideright', + }, + popup: {}, }, }, styles: 'styles definition', @@ -80,5 +84,11 @@ describe('Form Data Save Mapper', () => { .that.is.an('object') .that.have.property('all', '1'); }); + + it('Maps animation', () => { + expect(map(data).settings.form_placement.fixed_bar).to.have.property('animation').that.eq('slideright'); + expect(map(data).settings.form_placement.popup).to.have.property('animation'); + expect(map(data).settings.form_placement.below_posts).to.not.have.property('animation'); + }); }); });