Policy 1707 commit to LF
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / CSS / bootstrap / js / tests / index.html
1 <!DOCTYPE html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>Bootstrap Plugin Test Suite</title>
6     <meta name="viewport" content="width=device-width, initial-scale=1">
7
8     <!-- jQuery -->
9     <script src="vendor/jquery.min.js"></script>
10     <script>
11       // Disable jQuery event aliases to ensure we don't accidentally use any of them
12       (function () {
13         var eventAliases = [
14           'blur',
15           'focus',
16           'focusin',
17           'focusout',
18           'load',
19           'resize',
20           'scroll',
21           'unload',
22           'click',
23           'dblclick',
24           'mousedown',
25           'mouseup',
26           'mousemove',
27           'mouseover',
28           'mouseout',
29           'mouseenter',
30           'mouseleave',
31           'change',
32           'select',
33           'submit',
34           'keydown',
35           'keypress',
36           'keyup',
37           'error',
38           'contextmenu',
39           'hover',
40           'bind',
41           'unbind',
42           'delegate',
43           'undelegate'
44         ]
45         for (var i = 0; i < eventAliases.length; i++) {
46           $.fn[eventAliases[i]] = undefined
47         }
48       })()
49     </script>
50
51     <!-- QUnit -->
52     <link rel="stylesheet" href="vendor/qunit.css" media="screen">
53     <script src="vendor/qunit.js"></script>
54     <script>
55       // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
56       var log = []
57       // Require assert.expect in each test.
58       QUnit.config.requireExpects = true
59       QUnit.done(function (testResults) {
60         var tests = []
61         for (var i = 0, len = log.length; i < len; i++) {
62           var details = log[i]
63           tests.push({
64             name: details.name,
65             result: details.result,
66             expected: details.expected,
67             actual: details.actual,
68             source: details.source
69           })
70         }
71         testResults.tests = tests
72
73         window.global_test_results = testResults
74       })
75
76       QUnit.testStart(function (testDetails) {
77         $(window).scrollTop(0)
78         QUnit.log(function (details) {
79           if (!details.result) {
80             details.name = testDetails.name
81             log.push(details)
82           }
83         })
84       })
85
86       // Cleanup
87       QUnit.testDone(function () {
88         $('#qunit-fixture').empty()
89         $('#modal-test, .modal-backdrop').remove()
90       })
91
92       // Display fixture on-screen on iOS to avoid false positives
93       if (/iPhone|iPad|iPod/.test(navigator.userAgent)) {
94         QUnit.begin(function() {
95           $('#qunit-fixture').css({ top: 0, left: 0 })
96         })
97
98         QUnit.done(function () {
99           $('#qunit-fixture').css({ top: '', left: '' })
100         })
101       }
102
103       // Disable deprecated global QUnit method aliases in preparation for QUnit v2
104       (function () {
105         var methodNames = [
106           'async',
107           'asyncTest',
108           'deepEqual',
109           'equal',
110           'expect',
111           'module',
112           'notDeepEqual',
113           'notEqual',
114           'notPropEqual',
115           'notStrictEqual',
116           'ok',
117           'propEqual',
118           'push',
119           'start',
120           'stop',
121           'strictEqual',
122           'test',
123           'throws'
124         ];
125         for (var i = 0; i < methodNames.length; i++) {
126           var methodName = methodNames[i];
127           window[methodName] = undefined;
128         }
129       })();
130     </script>
131
132     <!-- Plugin sources -->
133     <script>$.support.transition = false</script>
134     <script src="../../js/alert.js"></script>
135     <script src="../../js/button.js"></script>
136     <script src="../../js/carousel.js"></script>
137     <script src="../../js/collapse.js"></script>
138     <script src="../../js/dropdown.js"></script>
139     <script src="../../js/modal.js"></script>
140     <script src="../../js/scrollspy.js"></script>
141     <script src="../../js/tab.js"></script>
142     <script src="../../js/tooltip.js"></script>
143     <script src="../../js/popover.js"></script>
144     <script src="../../js/affix.js"></script>
145
146     <!-- Unit tests -->
147     <script src="unit/alert.js"></script>
148     <script src="unit/button.js"></script>
149     <script src="unit/carousel.js"></script>
150     <script src="unit/collapse.js"></script>
151     <script src="unit/dropdown.js"></script>
152     <script src="unit/modal.js"></script>
153     <script src="unit/scrollspy.js"></script>
154     <script src="unit/tab.js"></script>
155     <script src="unit/tooltip.js"></script>
156     <script src="unit/popover.js"></script>
157     <script src="unit/affix.js"></script>
158
159   </head>
160   <body>
161     <div id="qunit-container">
162       <div id="qunit"></div>
163       <div id="qunit-fixture"></div>
164     </div>
165   </body>
166 </html>