Commit 599aac5b authored by Olivia Madrid's avatar Olivia Madrid

Fix failing chart test

1 merge request!686WIP: Epic/wallet 80
Pipeline #114106543 failed with stages
in 5 minutes and 47 seconds
......@@ -26,32 +26,24 @@ describe('ChartV2Component', () => {
beforeEach(() => {
fixture = TestBed.createComponent(ChartV2Component);
component = fixture.componentInstance;
component.rawData = {
id: 'views',
label: 'Pageviews',
permissions: ['admin', 'user'],
unit: 'usd',
description: '',
visualisation: {
type: 'chart',
segments: [
component.label = 'Pageviews';
component.unit = 'usd';
component.segments = [
{
buckets: [
{
buckets: [
{
key: 1567296000000,
date: '2019-09-01T00:00:00+00:00',
value: 11,
},
{
key: 1567382400000,
date: '2019-09-02T00:00:00+00:00',
value: 12,
},
],
key: 1567296000000,
date: '2019-09-01T00:00:00+00:00',
value: 11,
},
{
key: 1567382400000,
date: '2019-09-02T00:00:00+00:00',
value: 12,
},
],
},
};
];
});
it('should create', () => {
......
......@@ -26,7 +26,7 @@ export class ChartV2Component implements OnInit, OnDestroy {
@Input() segments: Array<any>;
@Input() unit: string = 'number';
@Input() label: '';
@Input() label: string = '';
@Input() interval;
@Input() isMini: boolean = false;
......
......@@ -55,13 +55,13 @@
<!-- <div [ngSwitch]="unit" class="m-chartV2__hoverInfo__row--primary">
<ng-template ngSwitchCase="number">
{{ hoverInfo.value | number: '1.0-0' | abbr }}
{{ rawData.label | lowercase }}
{{ label | lowercase }}
</ng-template>
<ng-template ngSwitchCase="usd">
{{ hoverInfo.value | currency }} USD
</ng-template>
<ng-template ngSwitchDefault>
{{ hoverInfo.value | number: '1.1-3' }} {{ rawData?.unit }}
{{ hoverInfo.value | number: '1.1-3' }} {{ unit }}
</ng-template>
</div>
</div> -->
......@@ -12,7 +12,7 @@ import { Subscription } from 'rxjs';
import { WalletDashboardService } from './dashboard.service';
import { Session } from '../../../services/session';
import { ActivatedRoute, Router, ParamMap } from '@angular/router';
import { MindsTitle } from '../../../services/ux/title';
// import { MindsTitle } from '../../../services/ux/title';
import sidebarMenu from './sidebar-menu.default';
import { Menu } from '../../../common/components/sidebar-menu/sidebar-menu.component';
import { ShadowboxHeaderTab } from '../../../interfaces/dashboard';
......@@ -56,7 +56,7 @@ export class WalletDashboardComponent implements OnInit {
protected router: Router,
protected route: ActivatedRoute,
protected cd: ChangeDetectorRef,
protected title: MindsTitle,
// protected title: MindsTitle,
protected storage: Storage,
@Inject(PLATFORM_ID) private platformId
) {}
......@@ -75,7 +75,7 @@ export class WalletDashboardComponent implements OnInit {
this.onboardingComplete = true;
}
this.title.setTitle('Wallet');
// this.title.setTitle('Wallet');
this.wallet = this.walletService.getWallet();
this.route.paramMap.subscribe((params: ParamMap) => {
......
Please register or to comment