aboutsummaryrefslogtreecommitdiff
path: root/ui/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/app')
-rw-r--r--ui/src/app/app.component.spec.ts31
-rw-r--r--ui/src/app/app.component.ts12
-rw-r--r--ui/src/app/master-checkbox.component.ts2
3 files changed, 38 insertions, 7 deletions
diff --git a/ui/src/app/app.component.spec.ts b/ui/src/app/app.component.spec.ts
new file mode 100644
index 0000000..20b0ed6
--- /dev/null
+++ b/ui/src/app/app.component.spec.ts
@@ -0,0 +1,31 @@
+import { TestBed } from '@angular/core/testing';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ });
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'metube'`, () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app.title).toEqual('metube');
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement;
+ expect(compiled.querySelector('.content span').textContent).toContain('metube app is running!');
+ });
+});
diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts
index 7a18d28..8202b4d 100644
--- a/ui/src/app/app.component.ts
+++ b/ui/src/app/app.component.ts
@@ -21,12 +21,12 @@ export class AppComponent implements AfterViewInit {
quality: string = "best";
addInProgress = false;
- @ViewChild('queueMasterCheckbox', {static: false}) queueMasterCheckbox: MasterCheckboxComponent;
- @ViewChild('queueDelSelected', {static: false}) queueDelSelected: ElementRef;
- @ViewChild('doneMasterCheckbox', {static: false}) doneMasterCheckbox: MasterCheckboxComponent;
- @ViewChild('doneDelSelected', {static: false}) doneDelSelected: ElementRef;
- @ViewChild('doneClearCompleted', {static: false}) doneClearCompleted: ElementRef;
- @ViewChild('doneClearFailed', {static: false}) doneClearFailed: ElementRef;
+ @ViewChild('queueMasterCheckbox') queueMasterCheckbox: MasterCheckboxComponent;
+ @ViewChild('queueDelSelected') queueDelSelected: ElementRef;
+ @ViewChild('doneMasterCheckbox') doneMasterCheckbox: MasterCheckboxComponent;
+ @ViewChild('doneDelSelected') doneDelSelected: ElementRef;
+ @ViewChild('doneClearCompleted') doneClearCompleted: ElementRef;
+ @ViewChild('doneClearFailed') doneClearFailed: ElementRef;
faTrashAlt = faTrashAlt;
faCheckCircle = faCheckCircle;
diff --git a/ui/src/app/master-checkbox.component.ts b/ui/src/app/master-checkbox.component.ts
index 683ea71..8c8208a 100644
--- a/ui/src/app/master-checkbox.component.ts
+++ b/ui/src/app/master-checkbox.component.ts
@@ -18,7 +18,7 @@ export class MasterCheckboxComponent {
@Input() list: Map<String, Checkable>;
@Output() changed = new EventEmitter<number>();
- @ViewChild('masterCheckbox', {static: false}) masterCheckbox: ElementRef;
+ @ViewChild('masterCheckbox') masterCheckbox: ElementRef;
selected: boolean;
clicked() {
bgstack15