test-main.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. require.config({
  2. baseUrl: 'http://localhost:9876/base/src/app',
  3. paths: {
  4. specs: '../test/specs',
  5. mocks: '../test/mocks',
  6. config: '../config.sample',
  7. kbn: 'components/kbn',
  8. store: 'components/store',
  9. settings: 'components/settings',
  10. lodash: 'components/lodash.extended',
  11. 'lodash-src': '../vendor/lodash',
  12. moment: '../vendor/moment',
  13. chromath: '../vendor/chromath',
  14. filesaver: '../vendor/filesaver',
  15. angular: '../vendor/angular/angular',
  16. 'angular-route': '../vendor/angular/angular-route',
  17. angularMocks: '../vendor/angular/angular-mocks',
  18. 'angular-dragdrop': '../vendor/angular/angular-dragdrop',
  19. 'angular-strap': '../vendor/angular/angular-strap',
  20. timepicker: '../vendor/angular/timepicker',
  21. datepicker: '../vendor/angular/datepicker',
  22. bindonce: '../vendor/angular/bindonce',
  23. crypto: '../vendor/crypto.min',
  24. spectrum: '../vendor/spectrum',
  25. jquery: '../vendor/jquery/jquery-2.1.1.min',
  26. bootstrap: '../vendor/bootstrap/bootstrap',
  27. 'bootstrap-tagsinput': '../vendor/tagsinput/bootstrap-tagsinput',
  28. 'jquery-ui': '../vendor/jquery/jquery-ui-1.10.3',
  29. 'extend-jquery': 'components/extend-jquery',
  30. 'jquery.flot': '../vendor/jquery/jquery.flot',
  31. 'jquery.flot.pie': '../vendor/jquery/jquery.flot.pie',
  32. 'jquery.flot.events': '../vendor/jquery/jquery.flot.events',
  33. 'jquery.flot.selection': '../vendor/jquery/jquery.flot.selection',
  34. 'jquery.flot.stack': '../vendor/jquery/jquery.flot.stack',
  35. 'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
  36. 'jquery.flot.time': '../vendor/jquery/jquery.flot.time',
  37. modernizr: '../vendor/modernizr-2.6.1',
  38. },
  39. shim: {
  40. bootstrap: {
  41. deps: ['jquery']
  42. },
  43. modernizr: {
  44. exports: 'Modernizr'
  45. },
  46. angular: {
  47. deps: ['jquery', 'config'],
  48. exports: 'angular'
  49. },
  50. angularMocks: {
  51. deps: ['angular'],
  52. },
  53. crypto: {
  54. exports: 'Crypto'
  55. },
  56. 'jquery-ui': ['jquery'],
  57. 'jquery.flot': ['jquery'],
  58. 'jquery.flot.pie': ['jquery', 'jquery.flot'],
  59. 'jquery.flot.events': ['jquery', 'jquery.flot'],
  60. 'jquery.flot.selection':['jquery', 'jquery.flot'],
  61. 'jquery.flot.stack': ['jquery', 'jquery.flot'],
  62. 'jquery.flot.stackpercent':['jquery', 'jquery.flot'],
  63. 'jquery.flot.time': ['jquery', 'jquery.flot'],
  64. 'angular-route': ['angular'],
  65. 'angular-cookies': ['angular'],
  66. 'angular-dragdrop': ['jquery','jquery-ui','angular'],
  67. 'angular-loader': ['angular'],
  68. 'angular-mocks': ['angular'],
  69. 'angular-resource': ['angular'],
  70. 'angular-touch': ['angular'],
  71. 'bindonce': ['angular'],
  72. 'angular-strap': ['angular', 'bootstrap','timepicker', 'datepicker'],
  73. 'bootstrap-tagsinput': ['jquery'],
  74. timepicker: ['jquery', 'bootstrap'],
  75. datepicker: ['jquery', 'bootstrap'],
  76. }
  77. });
  78. require([
  79. 'angular',
  80. 'angularMocks',
  81. 'app',
  82. ], function(angular) {
  83. 'use strict';
  84. for (var file in window.__karma__.files) {
  85. if (/spec\.js$/.test(file)) {
  86. window.tests.push(file.replace(/^\/base\//, 'http://localhost:9876/base/'));
  87. }
  88. }
  89. angular.module('grafana', ['ngRoute']);
  90. angular.module('grafana.services', ['ngRoute', '$strap.directives']);
  91. angular.module('grafana.panels', []);
  92. angular.module('grafana.filters', []);
  93. require([
  94. 'specs/lexer-specs',
  95. 'specs/parser-specs',
  96. 'specs/gfunc-specs',
  97. 'specs/timeSeries-specs',
  98. 'specs/row-ctrl-specs',
  99. 'specs/graphiteTargetCtrl-specs',
  100. 'specs/influxdb-datasource-specs',
  101. 'specs/graph-ctrl-specs',
  102. 'specs/grafanaGraph-specs',
  103. 'specs/seriesOverridesCtrl-specs',
  104. 'specs/timeSrv-specs',
  105. 'specs/templateSrv-specs',
  106. 'specs/templateValuesSrv-specs',
  107. 'specs/kbn-format-specs',
  108. 'specs/dashboardSrv-specs',
  109. 'specs/dashboardViewStateSrv-specs',
  110. 'specs/influxSeries-specs'
  111. ], function () {
  112. window.__karma__.start();
  113. });
  114. });