Skip to content

Commit

Permalink
Merge branch 'develop' into bug/1078_handling_of_arrowMarkerAbsolute
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Nov 20, 2019
2 parents cbd2783 + ffddd58 commit f79fc21
Show file tree
Hide file tree
Showing 6 changed files with 917 additions and 615 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,50 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Yarn
run: npm i yarn --global

- name: Cache Node Modules
uses: actions/cache@v1
with:
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

- name: Run Unit Tests
run: |
yarn test --coverage
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
env:
COVERALLS_SERVICE_NAME: ${{ secrets.COVERALLS_SERVICE_NAME }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Run E2E Tests
run: yarn e2e
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
CYPRESS_CACHE_FOLDER: .cache/Cypress
22 changes: 22 additions & 0 deletions docs/flowchart.md
Expand Up @@ -123,6 +123,28 @@ graph LR
id1{{This is the text in the box}}
```

### Parallelogram

```
graph TD
id1[/This is the text in the box/]
```
```mermaid
graph TD
id1[/This is the text in the box/]
```

### Parallelogram alt

```
graph TD
id1[\This is the text in the box\]
```
```mermaid
graph TD
id1[\This is the text in the box\]
```

### Trapezoid

```
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -24,7 +24,7 @@
"e2e": "start-server-and-test dev http://localhost:9000/ cypress",
"e2e-upd": "yarn lint && jest e2e -u --config e2e/jest.config.js",
"dev": "webpack-dev-server --config webpack.config.e2e.js",
"test": "yarn lint && jest src",
"test": "yarn lint && jest src/.*",
"test:watch": "jest --watch src",
"prepublishOnly": "yarn build && yarn release && yarn test && yarn e2e",
"prepush": "yarn test"
Expand Down Expand Up @@ -77,10 +77,10 @@
"cypress": "3.4.0",
"husky": "^1.2.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^23.6.0",
"jest-environment-puppeteer": "^4.2.0",
"jest-image-snapshot": "^2.8.2",
"jest-puppeteer": "^4.2.0",
"jest": "^24.9.0",
"jest-environment-puppeteer": "^4.3.0",
"jest-image-snapshot": "^2.11.1",
"jest-puppeteer": "^4.3.0",
"jison": "^0.4.18",
"moment": "^2.23.0",
"node-sass": "^4.12.0",
Expand Down
6 changes: 3 additions & 3 deletions src/diagrams/flowchart/parser/flow-singlenode.spec.js
Expand Up @@ -168,7 +168,7 @@ describe('[Singlenodes] when parsing', () => {
const edges = flow.parser.yy.getEdges();

expect(edges.length).toBe(0);
expect(vert['mermaid-dom-id-1'].text).toBe('1');
expect(vert['1'].text).toBe('1');
});

it('should handle a single node with a single digit in a subgraph', function() {
Expand All @@ -180,7 +180,7 @@ describe('[Singlenodes] when parsing', () => {
const edges = flow.parser.yy.getEdges();

expect(edges.length).toBe(0);
expect(vert['mermaid-dom-id-1'].text).toBe('1');
expect(vert['1'].text).toBe('1');
});

it('should handle a single node with alphanumerics starting on a num', function() {
Expand All @@ -191,7 +191,7 @@ describe('[Singlenodes] when parsing', () => {
const edges = flow.parser.yy.getEdges();

expect(edges.length).toBe(0);
expect(vert['mermaid-dom-id-1id'].styles.length).toBe(0);
expect(vert['1id'].styles.length).toBe(0);
});

it('should handle a single node with alphanumerics containing a minus sign', function() {
Expand Down
2 changes: 1 addition & 1 deletion src/diagrams/flowchart/parser/subgraph.spec.js
Expand Up @@ -83,7 +83,7 @@ describe('when parsing subgraphs', function() {
const subgraph = subgraphs[0];
expect(subgraph.nodes.length).toBe(1);
expect(subgraph.nodes[0]).toBe('A');
expect(subgraph.id).toBe('mermaid-dom-id-1test');
expect(subgraph.id).toBe('1test');
});

it('should handle subgraphs1', function() {
Expand Down

0 comments on commit f79fc21

Please sign in to comment.