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

Commit 41ffd56

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents c88c397 + 376b8f7 commit 41ffd56

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
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+
});

0 commit comments

Comments
 (0)