Skip to content
Snippets Groups Projects
Commit 05238df7 authored by jojohoch's avatar jojohoch
Browse files

[player] Fix test for PageComponent

parent 206ea1fb
No related branches found
No related tags found
No related merge requests found
// eslint-disable-next-line max-classes-per-file
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageComponent } from './page.component';
import { Page } from 'common/models/page'; import { Page } from 'common/models/page';
import {
Component, Directive, EventEmitter, Input, Output
} from '@angular/core';
import { Section } from 'common/models/section';
import { Subject } from 'rxjs';
import { PageComponent } from './page.component';
describe('PageComponent', () => { describe('PageComponent', () => {
let component: PageComponent; let component: PageComponent;
let fixture: ComponentFixture<PageComponent>; let fixture: ComponentFixture<PageComponent>;
@Component({ selector: 'aspect-section', template: '' })
class SectionComponent {
@Input() section!: Section;
@Input() pageIndex!: number;
}
@Directive({ selector: '[aspectSectionVisibilityHandling]' })
class SectionVisibilityHandling {
@Input() mediaStatusChanged!: Subject<string>;
@Input() section!: Section;
@Input() pageSections!: Section[];
}
@Directive({ selector: '[aspectInViewDetection]' })
class InViewDetection {
@Input() detectionType!: 'top' | 'bottom';
@Output() intersecting = new EventEmitter();
@Input() intersectionContainer!: HTMLElement;
}
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [ PageComponent ] declarations: [
PageComponent,
SectionComponent,
SectionVisibilityHandling,
InViewDetection
]
}) })
.compileComponents(); .compileComponents();
}); });
...@@ -23,5 +54,4 @@ describe('PageComponent', () => { ...@@ -23,5 +54,4 @@ describe('PageComponent', () => {
it('should create', () => { it('should create', () => {
expect(component).toBeTruthy(); expect(component).toBeTruthy();
}); });
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment