Merge pull request #1267 from mermaid-js/bug/1261_removal_of_cosole.log-calls

Bug/1261 removal of console.log calls
This commit is contained in:
Knut Sveidqvist 2020-02-21 10:23:37 +01:00 committed by GitHub
commit 1c07e550bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 58 deletions

View File

@ -8,7 +8,6 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x]
browser: [chrome, firefox]
steps:
- uses: actions/checkout@v1
@ -20,10 +19,18 @@ jobs:
- name: Install Yarn
run: npm i yarn --global
- name: Install Dependencies
uses: cypress-io/github-action@v1
- name: Cache Node Modules
uses: actions/cache@v1
with:
runTests: false
path: .cache
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
- name: Install Packages
run: |
yarn config set cache-folder $GITHUB_WORKSPACE/.cache/yarn
yarn install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
- name: Run Build
run: yarn build
@ -44,37 +51,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
- uses: cypress-io/github-action@v1
with:
browser: ${{ matrix.browser }}
group: ${{ matrix.browser }}
headless: true
command-prefix: 'percy exec -- npx'
start: yarn dev
wait-on: 'http://localhost:9000'
install: false
working-directory: cypress
parallel: true
parallelism: 4
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
# - name: Run E2E Tests
# run: yarn e2e
# env:
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
# CYPRESS_CACHE_FOLDER: .cache/Cypress
- name: Upload cypress screenshots
uses: actions/upload-artifact@master
with:
name: cypress-screenshots
path: cypress/screenshots
if: failure()
- name: Upload cypress videos
uses: actions/upload-artifact@master
if: always()
with:
name: cypress-videos
path: cypress/videos
- name: Post Upload Test Results
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
parallel-finished: true

View File

@ -96,36 +96,36 @@ describe('Sequencediagram', () => {
gantt
excludes weekdays 2017-01-10
title Projects Timeline
section asdf
specs :done, :ps, 2019-05-10, 50d
Plasma :pc, 2019-06-20, 60d
Rollup :or, 2019-08-20, 50d
section CEL
plasma-chamber :done, :pc, 2019-05-20, 60d
Plasma Implementation (Rust) :por, 2019-06-20, 120d
Predicates (Atomic Swap) :pred, 2019-07-20, 60d
section DEX 💰
section DEX
History zkSNARK :hs, 2019-08-10, 40d
Exit :vs, after hs, 60d
PredicateSpec :ps, 2019-09-1, 20d
PlasmaIntegration :pi, after ps,40d
section Events 🏁
section Events
ETHBoston :done, :eb, 2019-09-08, 3d
DevCon :active, :dc, 2019-10-08, 3d
section Plasma Calls & updates
section Plasma Calls & updates
OVM :ovm, 2019-07-12, 120d
Plasma call 26 :pc26, 2019-08-21, 1d
Plasma call 27 :pc27, 2019-09-03, 1d
Plasma call 28 :pc28, 2019-09-17, 1d
Plasma call 28 :pc28, 2019-09-17, 1d
`,
{}
);

View File

@ -157,7 +157,6 @@ export const addClass = function(id, style) {
if (typeof style !== 'undefined') {
if (style !== null) {
style.forEach(function(s) {
console.log('style', s);
if (s.match('color')) {
const newStyle1 = s.replace('fill', 'bgFill');
const newStyle2 = newStyle1.replace('color', 'fill');
@ -202,8 +201,6 @@ export const setClass = function(ids, className) {
vertices[id].classes.push(className);
}
console.log('Setting class', className, id, subGraphLookup[id]);
if (typeof subGraphLookup[id] !== 'undefined') {
subGraphLookup[id].classes.push(className);
}
@ -381,7 +378,6 @@ export const defaultStyle = function() {
* Clears the internal graph db so that a new graph can be parsed.
*/
export const addSubGraph = function(_id, list, _title) {
console.log('Adding subgraph', _id);
let id = _id.trim();
let title = _title;
if (_id === _title && _title.match(/\s/)) {
@ -419,7 +415,6 @@ export const addSubGraph = function(_id, list, _title) {
const subGraph = { id: id, nodes: nodeList, title: title.trim(), classes: [] };
subGraphs.push(subGraph);
subGraphLookup[id] = subGraph;
console.log('Adding subgraph', id, subGraphs, subGraphLookup);
return id;
};

View File

@ -269,9 +269,6 @@ export const draw = function(text, id) {
logger.debug('Parsing failed');
}
console.log('Classes:', flowDb.getClasses());
console.log('Subgraphs:', flowDb.getSubGraphs());
// Fetch the default direction, use TD if none was found
let dir = flowDb.getDirection();
if (typeof dir === 'undefined') {
@ -420,7 +417,6 @@ export const draw = function(text, id) {
te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
te.attr('id', id + 'Text');
console.log('Fixing subgraph', id, subG.id, subG.classes); // eslitn-disable-line
for (let j = 0; j < subG.classes.length; j++) {
clusterEl[0].classList.add(subG.classes[j]);
}

View File

@ -10,7 +10,6 @@ const addSection = function(id, value) {
if (typeof sections[id] === 'undefined') {
sections[id] = value;
logger.debug('Added new section :', id);
// console.log('Added new section:', id, value)
}
};
const getSections = () => sections;

View File

@ -533,7 +533,6 @@ const render = function(id, _txt, cb, container) {
// classDef
if (graphType === 'flowchart') {
const classes = flowRenderer.getClasses(txt);
console.log('classes in mermaidApi', classes);
for (const className in classes) {
style += `\n.${className} > * { ${classes[className].styles.join(
' !important; '
@ -544,7 +543,6 @@ const render = function(id, _txt, cb, container) {
)} !important; }`;
}
}
console.log(style);
}
const style1 = document.createElement('style');