visual dependencies update and azure pipelines integration added (#38)
* visual dependencies update and azure pipelines integration added * CHANGELOG
This commit is contained in:
Родитель
535db5f72a
Коммит
27186ce77d
|
@ -1,3 +1,7 @@
|
|||
## 2.0.1
|
||||
* Azure Pipelines integration
|
||||
* Visual packages update
|
||||
|
||||
## 2.0.0
|
||||
* API 2.1.0
|
||||
* Webpack integration
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
# Node.js
|
||||
# Build a general Node.js project with npm.
|
||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu 16.04'
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '10.x'
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
- script: |
|
||||
npm install
|
||||
npm run lint
|
||||
npm run test
|
||||
displayName: 'npm install, lint and test'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: '**/TESTS-*.xml'
|
||||
testRunTitle: 'Custom Visual unit-tests'
|
||||
mergeTestResults: true
|
||||
|
||||
#- task: PublishCodeCoverageResults@1
|
||||
# inputs:
|
||||
# codeCoverageTool: 'cobertura' # Options: cobertura, jaCoCo
|
||||
# summaryFileLocation: '**/*-coverage.xml'
|
||||
# reportDirectory: '**/html-report'
|
||||
# failIfCoverageEmpty: true
|
|
@ -32,9 +32,7 @@ const path = require("path");
|
|||
|
||||
const testRecursivePath = "test/visualTest.ts";
|
||||
const srcOriginalRecursivePath = "src/**/*.ts";
|
||||
const srcRecursivePath = ".tmp/drop/**/*.js";
|
||||
const coverageFolder = "coverage";
|
||||
const globals = "./test/globals.ts";
|
||||
|
||||
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
||||
|
||||
|
@ -48,9 +46,14 @@ module.exports = (config: Config) => {
|
|||
frameworks: ["jasmine"],
|
||||
reporters: [
|
||||
"progress",
|
||||
"coverage",
|
||||
"junit",
|
||||
"coverage-istanbul"
|
||||
],
|
||||
junitReporter: {
|
||||
outputDir: path.join(__dirname, coverageFolder),
|
||||
outputFile: "TESTS-report.xml",
|
||||
useBrowserName: false
|
||||
},
|
||||
singleRun: true,
|
||||
plugins: [
|
||||
"karma-coverage",
|
||||
|
@ -59,13 +62,12 @@ module.exports = (config: Config) => {
|
|||
"karma-jasmine",
|
||||
"karma-sourcemap-loader",
|
||||
"karma-chrome-launcher",
|
||||
"karma-junit-reporter",
|
||||
"karma-coverage-istanbul-reporter"
|
||||
],
|
||||
files: [
|
||||
"node_modules/jquery/dist/jquery.min.js",
|
||||
"node_modules/jasmine-jquery/lib/jasmine-jquery.js",
|
||||
globals,
|
||||
srcRecursivePath,
|
||||
testRecursivePath,
|
||||
{
|
||||
pattern: srcOriginalRecursivePath,
|
||||
|
@ -80,47 +82,34 @@ module.exports = (config: Config) => {
|
|||
}
|
||||
],
|
||||
preprocessors: {
|
||||
[testRecursivePath]: ["webpack"],
|
||||
[srcRecursivePath]: ["sourcemap"]
|
||||
[testRecursivePath]: ["webpack", "coverage"]
|
||||
},
|
||||
typescriptPreprocessor: {
|
||||
options: tsconfig.compilerOptions
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
// reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib
|
||||
reports: {
|
||||
lcovonly: coverageFolder + "lcov.info",
|
||||
html: coverageFolder,
|
||||
"text-summary": null
|
||||
},
|
||||
|
||||
// base output directory. If you include %browser% in the path it will be replaced with the karma browser name
|
||||
dir: path.join(__dirname, "coverage"),
|
||||
|
||||
// Combines coverage information from multiple browsers into one report rather than outputting a report
|
||||
// for each browser.
|
||||
combineBrowserReports: true,
|
||||
|
||||
// if using webpack and pre-loaders, work around webpack breaking the source path
|
||||
fixWebpackSourcePaths: true,
|
||||
|
||||
// Omit files with no statements, no functions and no branches from the report
|
||||
skipFilesWithNoCoverage: true,
|
||||
|
||||
// Most reporters accept additional config options. You can pass these through the `report-config` option
|
||||
"report-config": {
|
||||
// all options available at: https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/html/index.js#L135-L137
|
||||
reports: ["html", "lcovonly", "text-summary", "cobertura"],
|
||||
dir: path.join(__dirname, coverageFolder),
|
||||
'report-config': {
|
||||
html: {
|
||||
// outputs the report in ./coverage/html
|
||||
subdir: "html"
|
||||
subdir: 'html-report'
|
||||
}
|
||||
}
|
||||
},
|
||||
combineBrowserReports: true,
|
||||
fixWebpackSourcePaths: true,
|
||||
verbose: false
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: coverageFolder,
|
||||
dir: path.join(__dirname, coverageFolder),
|
||||
reporters: [
|
||||
{ type: "html" },
|
||||
{ type: "lcov" }
|
||||
// reporters not supporting the `file` property
|
||||
{ type: 'html', subdir: 'html-report' },
|
||||
{ type: 'lcov', subdir: 'lcov' },
|
||||
// reporters supporting the `file` property, use `subdir` to directly
|
||||
// output them in the `dir` directory
|
||||
{ type: 'cobertura', subdir: '.', file: 'cobertura-coverage.xml' },
|
||||
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
|
||||
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' },
|
||||
]
|
||||
},
|
||||
mime: {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
44
package.json
44
package.json
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
"name": "powerbi-visuals-linedotchart",
|
||||
"description": "LineDot Chart",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"author": {
|
||||
"name": "Microsoft",
|
||||
"email": "pbicvsupport@microsoft.com"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "pbiviz update 2.1.0",
|
||||
"pbiviz": "pbiviz",
|
||||
"start": "pbiviz start",
|
||||
"package": "pbiviz package",
|
||||
|
@ -24,8 +23,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"d3": "^5.4.0",
|
||||
"lodash": "4.16.2",
|
||||
"powerbi-models": "1.0.8",
|
||||
"lodash": "4.17.11",
|
||||
"powerbi-models": "1.0.12",
|
||||
"powerbi-visuals-utils-chartutils": "2.0.7",
|
||||
"powerbi-visuals-utils-colorutils": "2.0.2",
|
||||
"powerbi-visuals-utils-dataviewutils": "2.0.1",
|
||||
|
@ -35,41 +34,42 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/d3": "^5.0.0",
|
||||
"@types/jasmine": "2.5.47",
|
||||
"@types/jasmine-jquery": "1.5.30",
|
||||
"@types/jquery": "2.0.41",
|
||||
"@types/karma": "1.7.3",
|
||||
"@types/lodash": "4.14.55",
|
||||
"@types/webpack": "4.4.4",
|
||||
"@types/jasmine": "2.8.9",
|
||||
"@types/jasmine-jquery": "1.5.32",
|
||||
"@types/jquery": "3.3.22",
|
||||
"@types/karma": "3.0.0",
|
||||
"@types/lodash": "4.14.117",
|
||||
"@types/webpack": "4.4.17",
|
||||
"coveralls": "3.0.2",
|
||||
"css-loader": "1.0.0",
|
||||
"del-cli": "1.1.0",
|
||||
"istanbul-reports": "2.0.0",
|
||||
"jasmine": "2.5.2",
|
||||
"istanbul-instrumenter-loader": "^3.0.1",
|
||||
"jasmine": "3.3.0",
|
||||
"jasmine-jquery": "2.1.1",
|
||||
"jquery": "3.1.1",
|
||||
"karma": "3.0.0",
|
||||
"jquery": "3.3.1",
|
||||
"karma": "3.1.1",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-coverage": "1.1.2",
|
||||
"karma-coverage": "^1.1.2",
|
||||
"karma-coverage-istanbul-reporter": "^2.0.4",
|
||||
"karma-jasmine": "1.1.2",
|
||||
"karma-junit-reporter": "^1.2.0",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"karma-typescript": "3.0.13",
|
||||
"karma-typescript-preprocessor": "0.3.1",
|
||||
"karma-webpack": "3.0.0",
|
||||
"less": "2.1.1",
|
||||
"karma-typescript-preprocessor": "0.4.0",
|
||||
"karma-webpack": "3.0.5",
|
||||
"less": "3.8.1",
|
||||
"less-loader": "4.1.0",
|
||||
"powerbi-visuals-api": "^2.1.0",
|
||||
"powerbi-visuals-tools": "3.0.1",
|
||||
"powerbi-visuals-tools": "3.0.4",
|
||||
"powerbi-visuals-utils-interactivityutils": "^5.0.1",
|
||||
"powerbi-visuals-utils-testutils": "^2.0.4",
|
||||
"powerbi-visuals-utils-typeutils": "2.0.1",
|
||||
"puppeteer": "^1.6.1",
|
||||
"style-loader": "0.21.0",
|
||||
"ts-loader": "4.4.2",
|
||||
"style-loader": "0.23.1",
|
||||
"ts-loader": "5.2.2",
|
||||
"ts-node": "^7.0.0",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "^3.0.1",
|
||||
"webpack": "4.14.0"
|
||||
"webpack": "4.23.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"visual": {
|
||||
"name": "LineDotChart",
|
||||
"displayName": "LineDot Chart 2.0.0",
|
||||
"displayName": "LineDot Chart 2.0.1",
|
||||
"guid": "LineDotChart1460463831201",
|
||||
"visualClassName": "LineDotChart",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "The LineDot chart is an animated line chart with fun animated dots. Use the LineDot chart to engage your audience especially in a presentation context. The bubbles size can be dynamic based on data you provide. A counter is provided that you can use to show a running value as the chart animates. Format options are provided for Lines, Dots, and Animation.",
|
||||
"supportUrl": "https://community.powerbi.com",
|
||||
"gitHubUrl": "https://github.com/Microsoft/powerbi-visuals-linedotchart"
|
||||
|
|
|
@ -10,6 +10,14 @@ module.exports = {
|
|||
use: 'ts-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/i,
|
||||
enforce: 'post',
|
||||
include: /(src)/,
|
||||
exclude: /(node_modules|resources\/js\/vendor)/,
|
||||
loader: 'istanbul-instrumenter-loader',
|
||||
options: { esModules: true }
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
// tslint:disable-next-line
|
||||
var powerbi = {};
|
|
@ -242,6 +242,7 @@ describe("LineDotChartTests", () => {
|
|||
});
|
||||
it("opacity", () => {
|
||||
let color: string = getRandomHexColor();
|
||||
const dots: JQuery<any>[] = visualBuilder.dots.toArray().map($);
|
||||
dataView.metadata.objects = {
|
||||
dotoptions: {
|
||||
color: getSolidColorStructuralObject(color),
|
||||
|
@ -249,7 +250,7 @@ describe("LineDotChartTests", () => {
|
|||
}
|
||||
};
|
||||
visualBuilder.updateFlushAllD3Transitions(dataView);
|
||||
visualBuilder.dots.toArray().map($).forEach(e => assertColorsMatch(e.attr('fill'), color) && assertColorsMatch(e.style('opacity'), color));
|
||||
dots.forEach(e => assertColorsMatch(e.attr('fill'), color) && assertColorsMatch(e.css('opacity'), color));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -429,7 +430,7 @@ describe("LineDotChartTests", () => {
|
|||
|
||||
it("should not use fill style", (done) => {
|
||||
visualBuilder.updateRenderTimeout(dataView, () => {
|
||||
const dots: JQuery[] = visualBuilder.dots.toArray().map($);
|
||||
const dots: JQuery<any>[] = visualBuilder.dots.toArray().map($);
|
||||
|
||||
expect(isColorAppliedToElements(dots, null, "fill"));
|
||||
|
||||
|
@ -439,7 +440,7 @@ describe("LineDotChartTests", () => {
|
|||
|
||||
it("should use stroke style", (done) => {
|
||||
visualBuilder.updateRenderTimeout(dataView, () => {
|
||||
const dots: JQuery[] = visualBuilder.dots.toArray().map($);
|
||||
const dots: JQuery<any>[] = visualBuilder.dots.toArray().map($);
|
||||
|
||||
expect(isColorAppliedToElements(dots, foregroundColor, "stroke"));
|
||||
|
||||
|
@ -515,7 +516,7 @@ describe("LineDotChartTests", () => {
|
|||
});
|
||||
|
||||
describe("Different formats data representation test", () => {
|
||||
let tickText: JQuery[];
|
||||
let tickText: JQuery<any>[];
|
||||
let xTicksCount: number;
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -563,7 +564,7 @@ describe("LineDotChartTests", () => {
|
|||
|
||||
describe("Y axis right scaling test", () => {
|
||||
let yTicksText: JQuery[] = [];
|
||||
let allTicksText: JQuery[];
|
||||
let allTicksText: JQuery<any>[];
|
||||
|
||||
beforeEach(() => {
|
||||
const orderedDates: Date[] = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче