UNPKG

@vendasta/store

Version:

Components and data for Store

22 lines (21 loc) 1.29 kB
import { VaSellingInfoComponent } from './selling-info.component'; describe('VaSellingInfoComponent', function () { var component; beforeEach(function () { component = new VaSellingInfoComponent(); }); describe('filterDescription', function () { it('should return the same description if there is no video iframe code', function () { component.description = 'short description in the selling information'; expect(component.filterDescription).toEqual('short description in the selling information'); }); it('should add the styling with maxWith=100% if there is video iframe code', function () { component.description = 'short description<iframe scrolling=\"no\" allowTransparency=\"true\" allowfullscreen ' + 'frameborder=\"0\" width=\"640\" height=\"360\" ' + 'src=\"https://goanimate.com/player/embed/0GwtMpbWQ-Ho\"></iframe>'; expect(component.filterDescription).toEqual('short description<iframe style=\"max-width:100%\" ' + 'scrolling=\"no\" allowTransparency=\"true\" allowfullscreen frameborder=\"0\" width=\"640\" height=\"360\"' + ' src=\"https://goanimate.com/player/embed/0GwtMpbWQ-Ho\"></iframe>'); }); }); });