Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 376b8f7

Browse files
authored
Merge pull request #21 from feloy/travis-config
Travis config
2 parents 19b340e + 628bad6 commit 376b8f7

File tree

5 files changed

+57
-10
lines changed

5 files changed

+57
-10
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
sudo: required
2+
dist: trusty
3+
addons:
4+
apt:
5+
sources:
6+
- google-chrome
7+
packages:
8+
- google-chrome-stable
9+
language: node_js
10+
node_js:
11+
- "7"
12+
before_script:
13+
- export DISPLAY=:99.0
14+
- sh -e /etc/init.d/xvfb start
15+
script:
16+
- ng lint
17+
- ng test --single-run
18+
- ng build -prod
19+
- ng e2e

e2e/app.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ describe('rxjs-docs App', () => {
77
page = new AppPage();
88
});
99

10-
it('should display welcome message', () => {
10+
it('should display title', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('Welcome to app!');
12+
expect(page.getPageTitle()).toEqual('RxJS Docs');
1313
});
1414
});

e2e/app.po.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class AppPage {
55
return browser.get('/');
66
}
77

8-
getParagraphText() {
9-
return element(by.css('app-root h1')).getText();
8+
getPageTitle() {
9+
return element(by.css('span.title')).getText();
1010
}
1111
}

src/app/app.component.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4+
import { MdToolbarModule, MdSidenavModule, MdIconModule, MdButtonModule, MdListModule } from '@angular/material';
5+
import { AppComponent } from './app.component';
6+
7+
describe('AppComponent', () => {
8+
let component: AppComponent;
9+
let fixture: ComponentFixture<AppComponent>;
10+
11+
beforeEach(async(() => {
12+
TestBed.configureTestingModule({
13+
imports: [RouterTestingModule, BrowserAnimationsModule, MdToolbarModule, MdSidenavModule, MdIconModule, MdButtonModule, MdListModule],
14+
declarations: [AppComponent]
15+
})
16+
.compileComponents();
17+
}));
18+
19+
beforeEach(() => {
20+
fixture = TestBed.createComponent(AppComponent);
21+
component = fixture.componentInstance;
22+
fixture.detectChanges();
23+
});
24+
25+
it('should create', () => {
26+
expect(component).toBeTruthy();
27+
});
28+
});

src/app/app.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component } from '@angular/core';
33
class Menu {
44
title: string;
55
link: string;
6-
options: { exact: boolean };
6+
options: { exact: boolean };
77
}
88

99
@Component({
@@ -13,25 +13,25 @@ class Menu {
1313
})
1414
export class AppComponent {
1515
menus: Menu[] = [
16-
{
16+
{
1717
title: 'Home',
1818
link: '/',
1919
options: { exact: true }
2020
},
21-
{
21+
{
2222
title: 'Operators',
2323
link: '/operators',
2424
options: { exact: false }
2525
},
26-
{
26+
{
2727
title: 'Companies',
2828
link: '/companies',
2929
options: { exact: false }
3030
},
31-
{
31+
{
3232
title: 'Team',
3333
link: '/team',
3434
options: { exact: false }
3535
}
36-
]
36+
];
3737
}

0 commit comments

Comments
 (0)