Skip to content

Commit

Permalink
Unit tests cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicMantis committed Jun 25, 2020
1 parent 86348c8 commit 7694525
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 36 deletions.
46 changes: 23 additions & 23 deletions .firebase/hosting.ZGlzdFxmaXJlLXN0YXJ0ZXI.cache
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
3rdpartylicenses.txt,1591728234735,efb407d6223e6eee3b34752f3b2aee7ad69947cca4539fcd84aca7761e661155
fa-regular-400.c20b5b7362d8d7bb7edd.woff2,1591728234735,62525241e852ad4d86c390efd5200fd78ee839af316ce7c407aa4ca5033a5044
index.html,1591728256762,679109ff6cb55b119fad047a0667b0342f649ec91db4ac028237e24c14089556
favicon.ico,1591327738122,2c19690e9587bae12f419b34d2edeecc76808099540a9c9f4ea6194116cfc8f7
runtime-es2015.0811dcefd377500b5b1a.js,1591469579011,8351e28e6622d0d4825d766649b2ae0e8767c34304fff594f102bfe52b7e4e29
polyfills-es2015.1f913f16a2d346cc8bdc.js,1591469579334,3e7c89812bf4fd87f9db14f54068690ed64b8be5e64316c9703f9616bef0b00e
runtime-es5.0811dcefd377500b5b1a.js,1591469579011,8351e28e6622d0d4825d766649b2ae0e8767c34304fff594f102bfe52b7e4e29
fa-regular-400.261d666b0147c6c5cda0.eot,1591728234735,5d4ce3dabcec92251cc43f50393f13b1ac60e7a2d4c0b8028d57c25895aedaea
fa-regular-400.f89ea91ecd1ca2db7e09.woff,1591728234735,0b3fbad107820f36b7b44677f7b9f8ae4bf350b827548a2cb5b159670a1d66ca
fa-regular-400.db78b9359171f24936b1.ttf,1591728234735,1718b6cf292cacbff9309f6aa3cf0f9f878b18f39c4bcc2853665da99b1e839c
fa-regular-400.89ffa3aba80d30ee0a93.svg,1591728234735,000ed4116df7bb5535d1192f7cf77b8b606436838eae455c8970d12c61a5978f
fa-brands-400.a06da7f0950f9dd366fc.woff2,1591728234736,220cf7498534a7dd6ac3ae070d095212a5c671f2e142698a1aa158d8a4eafdc5
fa-solid-900.b15db15f746f29ffa026.woff2,1591728234736,2bfc94d6ac646cecb13240d89875b8da2034242350df59cf8b33d35a0f8b0216
polyfills-es5.1a3c78b07cd6f16c6e9a.js,1591469583568,7054bf2fa7dd43d81bb551dcf87e345ab95ddde443a4b796bcaa01f93c7d18cf
fa-brands-400.ec3cfddedb8bebd2d7a3.woff,1591728234736,3d7bb7f03279c9f7693a2fc67173a07161ff52a1aaf264cf5242a3a4b9424852
fa-solid-900.bea989e82b07e9687c26.woff,1591728234736,cf76a85d99ba39cbf376d6db74b14100bcdfcc0e0e8b49422564758c4fde3f27
fa-brands-400.c1868c9545d2de1cf848.eot,1591728234736,bd1b42566d23232b85daca6a64651081b11201729b79522fed5314ccb9c89951
fa-brands-400.13685372945d816a2b47.ttf,1591728234736,d494f1c3bb4c3ec6535a7538ff41698ca114a54f0e6d9df4d9251c0ed1c077a5
fa-solid-900.1ab236ed440ee51810c5.ttf,1591728234737,4d9f19215cca3c65e9c25567038e0cc818ebc7bc0e288de93316fc5bd2ab8055
fa-solid-900.a0369ea57eb6d3843d64.eot,1591728234736,54e01726621cd3f99cfed68e057df823322c270003bb956303a9fb5dbd254a54
styles.e415c1a9444d54261e7c.css,1591728234753,46a28218db0492ac0e279704839661a77a5f19df17e4e6491ddc55821434da03
scripts.3c1908b1445374ebb4ba.js,1591728234753,8c67321bc12bac31501eeeb8d421332196c1ed0d9a45884b15e9def3106dbb50
fa-solid-900.ec763292e583294612f1.svg,1591728234752,ee069b9a706fd14b317307a7a447c163e9dd21a810f7e6148ecb502b15a18b5b
main-es2015.a70f99ad7b66f4945b7e.js,1591728256694,3dbe2d671f56b3b2ac4590b1fadc960d1e42f9b52397a4e10b1ef850b290ab44
main-es5.a70f99ad7b66f4945b7e.js,1591728253742,1b548088a7e91c11d94101420f862528a462ce96d32aad15c2697314c884d74c
fa-brands-400.0cb5a5c0d251c109458c.svg,1591728234736,886e2043744a3f6f1b516a745a223f8c7d33e71f52c5a19472df78ac82bd6cbe
runtime-es2015.0811dcefd377500b5b1a.js,1591469579011,8351e28e6622d0d4825d766649b2ae0e8767c34304fff594f102bfe52b7e4e29
runtime-es5.0811dcefd377500b5b1a.js,1591469579011,8351e28e6622d0d4825d766649b2ae0e8767c34304fff594f102bfe52b7e4e29
3rdpartylicenses.txt,1592016652235,3ad99fb1efd5eca91560e2cb7680088c89ba78f0a8a8eaa9ac1982c949681952
fa-regular-400.c20b5b7362d8d7bb7edd.woff2,1592016652235,62525241e852ad4d86c390efd5200fd78ee839af316ce7c407aa4ca5033a5044
index.html,1592016678162,ef84a5ddbff4d7001319fd38920985556e49db9eeba165c20ef13e074cda09fd
fa-regular-400.261d666b0147c6c5cda0.eot,1592016652235,5d4ce3dabcec92251cc43f50393f13b1ac60e7a2d4c0b8028d57c25895aedaea
fa-regular-400.db78b9359171f24936b1.ttf,1592016652235,1718b6cf292cacbff9309f6aa3cf0f9f878b18f39c4bcc2853665da99b1e839c
fa-regular-400.f89ea91ecd1ca2db7e09.woff,1592016652235,0b3fbad107820f36b7b44677f7b9f8ae4bf350b827548a2cb5b159670a1d66ca
fa-regular-400.89ffa3aba80d30ee0a93.svg,1592016652235,000ed4116df7bb5535d1192f7cf77b8b606436838eae455c8970d12c61a5978f
fa-brands-400.a06da7f0950f9dd366fc.woff2,1592016652236,220cf7498534a7dd6ac3ae070d095212a5c671f2e142698a1aa158d8a4eafdc5
fa-solid-900.b15db15f746f29ffa026.woff2,1592016652236,2bfc94d6ac646cecb13240d89875b8da2034242350df59cf8b33d35a0f8b0216
fa-brands-400.ec3cfddedb8bebd2d7a3.woff,1592016652236,3d7bb7f03279c9f7693a2fc67173a07161ff52a1aaf264cf5242a3a4b9424852
fa-solid-900.bea989e82b07e9687c26.woff,1592016652236,cf76a85d99ba39cbf376d6db74b14100bcdfcc0e0e8b49422564758c4fde3f27
fa-brands-400.13685372945d816a2b47.ttf,1592016652236,d494f1c3bb4c3ec6535a7538ff41698ca114a54f0e6d9df4d9251c0ed1c077a5
fa-brands-400.c1868c9545d2de1cf848.eot,1592016652235,bd1b42566d23232b85daca6a64651081b11201729b79522fed5314ccb9c89951
styles.e415c1a9444d54261e7c.css,1592016652247,46a28218db0492ac0e279704839661a77a5f19df17e4e6491ddc55821434da03
fa-solid-900.1ab236ed440ee51810c5.ttf,1592016652236,4d9f19215cca3c65e9c25567038e0cc818ebc7bc0e288de93316fc5bd2ab8055
fa-solid-900.a0369ea57eb6d3843d64.eot,1592016652236,54e01726621cd3f99cfed68e057df823322c270003bb956303a9fb5dbd254a54
scripts.ab3bf3e829c50d4010f6.js,1592016652247,34ecf05e1889f772278bd7c917454c2e4aa41a953277dcd8cfb2e7a6b6f7bebb
fa-solid-900.ec763292e583294612f1.svg,1592016652247,ee069b9a706fd14b317307a7a447c163e9dd21a810f7e6148ecb502b15a18b5b
main-es2015.7031d7d1ae56c7e61be8.js,1592016678084,bc021976db094b8b570ce0e950bf0bc068c54b04a35db1254ca17e29a153c647
main-es5.7031d7d1ae56c7e61be8.js,1592016674472,26002a034962ec219bbb859fca3c1306b59f829509fcaa95ee2446d3441803bc
fa-brands-400.0cb5a5c0d251c109458c.svg,1592016652236,886e2043744a3f6f1b516a745a223f8c7d33e71f52c5a19472df78ac82bd6cbe
6 changes: 0 additions & 6 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,4 @@ describe('AppComponent', () => {
expect(app.title).toEqual('fire-starter');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('fire-starter app is running!');
});
});
7 changes: 6 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { InvestComponent } from './items/invest/invest.component';
// Services
import { DataService } from './services/data.service';
import { ItemSetComponent } from './layout/item-set/item-set.component';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';


