build: adding basic e2e testing infrastructure
This commit is contained in:
@ -2,9 +2,8 @@ import {Component, Injectable} from '@angular/core';
|
||||
import {RouterLink, RouteConfig, Router, Route, RouterOutlet, RouteParams} from '@angular/router';
|
||||
import * as db from './data';
|
||||
import {Location} from '@angular/common';
|
||||
import {PromiseWrapper} from '@angular/facade';
|
||||
import {isPresent, DateWrapper} from '@angular/facade';
|
||||
import {PromiseCompleter} from '@angular/facade';
|
||||
import {PromiseWrapper, PromiseCompleter} from '@angular/core/src/facade/async';
|
||||
import {isPresent, DateWrapper} from '@angular/core/src/facade/lang';
|
||||
|
||||
class InboxRecord {
|
||||
id: string = '';
|
||||
@ -82,7 +81,7 @@ class DbService {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'inbox-detail.html'})
|
||||
@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'app/inbox-detail.html'})
|
||||
class InboxDetailCmp {
|
||||
record: InboxRecord = new InboxRecord();
|
||||
ready: boolean = false;
|
||||
@ -93,7 +92,7 @@ class InboxDetailCmp {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: [RouterLink]})
|
||||
@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: [RouterLink]})
|
||||
class InboxCmp {
|
||||
items: InboxRecord[] = [];
|
||||
ready: boolean = false;
|
||||
@ -118,7 +117,7 @@ class InboxCmp {
|
||||
}
|
||||
|
||||
|
||||
@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: [RouterLink]})
|
||||
@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: [RouterLink]})
|
||||
class DraftsCmp {
|
||||
items: InboxRecord[] = [];
|
||||
ready: boolean = false;
|
||||
@ -134,7 +133,7 @@ class DraftsCmp {
|
||||
@Component({
|
||||
selector: 'inbox-app',
|
||||
viewProviders: [DbService],
|
||||
templateUrl: 'inbox-app.html',
|
||||
templateUrl: 'app/inbox-app.html',
|
||||
directives: [RouterOutlet, RouterLink]
|
||||
})
|
||||
@RouteConfig([
|
@ -3,12 +3,12 @@
|
||||
<title>Routing Example</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gumby/2.6.0/css/gumby.css" />
|
||||
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
||||
<base href="/playground/src/routing/">
|
||||
<base href="/all/playground/src/routing/">
|
||||
<body>
|
||||
<inbox-app>
|
||||
Loading...
|
||||
</inbox-app>
|
||||
|
||||
$SCRIPTS$
|
||||
<script src="../bootstrap.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {InboxApp} from './inbox-app';
|
||||
import {InboxApp} from './app/inbox-app';
|
||||
import {provide} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
||||
import {ROUTER_PROVIDERS} from '@angular/router';
|
||||
|
||||
|
Reference in New Issue
Block a user