From 2e146f66fb62896715f6b57e966fb66dd45926ef Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Tue, 26 Mar 2024 14:40:20 +0000 Subject: [PATCH] DON-950: Remove all usages of old MatomoModule from spec files --- src/app/app.component.spec.ts | 8 -------- src/app/app.module.ts | 1 - .../donation-start-container.component.spec.ts | 8 -------- .../donation-start-form.component.spec.ts | 8 -------- .../donation-thanks/donation-thanks.component.spec.ts | 1 - src/app/donation-thanks/donation-thanks.component.ts | 2 +- src/app/donation.service.spec.ts | 9 +-------- src/app/identity.service.spec.ts | 8 -------- src/app/login-modal/login-modal.component.spec.ts | 8 -------- src/app/my-account/my-account.component.spec.ts | 8 -------- src/app/register-modal/register-modal.component.spec.ts | 8 -------- src/app/reset-password/reset-password.component.spec.ts | 8 -------- src/app/stripe.service.spec.ts | 8 -------- src/app/transfer-funds/transfer-funds.component.spec.ts | 8 -------- src/app/transfer-funds/transfer-funds.component.ts | 2 +- 15 files changed, 3 insertions(+), 92 deletions(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 9beea93cd..5eb4bacb2 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -10,7 +10,6 @@ import { MatSelectModule } from '@angular/material/select'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { RecaptchaModule } from 'ng-recaptcha'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { AppComponent } from './app.component'; @@ -29,13 +28,6 @@ describe('AppComponent', () => { MatIconModule, MatInputModule, MatListModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 115cbf77f..b203bf6fa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,7 +9,6 @@ import {RouterModule, RouterOutlet} from '@angular/router'; import {ComponentsModule} from '@biggive/components-angular'; import {TransferHttpCacheModule} from '@nguniversal/common'; import {RECAPTCHA_BASE_URL, RECAPTCHA_NONCE} from 'ng-recaptcha'; -import {MatomoModule} from 'ngx-matomo'; import {LOCAL_STORAGE} from 'ngx-webstorage-service'; import {AppComponent} from './app.component'; diff --git a/src/app/donation-start/donation-start-container/donation-start-container.component.spec.ts b/src/app/donation-start/donation-start-container/donation-start-container.component.spec.ts index 541c16418..3cc4f4938 100644 --- a/src/app/donation-start/donation-start-container/donation-start-container.component.spec.ts +++ b/src/app/donation-start/donation-start-container/donation-start-container.component.spec.ts @@ -3,7 +3,6 @@ import {Component} from "@angular/core"; import {ComponentFixture, TestBed} from '@angular/core/testing'; import { MatDialogModule } from '@angular/material/dialog'; import {ActivatedRoute} from "@angular/router"; -import { MatomoModule } from 'ngx-matomo'; import {InMemoryStorageService} from "ngx-webstorage-service"; import {of} from "rxjs"; @@ -39,13 +38,6 @@ describe('DonationStartContainer', () => { imports: [ HttpClientTestingModule, MatDialogModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/donation-start/donation-start-form/donation-start-form.component.spec.ts b/src/app/donation-start/donation-start-form/donation-start-form.component.spec.ts index 68e64cf88..5f4a1aee3 100644 --- a/src/app/donation-start/donation-start-form/donation-start-form.component.spec.ts +++ b/src/app/donation-start/donation-start-form/donation-start-form.component.spec.ts @@ -15,7 +15,6 @@ import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {ActivatedRoute, Router} from '@angular/router'; import {RouterTestingModule} from '@angular/router/testing'; import {RecaptchaModule} from 'ng-recaptcha'; -import {MatomoModule} from 'ngx-matomo'; import {MatomoTracker as MatomoClientTracker, NgxMatomoModule} from 'ngx-matomo-client'; import {InMemoryStorageService} from 'ngx-webstorage-service'; import {of} from 'rxjs'; @@ -211,13 +210,6 @@ describe('DonationStartNewPrimaryComponent', () => { MatDialogModule, MatIconModule, MatInputModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), MatRadioModule, MatProgressSpinnerModule, MatSelectModule, diff --git a/src/app/donation-thanks/donation-thanks.component.spec.ts b/src/app/donation-thanks/donation-thanks.component.spec.ts index c0cb30bd5..12b207f78 100644 --- a/src/app/donation-thanks/donation-thanks.component.spec.ts +++ b/src/app/donation-thanks/donation-thanks.component.spec.ts @@ -5,7 +5,6 @@ import {MatDialogModule} from '@angular/material/dialog'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import {ActivatedRoute} from '@angular/router'; import {RouterTestingModule} from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import {InMemoryStorageService} from 'ngx-webstorage-service'; import {of} from 'rxjs'; diff --git a/src/app/donation-thanks/donation-thanks.component.ts b/src/app/donation-thanks/donation-thanks.component.ts index 47db8581c..5ad8298b0 100644 --- a/src/app/donation-thanks/donation-thanks.component.ts +++ b/src/app/donation-thanks/donation-thanks.component.ts @@ -3,7 +3,7 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; import {DomSanitizer, SafeHtml} from "@angular/platform-browser"; import { MatDialog } from '@angular/material/dialog'; import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; -import { MatomoTracker } from 'ngx-matomo'; +import { MatomoTracker } from 'ngx-matomo-client'; import { RecaptchaComponent } from 'ng-recaptcha'; import { Campaign } from '../campaign.model'; diff --git a/src/app/donation.service.spec.ts b/src/app/donation.service.spec.ts index 408f9f1e9..b1dfccf07 100644 --- a/src/app/donation.service.spec.ts +++ b/src/app/donation.service.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import {InMemoryStorageService, SESSION_STORAGE} from 'ngx-webstorage-service'; import { Donation } from './donation.model'; @@ -45,13 +44,7 @@ describe('DonationService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), + NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/identity.service.spec.ts b/src/app/identity.service.spec.ts index 769e3cbeb..f0af9fc58 100644 --- a/src/app/identity.service.spec.ts +++ b/src/app/identity.service.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { IdentityService, TBG_DONATE_ID_STORAGE } from './identity.service'; @@ -21,13 +20,6 @@ describe('IdentityService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/login-modal/login-modal.component.spec.ts b/src/app/login-modal/login-modal.component.spec.ts index d708dbc73..6ed0707b3 100644 --- a/src/app/login-modal/login-modal.component.spec.ts +++ b/src/app/login-modal/login-modal.component.spec.ts @@ -5,7 +5,6 @@ import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { ActivatedRoute } from '@angular/router'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { LoginModalComponent } from './login-modal.component'; @@ -24,13 +23,6 @@ describe('LoginModalComponent', () => { HttpClientTestingModule, MatButtonModule, MatDialogModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/my-account/my-account.component.spec.ts b/src/app/my-account/my-account.component.spec.ts index 024bb5dd1..c7697f9fd 100644 --- a/src/app/my-account/my-account.component.spec.ts +++ b/src/app/my-account/my-account.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import {HttpClientModule} from "@angular/common/http"; import {NO_ERRORS_SCHEMA} from "@angular/core"; import {MatDialogModule} from "@angular/material/dialog"; -import { MatomoModule } from 'ngx-matomo'; import {InMemoryStorageService} from "ngx-webstorage-service"; import {of} from "rxjs"; import {PaymentMethod} from "@stripe/stripe-js"; @@ -27,13 +26,6 @@ describe('MyAccountComponent', () => { imports: [ HttpClientModule, MatDialogModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/register-modal/register-modal.component.spec.ts b/src/app/register-modal/register-modal.component.spec.ts index 06bbbcba7..5ceffe936 100644 --- a/src/app/register-modal/register-modal.component.spec.ts +++ b/src/app/register-modal/register-modal.component.spec.ts @@ -4,7 +4,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { RegisterModalComponent } from './register-modal.component'; @@ -24,13 +23,6 @@ describe('RegisterModalComponent', () => { HttpClientTestingModule, MatButtonModule, MatDialogModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/reset-password/reset-password.component.spec.ts b/src/app/reset-password/reset-password.component.spec.ts index 1a95d79d7..4b9ace0fa 100644 --- a/src/app/reset-password/reset-password.component.spec.ts +++ b/src/app/reset-password/reset-password.component.spec.ts @@ -7,7 +7,6 @@ import { MatInputModule } from '@angular/material/input'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { TBG_DONATE_STORAGE } from '../donation.service'; @@ -30,13 +29,6 @@ describe('ResetPasswordComponent', () => { MatButtonModule, MatDialogModule, MatInputModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/stripe.service.spec.ts b/src/app/stripe.service.spec.ts index a14cb8612..f357cbaa4 100644 --- a/src/app/stripe.service.spec.ts +++ b/src/app/stripe.service.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { TBG_DONATE_STORAGE } from './donation.service'; @@ -14,13 +13,6 @@ describe('StripeService', () => { TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), RouterTestingModule, ], providers: [ diff --git a/src/app/transfer-funds/transfer-funds.component.spec.ts b/src/app/transfer-funds/transfer-funds.component.spec.ts index 34e400ceb..868a4dc03 100644 --- a/src/app/transfer-funds/transfer-funds.component.spec.ts +++ b/src/app/transfer-funds/transfer-funds.component.spec.ts @@ -12,7 +12,6 @@ import { MatSelectModule } from '@angular/material/select'; import { MatStepperModule } from '@angular/material/stepper'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { MatomoModule } from 'ngx-matomo'; import { InMemoryStorageService } from 'ngx-webstorage-service'; import { TBG_DONATE_STORAGE } from '../donation.service'; @@ -35,13 +34,6 @@ describe('TransferFundsComponent', () => { MatDialogModule, MatIconModule, MatInputModule, - MatomoModule.forRoot({ - scriptUrl: `https://example.com/matomo.js`, - trackers: [], - routeTracking: { - enable: true, - } - }), NgxMatomoModule.forRoot({ siteId: '', trackerUrl: '', diff --git a/src/app/transfer-funds/transfer-funds.component.ts b/src/app/transfer-funds/transfer-funds.component.ts index 9ba691f12..8b5185790 100644 --- a/src/app/transfer-funds/transfer-funds.component.ts +++ b/src/app/transfer-funds/transfer-funds.component.ts @@ -4,7 +4,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {MatAutocompleteSelectedEvent} from '@angular/material/autocomplete'; import {MatDialog} from '@angular/material/dialog'; import {MatSelectChange} from '@angular/material/select'; -import {MatomoTracker} from 'ngx-matomo'; +import {MatomoTracker} from 'ngx-matomo-client'; import {EMPTY} from 'rxjs'; import {debounceTime, distinctUntilChanged, startWith, switchMap} from 'rxjs/operators';