• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pfbrowning / ng-radio / 20288167983

17 Dec 2025 01:11AM UTC coverage: 60.119% (+0.03%) from 60.092%
20288167983

Pull #71

github

web-flow
Merge 8996c123e into 0a9c45f17
Pull Request #71: Upgrade Angular From 18 To 19

82 of 216 branches covered (37.96%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

52 existing lines in 12 files now uncovered.

830 of 1301 relevant lines covered (63.8%)

3.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

25.93
/src/app/modules/shared/root-components/components/station-edit/station-edit.component.ts
1
import { Component, OnInit, Input, ViewChild, ChangeDetectionStrategy } from '@angular/core';
2
import { Station } from '@core/models/player';
3
import { NgForm } from '@angular/forms';
4
import { Router } from '@angular/router';
5
import { RootState } from '@core';
6
import { Store } from '@ngrx/store';
7
import { PlayerActions } from '@core/store';
8
import { FavoriteStationsActions } from '@core/store';
9
import { MatInput } from '@angular/material/input';
10
import { cloneDeep } from 'lodash-es';
11

12
@Component({
13
  selector: 'blr-station-edit',
14
  templateUrl: './station-edit.component.html',
15
  styleUrls: ['./station-edit.component.scss'],
16
  changeDetection: ChangeDetectionStrategy.OnPush,
17
})
18
export class StationEditComponent implements OnInit {
1✔
19
  constructor(private store: Store<RootState>, private router: Router) {}
1✔
20

21
  @ViewChild('titleInput', { static: true }) titleInput: MatInput;
22
  @ViewChild('form', { static: true }) form: NgForm;
23
  @Input() existingStation: Station;
24
  @Input() saveInProgress: boolean;
25
  @Input() fetchingFavorites: boolean;
26
  public stationPending: Station;
27

28
  public ngOnInit(): void {
29
    if (this.existingStation) {
1!
UNCOV
30
      this.stationPending = cloneDeep(this.existingStation);
×
31
    } else {
32
      this.stationPending = new Station();
1✔
33
    }
34

35
    this.titleInput.focus();
1✔
36
    this.store.dispatch(FavoriteStationsActions.fetchStationsSubmit());
1✔
37
  }
38

39
  public onVisibleChanged(visible): void {
UNCOV
40
    if (!visible) {
×
41
      this.closeEditor();
×
42
    }
43
  }
44

45
  public closeEditor(): void {
UNCOV
46
    this.store.dispatch(FavoriteStationsActions.closeStationEdit());
×
47
  }
48

49
  public onOpenClicked(): void {
UNCOV
50
    this.form.form.markAllAsTouched();
×
51
    if (this.form.valid) {
×
52
      this.store.dispatch(PlayerActions.selectStation({ station: this.stationPending }));
×
53
      this.closeEditor();
×
54
      if (this.router.url !== '/now-playing') {
×
55
        this.router.navigate(['/now-playing']);
×
56
      }
57
    }
58
  }
59

60
  public onSaveClicked(): void {
UNCOV
61
    this.form.form.markAllAsTouched();
×
62
    if (this.form.valid) {
×
63
      this.store.dispatch(
×
64
        this.existingStation
×
65
          ? FavoriteStationsActions.stationUpdateStart({
66
              station: this.stationPending,
67
            })
68
          : FavoriteStationsActions.addToFavoritesStart({
69
              station: this.stationPending,
70
            })
71
      );
72
    }
73
  }
74
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc