Skip to content

Commit f3d256e

Browse files
Elena Rodionovauve
Elena Rodionova
authored andcommitted
update tools and apply azure pipelines integration (#27)
* update tools and apply azure pipelines integration * utils update * empty screen on first data init issue fixed
1 parent 0049e87 commit f3d256e

File tree

10 files changed

+686
-1581
lines changed

10 files changed

+686
-1581
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.1
2+
* Azure Pipelines integration
3+
* Visual packages update
4+
15
## 2.0.0
26
* Webpack migration
37

azure-pipelines.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Node.js
2+
# Build a general Node.js project with npm.
3+
# Add steps that analyze code, save build artifacts, deploy, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
5+
6+
pool:
7+
vmImage: 'Ubuntu 16.04'
8+
9+
steps:
10+
- task: NodeTool@0
11+
inputs:
12+
versionSpec: '10.x'
13+
displayName: 'Install Node.js'
14+
15+
- script: |
16+
npm install
17+
npm run lint
18+
npm run test
19+
displayName: 'npm install, lint and test'
20+
21+
- task: PublishTestResults@2
22+
inputs:
23+
testResultsFormat: 'JUnit'
24+
testResultsFiles: '**/TESTS-*.xml'
25+
testRunTitle: 'Custom Visual unit-tests'
26+
mergeTestResults: true
27+
28+
#- task: PublishCodeCoverageResults@1
29+
# inputs:
30+
# codeCoverageTool: 'cobertura' # Options: cobertura, jaCoCo
31+
# summaryFileLocation: '**/*-coverage.xml'
32+
# reportDirectory: '**/html-report'
33+
# failIfCoverageEmpty: true

karma.conf.ts

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828

2929
const webpackConfig = require("./test.webpack.config.js");
3030
const tsconfig = require("./test.tsconfig.json");
31+
const path = require("path");
3132

3233
const testRecursivePath = "test/visualTest.ts";
3334
const srcOriginalRecursivePath = "src/**/*.ts";
34-
const srcRecursivePath = ".tmp/drop/**/*.js";
3535
const coverageFolder = "coverage";
36-
const globals = "./test/globals.ts";
3736

3837
process.env.CHROME_BIN = require("puppeteer").executablePath();
3938

@@ -47,12 +46,13 @@ module.exports = (config: Config) => {
4746
frameworks: ["jasmine"],
4847
reporters: [
4948
"progress",
49+
"junit",
5050
"coverage-istanbul"
5151
],
52-
coverageIstanbulReporter: {
53-
reports: ["html", "lcovonly", "text-summary"],
54-
combineBrowserReports: true,
55-
fixWebpackSourcePaths: true
52+
junitReporter: {
53+
outputDir: path.join(__dirname, coverageFolder),
54+
outputFile: "TESTS-report.xml",
55+
useBrowserName: false
5656
},
5757
singleRun: true,
5858
plugins: [
@@ -62,38 +62,54 @@ module.exports = (config: Config) => {
6262
"karma-jasmine",
6363
"karma-sourcemap-loader",
6464
"karma-chrome-launcher",
65+
"karma-junit-reporter",
6566
"karma-coverage-istanbul-reporter"
6667
],
6768
files: [
6869
"node_modules/jquery/dist/jquery.min.js",
6970
"node_modules/jasmine-jquery/lib/jasmine-jquery.js",
70-
globals,
71-
srcRecursivePath,
7271
testRecursivePath,
7372
{
7473
pattern: srcOriginalRecursivePath,
7574
included: false,
7675
served: true
7776
},
7877
{
79-
pattern: './capabilities.json',
78+
pattern: "./capabilities.json",
8079
watched: false,
8180
served: true,
8281
included: false
8382
}
8483
],
8584
preprocessors: {
86-
[testRecursivePath]: ["webpack"],
87-
[srcRecursivePath]: ["webpack", "coverage"]
85+
[testRecursivePath]: ["webpack", "coverage"]
8886
},
8987
typescriptPreprocessor: {
9088
options: tsconfig.compilerOptions
9189
},
90+
coverageIstanbulReporter: {
91+
reports: ["html", "lcovonly", "text-summary", "cobertura"],
92+
dir: path.join(__dirname, coverageFolder),
93+
'report-config': {
94+
html: {
95+
subdir: 'html-report'
96+
}
97+
},
98+
combineBrowserReports: true,
99+
fixWebpackSourcePaths: true,
100+
verbose: false
101+
},
92102
coverageReporter: {
93-
dir: coverageFolder,
103+
dir: path.join(__dirname, coverageFolder),
94104
reporters: [
95-
{ type: "html" },
96-
{ type: "lcov" }
105+
// reporters not supporting the `file` property
106+
{ type: 'html', subdir: 'html-report' },
107+
{ type: 'lcov', subdir: 'lcov' },
108+
// reporters supporting the `file` property, use `subdir` to directly
109+
// output them in the `dir` directory
110+
{ type: 'cobertura', subdir: '.', file: 'cobertura-coverage.xml' },
111+
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
112+
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' },
97113
]
98114
},
99115
mime: {

0 commit comments

Comments
 (0)