forked from juju/juju-gui
/
index.html
229 lines (199 loc) · 8.77 KB
/
index.html
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html>
<!--
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2012-2013 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License version 3, as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/mocha.css">
<!-- Load test runner/environment -->
<script src="assets/chai.js"></script>
<script src="assets/mocha.js"></script>
<script>
// Default window.flags to an empty object.
window.flags = {};
// This is only the Mocha timeout. There's a selenium timeout in
// test_mocha_selenium as well that can effect CI test runs.
var TIMEOUT = 100000;
var assert = chai.assert,
expect = chai.expect,
should = chai.should();
mocha.reporter('html');
mocha.ui('bdd');
mocha.setup({ignoreLeaks: false, timeout: TIMEOUT});
var origBeforeEach = Mocha.Suite.prototype.beforeEach;
var origAfterEach = Mocha.Suite.prototype.afterEach;
Mocha.Suite.prototype.beforeEach = function(title, fn) {
this.ctx._cleanups = [];
origBeforeEach.call(this, title, fn);
};
Mocha.Suite.prototype.afterEach = function(func) {
var newAfterEach = function(done) {
func.apply(this, arguments);
if (this._cleanups && this._cleanups.length) {
while (this._cleanups.length > 0) {
// Run the clean up method after popping it off the stack.
this._cleanups.pop()();
}
this._cleanups = [];
}
done();
}
origAfterEach.call(this, newAfterEach);
};
</script>
<!-- Load up YUI base, app modules, and test utils -->
<!-- Since only the tests depend on these files and the prod tests disable
the YUI loader, we have to include them manually here. -->
<script src="/juju-ui/assets/all-yui.js"></script>
<script src="/juju-ui/assets/modules.js"></script>
<script src="/juju-ui/assets/event-simulate.js"></script>
<script src="/juju-ui/assets/node-event-simulate.js"></script>
<script src="/juju-ui/assets/javascripts/spin.min.js"></script>
<script src="utils.js"></script>
<script src="factory.js"></script>
<!-- Tests (Alphabetical) -->
<script src="test_app.js"></script>
<script src="test_app_hotkeys.js"></script>
<script src="test_application_notifications.js"></script>
<script src="test_browser_app.js"></script>
<script src="test_browser_charm_details.js"></script>
<script src="test_browser_editorial.js"></script>
<script src="test_browser_models.js"></script>
<script src="test_browser_search_view.js"></script>
<script src="test_browser_search_widget.js"></script>
<script src="test_state.js"></script>
<script src="test_ui_state.js"></script>
<script src="test_bundle_details_view.js"></script>
<script src="test_bundle_module.js"></script>
<script src="test_bundle_import_helpers.js"></script>
<script src="test_charmworld.js"></script>
<script src="test_token_container.js"></script>
<script src="test_token.js"></script>
<script src="test_token_drag_and_drop.js"></script>
<!-- FIXME: tests flicker, add container. -->
<script src="test_conflict_ux.js"></script>
<script src="test_console.js"></script>
<script src="test_container_token.js"></script>
<script src="test_cookies_app_extension.js"></script>
<script src="test_databinding.js"></script>
<script src="test_d3_components.js"></script>
<script src="test_d3_status.js"></script>
<script src="test_deployer_bar.js"></script>
<script src="test_dropdown_extension.js"></script>
<script src="test_endpoints.js"></script>
<script src="test_env.js"></script>
<Script src="test_env_change_set.js"></script>
<script src="test_env_go.js"></script>
<script src="test_env_python.js"></script>
<script src="test_environment_header.js"></script>
<script src="test_environment_header_extension.js"></script>
<script src="test_environment_view.js"></script>
<script src="test_event_tracker.js"></script>
<script src="test_fakebackend.js"></script>
<script src="test_filter_widget.js"></script>
<script src="test_ghost_inspector.js"></script>
<script src="test_help_dropdown.js"></script>
<script src="test_inspector_base.js"></script>
<script src="test_inspector_charm.js"></script>
<script src="test_inspector_constraints.js"></script>
<script src="test_inspector_overview.js"></script>
<script src="test_inspector_relations.js"></script>
<script src="test_inspector_settings.js"></script>
<script src="test_inspector_widget.js"></script>
<script src="test_landscape.js"></script>
<script src="test_local_charm_import_helpers.js"></script>
<script src="test_local_new_upgrade_inspector.js"></script>
<script src="test_local_new_upgrade_view.js"></script>
<script src="test_login.js"></script>
<script src="test_machine_token.js"></script>
<script src="test_machine_view_panel.js"></script>
<script src="test_machine_view_panel_extension.js"></script>
<script src="test_machine_view_panel_header.js"></script>
<!-- FIXME: latter three modules depend on side effects from model tests. -->
<script src="test_model.js"></script>
<script src="test_model_bundle.js"></script>
<script src="test_model_controller.js"></script>
<script src="test_onboarding.js"></script>
<script src="test_topology.js"></script>
<script src="test_topology_relation.js"></script>
<script src="test_model_handlers.js"></script>
<script src="test_notifications.js"></script>
<!-- FIXME: test "should destroy notifications after N milliseconds"
failed once in Jenkins CI, retrying submission. -->
<script src="test_notifier_widget.js"></script>
<!-- FIXME: intermittent test failure under "make test-server" and Chromium -
position matches on setBusy: expected 100 to equal 109.09090423583984 -->
<script src="test_overlay_indicator.js"></script>
<script src="test_panzoom.js"></script>
<script src="test_prettify.js"></script>
<script src="test_resizing_textarea.js"></script>
<script src="test_request_series_inspector.js"></script>
<script src="test_request_series_view.js"></script>
<script src="test_routing.js"></script>
<script src="test_sandbox.js"></script>
<script src="test_sandbox_go.js"></script>
<script src="test_sandbox_python.js"></script>
<!-- FIXME: tests leave DOM elements behind. -->
<script src="test_service_module.js"></script>
<script src="test_simulator.js"></script>
<!-- FIXME: feature flags depend on code loaded by the startup test. -->
<script src="test_startup.js"></script>
<script src="test_feature_flags.js"></script>
<script src="test_sub_app.js"></script>
<script src="test_subapp_app_extension.js"></script>
<script src="test_tabview.js"></script>
<script src="test_topology_utils.js"></script>
<script src="test_unit_detail_viewlet.js"></script>
<script src="test_utils.js"></script>
<script src="test_viewlet_manager.js"></script>
<script src="test_viewport_module.js"></script>
<script src="test_websocket_logging.js"></script>
<script src="test_web_handler.js"></script>
<script src="test_web_sandbox.js"></script>
<script src="test_zip_utils.js"></script>
<script src="test_cleanup.js"></script>
<script>
YUI_config = {
async: false,
delayUntil: 'domready',
debug: false,
combine: false,
fetchCSS: false,
// Do not attempt to dispatch a new route when an anchor tag appears in
// the url. This is intended to keep charm details from reloading on tab
// selection in the browser.
navigateOnHash: false
};
// Set the url so we can full path loading fixture files.
GlobalConfig.test_url = window.location.protocol + '//' + window.location.host + "/test/";
// tabview needs to be here since it doesn't auto load it for some reason.
YUI().use(['node', 'event', 'tabview'], function(Y) {
// Run the tests.
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
// The global variable testRunner is required by browser tests.
testRunner = mocha.run();
}
});
</script>
</head>
<body>
<div id="shortcut-help" style="display: none"></div>
<div id="logout-trigger" style="display: none"></div>
<div id="main" class="container"></div>
<div id="mocha"></div>
</body>
</html>