@NgModule({
Expand Down Expand Up @@ -63,7 +64,11 @@ import { ItemSetComponent } from './layout/item-set/item-set.component';
DynamicIoModule,
DynamicComponentModule,
],
providers: [DataService],
providers: [DataService,
{ provide: MAT_DIALOG_DATA, useValue: {} },
{ provide: MatDialogRef, useValue: {} },
],

bootstrap: [AppComponent]
})
export class AppModule { }
7 changes: 7 additions & 0 deletions src/app/fire-starter.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "..\\..\\.."
}
]
}
2 changes: 1 addition & 1 deletion src/app/items/mortgage/mortgage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class MortgageComponent implements OnInit {
constructor(private data: DataService) { }

ngOnInit(): void {
this.APYstring = String(this.mortgage.annualRate);
if (this.mortgage) this.APYstring = String(this.mortgage.annualRate);
}

parse() {
Expand Down
1 change: 0 additions & 1 deletion src/app/layout/add-item/add-item.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ItemBuffetComponent } from './../item-buffet/item-buffet.component';
import { DataService } from './../../services/data.service';
import { Component, OnInit, Input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';

Expand Down
12 changes: 8 additions & 4 deletions src/app/layout/item-buffet/item-buffet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { Expense } from './../../model/expense';
import { DataService } from './../../services/data.service';
import { Component, OnInit, Input, Inject } from '@angular/core';
import { ThemePalette } from '@angular/material/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import {MatDialogHarness} from '@angular/material/dialog/testing';



export interface ItemType {
Expand All @@ -32,15 +34,17 @@ export class ItemBuffetComponent implements OnInit {
{type: 'Expense', icon: 'credit_card', color: 'accent', component: Expense}
];

constructor(@Inject(MAT_DIALOG_DATA) params: any, private data: DataService) {
this.itemListIndex = params.itemListIndex;
constructor(public dialogRef: MatDialogRef<ItemBuffetComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private dataService: DataService) {
this.itemListIndex = data.itemListIndex;
}

ngOnInit(): void {
}

addItem(itemType) {
this.data.addItem(new itemType(), this.itemListIndex)
this.dataService.addItem(new itemType(), this.itemListIndex)
}

}
3 changes: 3 additions & 0 deletions src/app/mat-components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { MatChipsModule } from '@angular/material/chips';
import { MatSliderModule } from '@angular/material/slider';
import { MatDialogModule } from '@angular/material/dialog';
import { DragDropModule } from '@angular/cdk/drag-drop';
import {MatDialogHarness} from '@angular/material/dialog/testing';



@NgModule({
Expand All @@ -27,6 +29,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
MatSliderModule,
DragDropModule,
MatDialogModule,
MatDialogHarness
]
})
export class MatComponentsModule { }

0 comments on commit 7694525

Please sign in to comment.