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

ngxs-labs / firestore-plugin / 19233837789

10 Nov 2025 01:48PM UTC coverage: 19.556% (-0.2%) from 19.708%
19233837789

push

github

joaqcid
chore(release): 18.0.7

60 of 187 branches covered (32.09%)

Branch coverage included in aggregate %.

248 of 1388 relevant lines covered (17.87%)

5.69 hits per line

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

0.0
/integrations/modular/src/app/components/list/list.component.ts
1
import { Component, OnInit, OnDestroy } from '@angular/core';
×
2
import { Store } from '@ngxs/store';
×
3
import { RacesActions } from './../../states/races/races.actions';
×
4
import { RacesState } from './../../states/races/races.state';
×
5
import { ClassificationsState } from './../../states/classifications/classifications.state';
×
6
import { ClassificationsActions } from './../../states/classifications/classifications.actions';
×
7
import { Race } from './../../models/race';
8
import { Chance } from 'chance';
×
9
import { map } from 'rxjs/operators';
×
10
import { actionsExecuting } from '@ngxs-labs/actions-executing';
×
11
import { Disconnect } from '@ngxs-labs/firestore-plugin';
×
12

13
@Component({
14
  selector: 'app-list',
15
  templateUrl: './list.component.html',
16
  styleUrls: ['./list.component.scss'],
17
  standalone: false
18
})
19
export class ListComponent implements OnInit, OnDestroy {
×
20
  races$ = this.store.select(RacesState.races);
×
21
  classifications$ = this.store.select(ClassificationsState.classifications);
×
22
  total$ = this.races$.pipe(map((races) => races.length));
×
23

24
  gettingAll$ = this.store.select(actionsExecuting([RacesActions.GetAll]));
×
25
  gettingSingle$ = this.store.select(actionsExecuting([RacesActions.Get]));
×
26
  creating$ = this.store.select(actionsExecuting([RacesActions.Create]));
×
27
  loading$ = this.store.select(actionsExecuting([RacesActions.GetAll, RacesActions.Get]));
×
28
  loaded$ = this.loading$.pipe(map((loading) => !loading));
×
29
  disconnecting$ = this.store.select(actionsExecuting([Disconnect]));
×
30
  throwingError$ = this.store.select(actionsExecuting([RacesActions.Error]));
×
31
  gettingSubCollection$ = this.store.select(actionsExecuting([ClassificationsActions.GetAll]));
×
32

33
  constructor(private store: Store) {}
×
34

35
  ngOnInit() {
36
    // this.store.dispatch(new RacesActions.GetAll());
37
    // this.store.dispatch(new RacesActions.Get('8iI)0md[dTAFC[wo!&[N'));
38
    // this.store.dispatch(new RacesActions.Get('AAAAAA'));
39
  }
40

41
  disconnect() {
42
    this.store.dispatch(new Disconnect(new RacesActions.Get(']cfct5iL8(H)@Sl#xTcS')));
×
43
  }
44

45
  reconnect() {
46
    // this.store.dispatch(new RacesActions.GetAll());
47
    // this.store.dispatch(new RacesActions.Get('8iI)0md[dTAFC[wo!&[N'));
48

49
    this.store.dispatch(new RacesActions.Get(']cfct5iL8(H)@Sl#xTcS'));
×
50
  }
51

52
  getAll() {
53
    this.store.dispatch(new RacesActions.GetAll());
×
54
  }
55

56
  getSubCollection() {
57
    this.store.dispatch(new ClassificationsActions.GetAll('0NN6x6GKDGumGU5dtnk4'));
×
58
  }
59

60
  getCollectionGroup() {
61
    this.store.dispatch(new RacesActions.CollectionGroup());
×
62
  }
63

64
  get() {
65
    // const ids = ['4(CPo6Fy(7Mo^YklK[Q8', 'FouQf@q4FHJcc&%cnmkT', 'LBWH5KvYp43ia)!IYpwv', ']cfct5iL8(H)@Sl#xTcS'];
66
    // for (let index = 0; index < ids.length; index++) {
67
    //   setTimeout(() => this.store.dispatch(new RacesActions.Get(ids[index])), 1000 * index);
68
    // }
69

70
    this.store.dispatch(new RacesActions.Get('0V!^fMrWetbs68]ob6%M'));
×
71
  }
72

73
  create() {
74
    const chance = new Chance();
×
75
    const race: Partial<Race> = {};
×
76
    // race.id = chance.string({ length: 20 });
77
    race.raceId = chance.string({ length: 20 });
×
78
    race.name = chance.word();
×
79
    race.title = chance.word();
×
80
    race.description = chance.sentence();
×
81
    this.store.dispatch(new RacesActions.Create(race));
×
82

83
    // this.store.dispatch(new RacesActions.Create({
84
    //   id: 'test-id',
85
    //   name: 'Test',
86
    //   title: 'Test Title',
87
    //   description: 'Test description',
88
    // }));
89
  }
90

91
  update(race: Race) {
92
    const chance = new Chance();
×
93

94
    this.store.dispatch(
×
95
      new RacesActions.Update({
96
        ...race,
97
        name: chance.string(),
98
        description: chance.word()
99
      })
100
    );
101
  }
102

103
  updateIfExists(race: Race) {
104
    const chance = new Chance();
×
105

106
    this.store.dispatch(
×
107
      new RacesActions.UpdateIfExists({
108
        ...race,
109
        name: chance.string(),
110
        description: chance.word()
111
      })
112
    );
113
  }
114

115
  delete(id: string) {
116
    this.store.dispatch(new RacesActions.Delete(id));
×
117
  }
118

119
  ngOnDestroy() {
120
    this.store.dispatch(new Disconnect(RacesActions.GetAll));
×
121
  }
122

123
  throwError() {
124
    this.store.dispatch(new RacesActions.Error());
×
125
  }
126
}
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