Files
ionic-framework/scripts/e2e/e2e.template.html
2016-02-22 20:38:50 -05:00

125 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Ionic E2E</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- using relative paths in order for snapshot e2e tests to also work -->
<link id="iosLink" ios-href="../../../bundles/ionic.ios.css" rel="stylesheet">
<link id="mdLink" md-href="../../../bundles/ionic.md.css" rel="stylesheet">
<link id="wpLink" wp-href="../../../bundles/ionic.wp.css" rel="stylesheet">
<script>
if (location.href.indexOf('snapshot=true') > -1) {
document.documentElement.classList.add('snapshot');
} else {
document.documentElement.classList.remove('snapshot');
}
if (location.href.indexOf('cordova=true') > -1) {
window.cordova = {};
}
if (location.href.indexOf('rtl=true') > -1) {
document.dir = 'rtl';
} else {
document.dir = 'ltr';
}
// dynamically change the <link>s href so the e2e tests can use dark themes via querystring
if (location.href.indexOf('theme=dark') > -1) {
var link = document.getElementById('iosLink');
link.setAttribute('ios-href', link.getAttribute('ios-href').replace('.css', '.dark.css'));
link = document.getElementById('mdLink');
link.setAttribute('md-href', link.getAttribute('md-href').replace('.css', '.dark.css'));
link = document.getElementById('wpLink');
link.setAttribute('wp-href', link.getAttribute('wp-href').replace('.css', '.dark.css'));
}
</script>
<script src="../../../js/es6-shim.min.js"></script>
<script src="../../../js/es6-module-loader.src.js"></script>
<script src="../../../js/system.src.js"></script>
<script>
System.config({
map: {
'angular2': '/angular2'
},
packages: {
'ionic-angular': {
main: 'index'
}
}
});
</script>
<script src="../../../js/angular2-polyfills.js"></script>
<script src="../../../js/angular2.dev.js"></script>
<script src="../../../js/router.dev.js"></script>
<script src="../../../js/http.dev.js"></script>
<script src="../../../bundles/ionic.system.js"></script>
<script src="../../../js/Rx.js"></script>
<style>
.snapshot body {
/* crop an exact size */
max-height: 700px !important;
}
.snapshot scroll-content {
/* disable scrollbars */
overflow: hidden !important;
}
.snapshot *,
.snapshot *:before,
.snapshot *:after {
/* do not allow css animations during snapshot */
-webkit-transition-duration: 0ms !important;
transition-duration: 0ms !important;
}
.snapshot ion-button-effect {
display: none !important;
}
/* hack to create tall scrollable areas for testing using <f></f> */
f {
display: block;
margin: 15px auto;
max-width: 150px;
height: 150px;
background: blue;
}
f:last-of-type {
background: red;
}
ion-tab:nth-of-type(2) f,
.green f {
background: green;
max-width: 250px;
height: 100px;
}
ion-tab:nth-of-type(3) f,
.yellow f {
background: yellow;
width: 100px;
height: 50px;
}
</style>
</head>
<body>
<ion-app>
<ion-loading-icon></ion-loading-icon>
</ion-app>
<script>
if (document.dir === 'rtl') {
document.body.classList.add('rtl');
} else {
document.body.classList.remove('rtl');
}
System.import('index.js').then(function(m) {}, console.error.bind(console));
</script>
</body>
</html>