feature/jenkins-ci #1
@@ -1,13 +1,13 @@
|
|||||||
import {async, TestBed} from '@angular/core/testing';
|
import {async, TestBed} from '@angular/core/testing';
|
||||||
import { InjectionToken } from "@angular/core";
|
import { InjectionToken } from '@angular/core';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {ToolbarComponent} from "./toolbar/toolbar.component";
|
import {ToolbarComponent} from './toolbar/toolbar.component';
|
||||||
import {RouterTestingModule} from "@angular/router/testing";
|
import {RouterTestingModule} from '@angular/router/testing';
|
||||||
import { MatSidenavModule } from "@angular/material/sidenav";
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { MatToolbarModule } from "@angular/material/toolbar";
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||||
import {NoopAnimationsModule} from "@angular/platform-browser/animations";
|
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import { RouterlessTracking } from "angulartics2";
|
import { RouterlessTracking } from 'angulartics2';
|
||||||
import { Angulartics2Piwik } from "angulartics2/piwik";
|
import { Angulartics2Piwik } from 'angulartics2/piwik';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
let piwik: Angulartics2Piwik;
|
let piwik: Angulartics2Piwik;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const routerTransition = trigger('routerTransition', [
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
constructor(private matomo: Angulartics2Piwik) {
|
constructor(private matomo: Angulartics2Piwik) {
|
||||||
matomo.startTracking()
|
matomo.startTracking();
|
||||||
}
|
}
|
||||||
|
|
||||||
getState(outlet: RouterOutlet) {
|
getState(outlet: RouterOutlet) {
|
||||||
|
|||||||
@@ -5,14 +5,24 @@ import {Pipe, PipeTransform} from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class ProjectKeywordPipe implements PipeTransform {
|
export class ProjectKeywordPipe implements PipeTransform {
|
||||||
private keywords = [
|
private keywords = [
|
||||||
'MySQL', 'Node', 'Express', 'RxJava', 'Dagger 2', 'Model View Presenter', 'Retrofit', 'Realm', 'Room', 'Model-View-View Model', 'SimpleStack'
|
'MySQL',
|
||||||
|
'Node',
|
||||||
|
'Express',
|
||||||
|
'RxJava',
|
||||||
|
'Dagger 2',
|
||||||
|
'Model View Presenter',
|
||||||
|
'Retrofit',
|
||||||
|
'Realm',
|
||||||
|
'Room',
|
||||||
|
'Model-View-View Model',
|
||||||
|
'SimpleStack'
|
||||||
];
|
];
|
||||||
|
|
||||||
transform(value: String, args?: any): any {
|
transform(value: String, args?: any): any {
|
||||||
this.keywords.forEach(keyword => {
|
this.keywords.forEach(keyword => {
|
||||||
let keywordIndex = value.indexOf(keyword);
|
const keywordIndex = value.indexOf(keyword);
|
||||||
if (keywordIndex != -1) {
|
if (keywordIndex !== -1) {
|
||||||
let boldKeyword = '<b>' + value.substring(keywordIndex, keywordIndex + keyword.length) + '</b>';
|
const boldKeyword = '<b>' + value.substring(keywordIndex, keywordIndex + keyword.length) + '</b>';
|
||||||
value = value.replace(keyword, boldKeyword);
|
value = value.replace(keyword, boldKeyword);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export class ProjectItem {
|
export class ProjectItem {
|
||||||
title: String;
|
title: String;
|
||||||
applicationType: String;
|
applicationType: String;
|
||||||
description: String
|
description: String;
|
||||||
imgLocation: String
|
imgLocation: String;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,50 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ProjectItem} from "./project-item";
|
import {ProjectItem} from './project-item';
|
||||||
|
|
||||||
|
const projects = [
|
||||||
|
{
|
||||||
|
title: 'Movies',
|
||||||
|
applicationType: 'Android Application (Kotlin)',
|
||||||
|
// tslint:disable-next-line:max-line-length
|
||||||
|
description: '<a href="https://github.com/Stampede10343/Movies_TMDb">Movies</a> is an Android application for viewing movie and TV show info using the TMDB API. Movies is a Single Activity application, leveraging Model-View-View Model, Dagger 2, RxJava and SimpleStack for navigation. There is a focus on caching and a pleasant user experience even on slower networks by combining both in-memory and disk caching for quick load times, especially after a show details have been viewed.',
|
||||||
|
imgLocation: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Secure Notes',
|
||||||
|
applicationType: 'Android Application (Kotlin)',
|
||||||
|
// tslint:disable-next-line:max-line-length
|
||||||
|
description: '<a href="https://github.com/Stampede10343/SecureNotes">Secure Notes</a> is a simple note taking application with security in mind. There is a focus on clean' +
|
||||||
|
' code, Model-View-View Model and loosely coupled components. I built this app to experiment with different' +
|
||||||
|
' Android database libraries (Realm and Room), encryption and security, as well as a single Activity approach to' +
|
||||||
|
' an Android app. (Under development).',
|
||||||
|
imgLocation: '../../assets/note-icon.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'CorpsTime',
|
||||||
|
applicationType: 'Android Application (Java and Kotlin)',
|
||||||
|
description: 'CorpsTime is an Android application to view news, scores and the schedule of Drum Corps International' +
|
||||||
|
' competitions. CorpsTime uses the Model View Presenter pattern and libraries such as Dagger 2, Retrofit and RxJava.',
|
||||||
|
imgLocation: '../../assets/corpstime.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'CorpsTime Scraper and API',
|
||||||
|
applicationType: 'Express API powered by Node (Javascript)',
|
||||||
|
description: 'The CorpsTime scraper and API is the supporting code for the CorpsTime mobile application, written' +
|
||||||
|
' in Javascript using Express, Node, and MySQL to gather and prepare data for the CorpsTime client. The scraper' +
|
||||||
|
' runs nightly during the Drum Corps season to pull data from different websites and store and format it to be' +
|
||||||
|
' later retrieved by the API. The API includes a handful of endpoints to get scores, different competing corps and' +
|
||||||
|
' the upcoming events during the season.',
|
||||||
|
imgLocation: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Android Hues',
|
||||||
|
applicationType: 'Android Application (Kotlin)',
|
||||||
|
// tslint:disable-next-line:max-line-length
|
||||||
|
description: '<a href="https://github.com/Stampede10343/AndroidHues">Android Hues</a> is an Android application to control your Phillips Hue lights at home. Hues uses RxJava,' +
|
||||||
|
' Dagger 2 and the Phillips Hue SDK in order to control the color, brightness and power state of your lights.',
|
||||||
|
imgLocation: '../../assets/android-hues.png'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -10,48 +55,7 @@ export class ProjectService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getProjects(): Promise<Array<ProjectItem>> {
|
getProjects(): Promise<Array<ProjectItem>> {
|
||||||
return Promise.resolve(projects)
|
return Promise.resolve(projects);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const projects = [
|
|
||||||
{
|
|
||||||
title: "Movies",
|
|
||||||
applicationType: "Android Application (Kotlin)",
|
|
||||||
description: "<a href='https://github.com/Stampede10343/Movies_TMDb'>Movies</a> is an Android application for viewing movie and TV show info using the TMDB API. Movies is a Single Activity application, leveraging Model-View-View Model, Dagger 2, RxJava and SimpleStack for navigation. There is a focus on caching and a pleasant user experience even on slower networks by combining both in-memory and disk caching for quick load times, especially after a show details have been viewed.",
|
|
||||||
imgLocation: ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Secure Notes",
|
|
||||||
applicationType: "Android Application (Kotlin)",
|
|
||||||
description: "<a href='https://github.com/Stampede10343/SecureNotes'>Secure Notes</a> is a simple note taking application with security in mind. There is a focus on clean" +
|
|
||||||
" code, Model-View-View Model and loosely coupled components. I built this app to experiment with different" +
|
|
||||||
" Android database libraries (Realm and Room), encryption and security, as well as a single Activity approach to" +
|
|
||||||
" an Android app. (Under development).",
|
|
||||||
imgLocation: "../../assets/note-icon.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "CorpsTime",
|
|
||||||
applicationType: "Android Application (Java and Kotlin)",
|
|
||||||
description: "CorpsTime is an Android application to view news, scores and the schedule of Drum Corps International" +
|
|
||||||
" competitions. CorpsTime uses the Model View Presenter pattern and libraries such as Dagger 2, Retrofit and RxJava.",
|
|
||||||
imgLocation: "../../assets/corpstime.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "CorpsTime Scraper and API",
|
|
||||||
applicationType: "Express API powered by Node (Javascript)",
|
|
||||||
description: "The CorpsTime scraper and API is the supporting code for the CorpsTime mobile application, written" +
|
|
||||||
" in Javascript using Express, Node, and MySQL to gather and prepare data for the CorpsTime client. The scraper" +
|
|
||||||
" runs nightly during the Drum Corps season to pull data from different websites and store and format it to be" +
|
|
||||||
" later retrieved by the API. The API includes a handful of endpoints to get scores, different competing corps and" +
|
|
||||||
" the upcoming events during the season.",
|
|
||||||
imgLocation: ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Android Hues",
|
|
||||||
applicationType: "Android Application (Kotlin)",
|
|
||||||
description: "<a href='https://github.com/Stampede10343/AndroidHues'>Android Hues</a> is an Android application to control your Phillips Hue lights at home. Hues uses RxJava," +
|
|
||||||
" Dagger 2 and the Phillips Hue SDK in order to control the color, brightness and power state of your lights.",
|
|
||||||
imgLocation: "../../assets/android-hues.png"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import {ProjectsComponent} from './projects.component';
|
import {ProjectsComponent} from './projects.component';
|
||||||
import {ProjectKeywordPipe} from "../project-keyword.pipe";
|
import {ProjectKeywordPipe} from '../project-keyword.pipe';
|
||||||
|
|
||||||
describe('ProjectsComponent', () => {
|
describe('ProjectsComponent', () => {
|
||||||
let component: ProjectsComponent;
|
let component: ProjectsComponent;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import {ToolbarComponent} from './toolbar.component';
|
import {ToolbarComponent} from './toolbar.component';
|
||||||
import { MatSidenavModule } from "@angular/material/sidenav";
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { MatToolbarModule } from "@angular/material/toolbar";
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||||
import {RouterTestingModule} from "@angular/router/testing";
|
import {RouterTestingModule} from '@angular/router/testing';
|
||||||
import {Component} from "@angular/core";
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({template: ''})
|
@Component({template: ''})
|
||||||
class DummyComponent {
|
class DummyComponent {
|
||||||
@@ -36,12 +36,12 @@ describe('ToolbarComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should contain a material toolbar', () => {
|
it('should contain a material toolbar', () => {
|
||||||
expect(fixture.debugElement.children[0].nativeElement.className).toBe("mat-drawer-container mat-sidenav-container")
|
expect(fixture.debugElement.children[0].nativeElement.className).toBe('mat-drawer-container mat-sidenav-container');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain 4 links, Home, Resume, Projects, Contact', () => {
|
it('should contain 4 links, Home, Resume, Projects, Contact', () => {
|
||||||
let debugElements = fixture.debugElement.queryAll((element) => {
|
const debugElements = fixture.debugElement.queryAll((element) => {
|
||||||
return element.nativeElement.className.indexOf("mat-toolbar") != -1;
|
return element.nativeElement.className.indexOf('mat-toolbar') !== -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(debugElements[0].children.length).toBe(4);
|
expect(debugElements[0].children.length).toBe(4);
|
||||||
|
|||||||
Reference in New Issue
Block a user