Skip to content
Commits on Source (2)
......@@ -5,10 +5,12 @@ import { Subscription } from 'rxjs';
import { Client, Upload } from '../../services/api';
import { MindsTitle } from '../../services/ux/title';
import { Session } from '../../services/session';
import { ActivityService } from '../../common/services/activity.service';
@Component({
selector: 'minds-admin',
templateUrl: 'admin.html',
providers: [ActivityService],
})
export class Admin {
filter: string = '';
......
......@@ -24,6 +24,8 @@ import { CommonModule as NgCommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TokenPipe } from '../../../common/pipes/token.pipe';
import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { ActivityService } from '../../../common/services/activity.service';
import { activityServiceMock } from '../../../../tests/activity-service-mock.spec';
import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec';
@Component({
......@@ -144,6 +146,7 @@ describe('AdminBoosts', () => {
providers: [
{ provide: Client, useValue: clientMock },
{ provide: OverlayModalService, useValue: overlayModalServiceMock },
{ provide: ActivityService, useValue: activityServiceMock },
],
}).compileComponents(); // compile template and css
}));
......
......@@ -8,6 +8,7 @@ import { RejectionReasonModalComponent } from './modal/rejection-reason-modal.co
import { Reason, rejectionReasons } from './rejection-reasons';
import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component';
import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { ActivityService } from '../../../common/services/activity.service';
@Component({
moduleId: module.id,
......@@ -42,7 +43,8 @@ export class AdminBoosts {
constructor(
public client: Client,
private overlayModal: OverlayModalService,
private route: ActivatedRoute
private route: ActivatedRoute,
protected activityService: ActivityService
) {}
ngOnInit() {
......
......@@ -16,8 +16,10 @@ import { RouterTestingModule } from '@angular/router/testing';
import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service';
import { newsfeedHashtagSelectorServiceMock } from '../../../../tests/newsfeed-hashtag-selector-service-mock.spec';
import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec';
import { activityServiceMock } from '../../../../tests/activity-service-mock.spec';
import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { EventEmitter } from '@angular/core';
import { ActivityService } from '../../../common/services/activity.service';
@Component({
selector: 'minds-activity',
......@@ -72,6 +74,7 @@ describe('AdminFirehose', () => {
useValue: newsfeedHashtagSelectorServiceMock,
},
{ provide: OverlayModalService, useValue: overlayModalServiceMock },
{ provide: ActivityService, useValue: activityServiceMock },
],
}).compileComponents();
}));
......
......@@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service';
import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component';
import { ActivityService } from '../../../common/services/activity.service';
@Component({
moduleId: module.id,
selector: 'minds-admin-firehose',
......@@ -30,7 +30,8 @@ export class AdminFirehoseComponent implements OnInit, OnDestroy {
public router: Router,
public route: ActivatedRoute,
protected newsfeedHashtagSelectorService: NewsfeedHashtagSelectorService,
private overlayModal: OverlayModalService
private overlayModal: OverlayModalService,
protected activityService: ActivityService
) {
this.paramsSubscription = this.route.params.subscribe(params => {
this.algorithm = params['algorithm'] || 'latest';
......