Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sudo: required
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
language: node_js
node_js:
- "7"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- ng lint
- ng test --single-run
- ng build -prod
- ng e2e
4 changes: 2 additions & 2 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe('rxjs-docs App', () => {
page = new AppPage();
});

it('should display welcome message', () => {
it('should display title', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
expect(page.getPageTitle()).toEqual('RxJS Docs');
});
});
4 changes: 2 additions & 2 deletions e2e/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class AppPage {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
getPageTitle() {
return element(by.css('span.title')).getText();
}
}
28 changes: 28 additions & 0 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MdToolbarModule, MdSidenavModule, MdIconModule, MdButtonModule, MdListModule } from '@angular/material';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule, BrowserAnimationsModule, MdToolbarModule, MdSidenavModule, MdIconModule, MdButtonModule, MdListModule],
declarations: [AppComponent]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
12 changes: 6 additions & 6 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component } from '@angular/core';
class Menu {
title: string;
link: string;
options: { exact: boolean };
options: { exact: boolean };
}

@Component({
Expand All @@ -13,25 +13,25 @@ class Menu {
})
export class AppComponent {
menus: Menu[] = [
{
{
title: 'Home',
link: '/',
options: { exact: true }
},
{
{
title: 'Operators',
link: '/operators',
options: { exact: false }
},
{
{
title: 'Companies',
link: '/companies',
options: { exact: false }
},
{
{
title: 'Team',
link: '/team',
options: { exact: false }
}
]
];
}