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:
commit
1c07e550bb
|
@ -8,7 +8,6 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [10.x, 12.x]
|
node-version: [10.x, 12.x]
|
||||||
browser: [chrome, firefox]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
@ -20,10 +19,18 @@ jobs:
|
||||||
- name: Install Yarn
|
- name: Install Yarn
|
||||||
run: npm i yarn --global
|
run: npm i yarn --global
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Cache Node Modules
|
||||||
uses: cypress-io/github-action@v1
|
uses: actions/cache@v1
|
||||||
with:
|
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
|
- name: Run Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
@ -44,34 +51,11 @@ jobs:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
parallel: true
|
parallel: true
|
||||||
|
|
||||||
- uses: cypress-io/github-action@v1
|
# - name: Run E2E Tests
|
||||||
with:
|
# run: yarn e2e
|
||||||
browser: ${{ matrix.browser }}
|
# env:
|
||||||
group: ${{ matrix.browser }}
|
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
||||||
headless: true
|
# CYPRESS_CACHE_FOLDER: .cache/Cypress
|
||||||
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: 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
|
- name: Post Upload Test Results
|
||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
|
|
|
@ -108,7 +108,7 @@ describe('Sequencediagram', () => {
|
||||||
Plasma Implementation (Rust) :por, 2019-06-20, 120d
|
Plasma Implementation (Rust) :por, 2019-06-20, 120d
|
||||||
Predicates (Atomic Swap) :pred, 2019-07-20, 60d
|
Predicates (Atomic Swap) :pred, 2019-07-20, 60d
|
||||||
|
|
||||||
section DEX 💰
|
section DEX
|
||||||
|
|
||||||
History zkSNARK :hs, 2019-08-10, 40d
|
History zkSNARK :hs, 2019-08-10, 40d
|
||||||
Exit :vs, after hs, 60d
|
Exit :vs, after hs, 60d
|
||||||
|
@ -116,12 +116,12 @@ describe('Sequencediagram', () => {
|
||||||
PlasmaIntegration :pi, after ps,40d
|
PlasmaIntegration :pi, after ps,40d
|
||||||
|
|
||||||
|
|
||||||
section Events 🏁
|
section Events
|
||||||
|
|
||||||
ETHBoston :done, :eb, 2019-09-08, 3d
|
ETHBoston :done, :eb, 2019-09-08, 3d
|
||||||
DevCon :active, :dc, 2019-10-08, 3d
|
DevCon :active, :dc, 2019-10-08, 3d
|
||||||
|
|
||||||
section Plasma Calls & updates ✨
|
section Plasma Calls & updates
|
||||||
OVM :ovm, 2019-07-12, 120d
|
OVM :ovm, 2019-07-12, 120d
|
||||||
Plasma call 26 :pc26, 2019-08-21, 1d
|
Plasma call 26 :pc26, 2019-08-21, 1d
|
||||||
Plasma call 27 :pc27, 2019-09-03, 1d
|
Plasma call 27 :pc27, 2019-09-03, 1d
|
||||||
|
|
|
@ -157,7 +157,6 @@ export const addClass = function(id, style) {
|
||||||
if (typeof style !== 'undefined') {
|
if (typeof style !== 'undefined') {
|
||||||
if (style !== null) {
|
if (style !== null) {
|
||||||
style.forEach(function(s) {
|
style.forEach(function(s) {
|
||||||
console.log('style', s);
|
|
||||||
if (s.match('color')) {
|
if (s.match('color')) {
|
||||||
const newStyle1 = s.replace('fill', 'bgFill');
|
const newStyle1 = s.replace('fill', 'bgFill');
|
||||||
const newStyle2 = newStyle1.replace('color', 'fill');
|
const newStyle2 = newStyle1.replace('color', 'fill');
|
||||||
|
@ -202,8 +201,6 @@ export const setClass = function(ids, className) {
|
||||||
vertices[id].classes.push(className);
|
vertices[id].classes.push(className);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Setting class', className, id, subGraphLookup[id]);
|
|
||||||
|
|
||||||
if (typeof subGraphLookup[id] !== 'undefined') {
|
if (typeof subGraphLookup[id] !== 'undefined') {
|
||||||
subGraphLookup[id].classes.push(className);
|
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.
|
* Clears the internal graph db so that a new graph can be parsed.
|
||||||
*/
|
*/
|
||||||
export const addSubGraph = function(_id, list, _title) {
|
export const addSubGraph = function(_id, list, _title) {
|
||||||
console.log('Adding subgraph', _id);
|
|
||||||
let id = _id.trim();
|
let id = _id.trim();
|
||||||
let title = _title;
|
let title = _title;
|
||||||
if (_id === _title && _title.match(/\s/)) {
|
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: [] };
|
const subGraph = { id: id, nodes: nodeList, title: title.trim(), classes: [] };
|
||||||
subGraphs.push(subGraph);
|
subGraphs.push(subGraph);
|
||||||
subGraphLookup[id] = subGraph;
|
subGraphLookup[id] = subGraph;
|
||||||
console.log('Adding subgraph', id, subGraphs, subGraphLookup);
|
|
||||||
return id;
|
return id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -269,9 +269,6 @@ export const draw = function(text, id) {
|
||||||
logger.debug('Parsing failed');
|
logger.debug('Parsing failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Classes:', flowDb.getClasses());
|
|
||||||
console.log('Subgraphs:', flowDb.getSubGraphs());
|
|
||||||
|
|
||||||
// Fetch the default direction, use TD if none was found
|
// Fetch the default direction, use TD if none was found
|
||||||
let dir = flowDb.getDirection();
|
let dir = flowDb.getDirection();
|
||||||
if (typeof dir === 'undefined') {
|
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('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
|
||||||
te.attr('id', id + 'Text');
|
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++) {
|
for (let j = 0; j < subG.classes.length; j++) {
|
||||||
clusterEl[0].classList.add(subG.classes[j]);
|
clusterEl[0].classList.add(subG.classes[j]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ const addSection = function(id, value) {
|
||||||
if (typeof sections[id] === 'undefined') {
|
if (typeof sections[id] === 'undefined') {
|
||||||
sections[id] = value;
|
sections[id] = value;
|
||||||
logger.debug('Added new section :', id);
|
logger.debug('Added new section :', id);
|
||||||
// console.log('Added new section:', id, value)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getSections = () => sections;
|
const getSections = () => sections;
|
||||||
|
|
|
@ -533,7 +533,6 @@ const render = function(id, _txt, cb, container) {
|
||||||
// classDef
|
// classDef
|
||||||
if (graphType === 'flowchart') {
|
if (graphType === 'flowchart') {
|
||||||
const classes = flowRenderer.getClasses(txt);
|
const classes = flowRenderer.getClasses(txt);
|
||||||
console.log('classes in mermaidApi', classes);
|
|
||||||
for (const className in classes) {
|
for (const className in classes) {
|
||||||
style += `\n.${className} > * { ${classes[className].styles.join(
|
style += `\n.${className} > * { ${classes[className].styles.join(
|
||||||
' !important; '
|
' !important; '
|
||||||
|
@ -544,7 +543,6 @@ const render = function(id, _txt, cb, container) {
|
||||||
)} !important; }`;
|
)} !important; }`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(style);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const style1 = document.createElement('style');
|
const style1 = document.createElement('style');
|
||||||
|
|
Loading…
Reference in New Issue