mirror of https://github.com/ghostfolio/ghostfolio
7 changed files with 1380 additions and 2 deletions
@ -0,0 +1,8 @@ |
|||
import { Component } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
host: { class: 'page' }, |
|||
selector: 'gf-budget-page', |
|||
template: '' |
|||
}) |
|||
export class GfBudgetPageComponent {} |
|||
@ -0,0 +1,15 @@ |
|||
import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; |
|||
import { internalRoutes } from '@ghostfolio/common/routes/routes'; |
|||
|
|||
import { Routes } from '@angular/router'; |
|||
|
|||
import { GfBudgetPageComponent } from './budget-page.component'; |
|||
|
|||
export const routes: Routes = [ |
|||
{ |
|||
canActivate: [AuthGuard], |
|||
component: GfBudgetPageComponent, |
|||
path: '', |
|||
title: internalRoutes.portfolio.subRoutes.budget.title |
|||
} |
|||
]; |
|||
File diff suppressed because it is too large
@ -0,0 +1,22 @@ |
|||
(global as any).$localize = ( |
|||
messageParts: TemplateStringsArray, |
|||
...expressions: any[] |
|||
) => { |
|||
return String.raw({ raw: messageParts }, ...expressions); |
|||
}; |
|||
|
|||
jest.mock('@angular/localize', () => { |
|||
return {}; |
|||
}); |
|||
|
|||
const { internalRoutes } = require('./routes'); |
|||
|
|||
describe('internalRoutes', () => { |
|||
it('defines the portfolio budget route', () => { |
|||
expect(internalRoutes.portfolio.subRoutes.budget).toEqual({ |
|||
path: 'budget', |
|||
routerLink: ['/portfolio', 'budget'], |
|||
title: 'Budget' |
|||
}); |
|||
}); |
|||
}); |
|||
Loading…
Reference in new issue