From 003ae3a14f38f5d3cc432063ee31d6ae8a262dc9 Mon Sep 17 00:00:00 2001 From: pengpengshui Date: Tue, 11 Jul 2017 21:23:32 -0700 Subject: [PATCH] fixed issue #2688 --- src/ui_ng/lib/karma.conf.win.js | 44 +++++++++++++++++++ src/ui_ng/lib/package.json | 15 ++++--- .../repository-stackview.component.css.ts | 2 +- src/ui_ng/lib/src/tag/tag.component.css.ts | 1 + 4 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 src/ui_ng/lib/karma.conf.win.js diff --git a/src/ui_ng/lib/karma.conf.win.js b/src/ui_ng/lib/karma.conf.win.js new file mode 100644 index 000000000..811dac1b1 --- /dev/null +++ b/src/ui_ng/lib/karma.conf.win.js @@ -0,0 +1,44 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/0.13/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular/cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-mocha-reporter'), + require('karma-remap-istanbul'), + require('@angular/cli/plugins/karma') + ], + files: [ + {pattern: './src/test.ts', watched: false} + ], + preprocessors: { + './src/test.ts': ['@angular/cli'] + }, + mime: { + 'text/x-typescript': ['ts', 'tsx'] + }, + remapIstanbulReporter: { + reports: { + html: 'coverage', + lcovonly: './coverage/coverage.lcov' + } + }, + angularCli: { + config: './angular-cli.json', + environment: 'dev' + }, + reporters: config.angularCli && config.angularCli.codeCoverage + ? ['mocha', 'karma-remap-istanbul'] + : ['mocha'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: true + }); +}; diff --git a/src/ui_ng/lib/package.json b/src/ui_ng/lib/package.json index e76c15d22..a54e4a631 100644 --- a/src/ui_ng/lib/package.json +++ b/src/ui_ng/lib/package.json @@ -6,7 +6,7 @@ "start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json", "lint": "tslint \"src/**/*.ts\"", "test": "ng test --single-run", - "test:once": "karma start karma.conf.js --single-run", + "test:win": "karma start karma.conf.win.js --single-run", "pree2e": "webdriver-manager update", "e2e": "protractor", "cleanup": "rimraf dist", @@ -20,7 +20,7 @@ "dependencies": { "@angular/animations": "~4.1.3", "@angular/common": "~4.1.3", - "@angular/compiler": "~4.1.3", + "@angular/compiler": "^4.1.3", "@angular/core": "~4.1.3", "@angular/forms": "~4.1.3", "@angular/http": "~4.1.3", @@ -29,10 +29,10 @@ "@angular/router": "~4.1.3", "@ngx-translate/core": "^6.0.0", "@ngx-translate/http-loader": "0.0.3", - "@webcomponents/custom-elements": "1.0.0-alpha.3", - "clarity-angular": "~0.9.8", - "clarity-icons": "~0.9.8", - "clarity-ui": "~0.9.8", + "@webcomponents/custom-elements": "^1.0.0-alpha.3", + "clarity-angular": "^0.9.8", + "clarity-icons": "^0.9.8", + "clarity-ui": "^0.9.8", "core-js": "^2.4.1", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", @@ -55,6 +55,7 @@ "jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", + "karma-chrome-launcher": "^2.2.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.2.1", @@ -71,4 +72,4 @@ "uglify-js": "^2.8.22", "webdriver-manager": "10.2.5" } -} \ No newline at end of file +} diff --git a/src/ui_ng/lib/src/repository-stackview/repository-stackview.component.css.ts b/src/ui_ng/lib/src/repository-stackview/repository-stackview.component.css.ts index e569fd8c4..16dc18e87 100644 --- a/src/ui_ng/lib/src/repository-stackview/repository-stackview.component.css.ts +++ b/src/ui_ng/lib/src/repository-stackview/repository-stackview.component.css.ts @@ -3,7 +3,7 @@ export const REPOSITORY_STACKVIEW_STYLES: string = ` padding-right: 16px; } .sub-grid-custom { - position: relative; + /*position: relative;*/ /*for issue #2688*/ left: 40px; } .refresh-btn { diff --git a/src/ui_ng/lib/src/tag/tag.component.css.ts b/src/ui_ng/lib/src/tag/tag.component.css.ts index a9cc12d9a..32d854d01 100644 --- a/src/ui_ng/lib/src/tag/tag.component.css.ts +++ b/src/ui_ng/lib/src/tag/tag.component.css.ts @@ -5,6 +5,7 @@ export const TAG_STYLE = ` .embeded-datagrid { width: 98%; + float:right; /*add for issue #2688*/ } .hidden-tag {