UNPKG

1.29 kBJavaScriptView Raw
1import { VaSellingInfoComponent } from './selling-info.component';
2describe('VaSellingInfoComponent', function () {
3 var component;
4 beforeEach(function () {
5 component = new VaSellingInfoComponent();
6 });
7 describe('filterDescription', function () {
8 it('should return the same description if there is no video iframe code', function () {
9 component.description = 'short description in the selling information';
10 expect(component.filterDescription).toEqual('short description in the selling information');
11 });
12 it('should add the styling with maxWith=100% if there is video iframe code', function () {
13 component.description = 'short description<iframe scrolling=\"no\" allowTransparency=\"true\" allowfullscreen ' +
14 'frameborder=\"0\" width=\"640\" height=\"360\" ' +
15 'src=\"https://goanimate.com/player/embed/0GwtMpbWQ-Ho\"></iframe>';
16 expect(component.filterDescription).toEqual('short description<iframe style=\"max-width:100%\" ' +
17 'scrolling=\"no\" allowTransparency=\"true\" allowfullscreen frameborder=\"0\" width=\"640\" height=\"360\"' +
18 ' src=\"https://goanimate.com/player/embed/0GwtMpbWQ-Ho\"></iframe>');
19 });
20 });
21});