]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Remove karma packages 23181/head
authorTiago Melo <tspmelo@gmail.com>
Mon, 23 Jul 2018 13:00:06 +0000 (14:00 +0100)
committerTiago Melo <tspmelo@gmail.com>
Mon, 23 Jul 2018 13:04:43 +0000 (14:04 +0100)
Since we are no longer using karma for the frontend unit tests, we will remove
all the related packages and configurations.

This includes the removal of the phantomjs package.

Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/angular.json
src/pybind/mgr/dashboard/frontend/karma.conf.js [deleted file]
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/frontend/src/test.ts [deleted file]

index 96a685f4e8a15f8668b1ef82dc5ad43fd152cffe..35d23369aa4d2b35ec4318119377ebde915297d8 100644 (file)
             "browserTarget": "ceph-dashboard:build"
           }
         },
-        "test": {
-          "builder": "@angular-devkit/build-angular:karma",
-          "options": {
-            "main": "src/test.ts",
-            "karmaConfig": "./karma.conf.js",
-            "polyfills": "src/polyfills.ts",
-            "tsConfig": "src/tsconfig.spec.json",
-            "scripts": [
-              "node_modules/chart.js/dist/Chart.bundle.js"
-            ],
-            "styles": [
-              "node_modules/bootstrap/dist/css/bootstrap.css",
-              "node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
-              "node_modules/fork-awesome/css/fork-awesome.css",
-              "node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css",
-              "src/styles.scss"
-            ],
-            "assets": [
-              "src/assets",
-              "src/favicon.ico"
-            ]
-          }
-        },
         "lint": {
           "builder": "@angular-devkit/build-angular:tslint",
           "options": {
diff --git a/src/pybind/mgr/dashboard/frontend/karma.conf.js b/src/pybind/mgr/dashboard/frontend/karma.conf.js
deleted file mode 100644 (file)
index 81e6bb5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Karma configuration file, see link for more information
-// https://karma-runner.github.io/1.0/config/configuration-file.html
-
-module.exports = function (config) {
-  config.set({
-    basePath: '',
-    frameworks: ['jasmine', '@angular-devkit/build-angular'],
-    plugins: [
-      require('karma-jasmine'),
-      require('karma-chrome-launcher'),
-      require('karma-jasmine-html-reporter'),
-      require('karma-coverage-istanbul-reporter'),
-      require('@angular-devkit/build-angular/plugins/karma'),
-      require('karma-phantomjs-launcher'),
-      require('karma-junit-reporter')
-    ],
-    client:{
-      clearContext: false // leave Jasmine Spec Runner output visible in browser
-    },
-    coverageIstanbulReporter: {
-      dir: require('path').join(__dirname, 'coverage'),
-      reports: ['html', 'lcovonly', 'cobertura'],
-      fixWebpackSourcePaths: true
-    },
-    angularCli: {
-      environment: 'dev'
-    },
-    reporters: ['progress', 'kjhtml', 'junit'],
-    junitReporter: {
-      'outputFile': 'junit.frontend.xml',
-      'suite': 'dashboard',
-      'useBrowserName': false
-    },
-    port: 9876,
-    colors: true,
-    logLevel: config.LOG_INFO,
-    autoWatch: true,
-    browsers: ['Chrome'],
-    singleRun: false
-  });
-};
index 9975c6e9b6c8c037be52d4d2e074754b1ece5b8b..5bf91fd393cbd4d27841f8ec7a8266dbe80c8f7f 100644 (file)
     "jest": "23.2.0",
     "jest-canvas-mock": "1.0.3",
     "jest-preset-angular": "5.2.3",
-    "karma": "2.0.4",
-    "karma-chrome-launcher": "2.2.0",
-    "karma-cli": "1.0.1",
-    "karma-coverage-istanbul-reporter": "2.0.1",
-    "karma-jasmine": "1.1.2",
-    "karma-jasmine-html-reporter": "1.1.0",
-    "karma-junit-reporter": "1.2.0",
-    "karma-phantomjs-launcher": "1.0.4",
     "prettier": "1.13.6",
     "pretty-quick": "1.6.0",
     "protractor": "5.3.2",
diff --git a/src/pybind/mgr/dashboard/frontend/src/test.ts b/src/pybind/mgr/dashboard/frontend/src/test.ts
deleted file mode 100644 (file)
index 19beece..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* tslint:disable:ordered-imports */
-// This file is required by karma.conf.js and loads recursively all the .spec and framework files
-
-import 'zone.js/dist/long-stack-trace-zone';
-import 'zone.js/dist/proxy.js';
-import 'zone.js/dist/sync-test';
-import 'zone.js/dist/jasmine-patch';
-import 'zone.js/dist/async-test';
-import 'zone.js/dist/fake-async-test';
-import { getTestBed } from '@angular/core/testing';
-import {
-  BrowserDynamicTestingModule,
-  platformBrowserDynamicTesting
-} from '@angular/platform-browser-dynamic/testing';
-
-// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
-declare const __karma__: any;
-declare const require: any;
-
-// Prevent Karma from running prematurely.
-__karma__.loaded = function () {};
-
-// First, initialize the Angular testing environment.
-getTestBed().initTestEnvironment(
-  BrowserDynamicTestingModule,
-  platformBrowserDynamicTesting()
-);
-// Then we find all the tests.
-const context = require.context('./', true, /\.spec\.ts$/);
-// And load the modules.
-context.keys().map(context);
-// Finally, start Karma to run the tests.
-__karma__.start();