chore(material): add simple e2e smoke tests for components.

This commit is contained in:
Jeremy Elbourn
2015-05-04 18:34:06 -07:00
parent 93c331d103
commit 20a033e4c9
22 changed files with 137 additions and 66 deletions

View File

@ -7,10 +7,7 @@
<style> * { font-family: RobotoDraft, Roboto, 'Helvetica Neue', sans-serif; } </style>
</head>
<body>
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -4,15 +4,10 @@
<meta charset="UTF-8">
<title>ng-material checkbox demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -48,10 +48,17 @@ export class DemoUrlResolver extends UrlResolver {
return `${baseUrl}/${url}`;
}
if (this.isInPubServe) {
return `/packages/${url}`;
// Whether the `examples/` dir is being directly served (as the server root).
// For cases when this is not true AND we're in pub-serve, `examples/` needs to be
// prepended to the URL.
var isDirectlyServingExamplesDir = !StringWrapper.contains(baseUrl, 'examples/');
if (this.isInPubServe && isDirectlyServingExamplesDir) {
return `/packages/${url}`;
} else if (this.isInPubServe) {
return `/examples/packages/${url}`;
} else {
return `/${url}`;
return `/${url}`;
}
}
}

View File

@ -1,7 +1,7 @@
<div>
<h2>Dialog demo</h2>
<button type="button" (click)="open()" [disabled]="!!dialogRef">
<button id="open" type="button" (click)="open()" [disabled]="!!dialogRef">
Open a dialog
</button>

View File

@ -4,15 +4,10 @@
<meta charset="UTF-8">
<title>ng-material dialog demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<body class="dialog-demo">
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -4,17 +4,10 @@
<meta charset="UTF-8">
<title>ng-material grid-list demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -4,16 +4,12 @@
<meta charset="UTF-8">
<title>ng-material input demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -37,6 +37,6 @@
<!--<md-progress-linear></md-progress-linear>-->
<p>Progress: {{progress}}</p>
<button type="button" (click)="step(10)">Increment</button>
<button type="button" (click)="step(-10)">Decrement</button>
<button type="button" (click)="step(10)" id="increment">Increment</button>
<button type="button" (click)="step(-10)" id="decrement">Decrement</button>
</div>

View File

@ -4,15 +4,12 @@
<meta charset="UTF-8">
<title>ng-material progress-linear demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -2,7 +2,7 @@
<h2>Radio buttons</h2>
<h3>Inside of a radiogroup</h3>
<md-radio-group #scifi (change)="onGroupChange()">
<md-radio-group #scifi (change)="onGroupChange()" id="scifi-group">
<md-radio-button value="star-wars">Star Wars</md-radio-button>
<md-radio-button value="star-trek" id="special-radio">Star Trek</md-radio-button>
<md-radio-button value="bsg" disabled>Battlestar Galactica</md-radio-button>

View File

@ -4,17 +4,12 @@
<meta charset="UTF-8">
<title>ng-material radio demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic">
<style>
* {
font-family: RobotoDraft, Roboto;
}
</style>
<style> * { font-family: RobotoDraft, Roboto; } </style>
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>

View File

@ -12,8 +12,8 @@
</head>
<body>
$SCRIPTS$
<demo-app>Loading...</demo-app>
$SCRIPTS$
</body>
</html>