Add animation

[MAILPOET-3088]
This commit is contained in:
Pavel Dohnal
2020-09-14 09:05:45 +02:00
committed by Veljko V
parent cdee23417e
commit 954e4db742
2 changed files with 20 additions and 0 deletions

View File

@ -20,6 +20,10 @@ const data = {
all: '1', all: '1',
}, },
}, },
fixed_bar: {
animation: 'slideright',
},
popup: {},
}, },
}, },
styles: 'styles definition', 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.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 } }); 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');
});
}); });
}); });

View File

@ -20,6 +20,10 @@ const data = {
all: true, all: true,
}, },
}, },
fixedBar: {
animation: 'slideright',
},
popup: {},
}, },
}, },
styles: 'styles definition', styles: 'styles definition',
@ -80,5 +84,11 @@ describe('Form Data Save Mapper', () => {
.that.is.an('object') .that.is.an('object')
.that.have.property('all', '1'); .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');
});
}); });
}); });