You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/04/25 21:08:49 UTC
[incubator-echarts] 04/08: fix: fix mktest and test facility
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch attached-text
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 560ea38a10ce90590c16edc1181c6a44ef323204
Author: 100pah <su...@gmail.com>
AuthorDate: Fri Apr 24 00:17:42 2020 +0800
fix: fix mktest and test facility
---
test/build/mktest.js | 22 +++++++++-------------
test/lib/caseFrame.css | 4 ++--
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/test/build/mktest.js b/test/build/mktest.js
index 9734e9c..3c618c9 100755
--- a/test/build/mktest.js
+++ b/test/build/mktest.js
@@ -24,11 +24,7 @@ const nodeFS = require('fs');
const assert = require('assert');
const nodePath = require('path');
const commander = require('commander');
-const {color} = require('zrender/build/helper');
-
-const colorFgCyanDim = color('fgCyan', 'dim');
-const colorFgGreen = color('fgGreen');
-const colorFgRed = color('fgRed');
+const chalk = require('chalk');
const testDir = nodePath.resolve(__dirname, '..');
const testTplPath = nodePath.resolve(__dirname, 'mktest-tpl.html');
@@ -38,19 +34,19 @@ const tagDomPlace = '<!-- TPL_DOM_PLACE -->';
const tagJSPlace = '<!-- TPL_JS_PLACE -->';
const manualText = `
- ${colorFgCyanDim('Usage:')}
+ ${chalk.cyan.dim('Usage:')}
# Make a file named "bar-action.html" in directory "echarts/test" with 1 initial chart.
- ${colorFgGreen('npm run mktest bar-action')}
+ ${chalk.green('npm run mktest bar-action')}
# or
- ${colorFgGreen('npm run mktest bar-action.html')}
+ ${chalk.green('npm run mktest bar-action.html')}
# or
- ${colorFgGreen('node ./test/build/mktest bar-action')}
+ ${chalk.green('node ./test/build/mktest bar-action')}
# Make a file named "bar-action.html" in directory "echarts/test" with 5 initial charts.
- ${colorFgGreen('npm run mktest bar-action 5')}
+ ${chalk.green('npm run mktest bar-action 5')}
# or
- ${colorFgGreen('node ./test/build/mktest bar-action 5')}
+ ${chalk.green('node ./test/build/mktest bar-action 5')}
`;
function run() {
@@ -73,7 +69,7 @@ function run() {
nodeFS.writeFileSync(opt.testFilePath, testFileContent, {encoding: 'utf8'});
- console.log(`A test file has been added in: \n${colorFgGreen(opt.testFilePath)}`);
+ console.log(`A test file has been added in: \n${chalk.green(opt.testFilePath)}`);
console.log();
}
@@ -150,7 +146,7 @@ function normalizeInputExt(testFileName) {
}
function printError(msg) {
- console.error(colorFgRed('[ERROR]: ' + msg));
+ console.error(chalk.red('[ERROR]: ' + msg));
}
run();
diff --git a/test/lib/caseFrame.css b/test/lib/caseFrame.css
index 97ad1c7..11816b5 100644
--- a/test/lib/caseFrame.css
+++ b/test/lib/caseFrame.css
@@ -29,7 +29,7 @@
left: 0;
top: 0;
bottom: 0;
- width: 230px;
+ width: 250px;
overflow: auto;
font-size: 13px;
}
@@ -63,7 +63,7 @@
margin: 10px 0;
}
.case-frame .page-content {
- margin-left: 235px;
+ margin-left: 255px;
height: 100%;
padding: 0;
position: relative;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org