• 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/compat/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
  get() {
61
    // const ids = ['4(CPo6Fy(7Mo^YklK[Q8', 'FouQf@q4FHJcc&%cnmkT', 'LBWH5KvYp43ia)!IYpwv', ']cfct5iL8(H)@Sl#xTcS'];
62
    // for (let index = 0; index < ids.length; index++) {
63
    //   setTimeout(() => this.store.dispatch(new RacesActions.Get(ids[index])), 1000 * index);
64
    // }
65

66
    this.store.dispatch(new RacesActions.Get('0V!^fMrWetbs68]ob6%M'));
×
67
  }
68

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

79
    // this.store.dispatch(new RacesActions.Create({
80
    //   id: 'test-id',
81
    //   name: 'Test',
82
    //   title: 'Test Title',
83
    //   description: 'Test description',
84
    // }));
85
  }
86

87
  update(race: Race) {
88
    const chance = new Chance();
×
89

90
    this.store.dispatch(
×
91
      new RacesActions.Update({
92
        ...race,
93
        name: chance.string(),
94
        description: chance.word()
95
      })
96
    );
97
  }
98

99
  updateIfExists(race: Race) {
100
    const chance = new Chance();
×
101

102
    this.store.dispatch(
×
103
      new RacesActions.UpdateIfExists({
104
        ...race,
105
        name: chance.string(),
106
        description: chance.word()
107
      })
108
    );
109
  }
110

111
  delete(id: string) {
112
    this.store.dispatch(new RacesActions.Delete(id));
×
113
  }
114

115
  ngOnDestroy() {
116
    this.store.dispatch(new Disconnect(RacesActions.GetAll));
×
117
  }
118

119
  throwError() {
120
    this.store.dispatch(new RacesActions.Error());
×
121
  }
122
}
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