forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe2e.template.html
More file actions
130 lines (121 loc) · 4.11 KB
/
e2e.template.html
File metadata and controls
130 lines (121 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!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" />
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 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/Reflect.js"></script>
<script src="../../../js/zone.js"></script>
<script src="../../../js/system.src.js"></script>
<script>
System.config({
map: {
'@angular/core': '/node_modules/@angular/core/bundles/core.umd.js',
'@angular/compiler': '/node_modules/@angular/compiler/bundles/compiler.umd.js',
'@angular/common': '/node_modules/@angular/common/bundles/common.umd.js',
'@angular/forms': '/node_modules/@angular/forms/bundles/forms.umd.js',
'@angular/http': '/node_modules/@angular/http/bundles/http.umd.js',
'@angular/platform-browser': '/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': '/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'ionic-angular': '/src'
},
packages: {
'ionic-angular': {
main: 'index'
},
'rxjs': {
defaultExtension: '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-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>