From 89c1853977de72bb37ee8b714eabd623a65f4116 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 21 Feb 2020 09:50:04 +0100 Subject: [PATCH 1/3] #1261 Removed calls to console.log --- src/diagrams/flowchart/flowDb.js | 5 ----- src/diagrams/flowchart/flowRenderer.js | 4 ---- src/diagrams/pie/pieDb.js | 1 - src/mermaidAPI.js | 2 -- 4 files changed, 12 deletions(-) diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index b0c926696..404fdfceb 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -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; }; diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index 924e8dd03..8b1a95046 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -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]); } diff --git a/src/diagrams/pie/pieDb.js b/src/diagrams/pie/pieDb.js index d4572b547..047e24e40 100644 --- a/src/diagrams/pie/pieDb.js +++ b/src/diagrams/pie/pieDb.js @@ -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; diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index 6f4170cb4..205254540 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -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'); From 348d086c118b7ab116e62b9ac14dbafb5afdb165 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 21 Feb 2020 10:00:36 +0100 Subject: [PATCH 2/3] #1261 Tmp reversal of build.yml to get make release possible --- .github/workflows/build.yml | 50 +++++++++++++------------------------ 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5d74a5cc..463da0efe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file From 50c71ebb01d188232d9c09cadbcef2125104cc1f Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 21 Feb 2020 10:08:52 +0100 Subject: [PATCH 3/3] #1261 Removal of emojis making rendering tests give false warnings from time to time --- cypress/integration/rendering/gantt.spec.js | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index 531b5aae5..c3614ec19 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -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 `, {} );