-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mermaid-js/develop
Develop
- Loading branch information
Showing
17 changed files
with
201 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,13 +38,21 @@ jobs: | |
- 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: Upload Test Results | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
|
||
- name: Run E2E Tests | ||
run: yarn e2e | ||
env: | ||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | ||
CYPRESS_CACHE_FOLDER: .cache/Cypress | ||
|
||
- name: Post Upload Test Results | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { renderGraph } from '../../helpers/util'; | ||
/* eslint-env jest */ | ||
describe('Configuration', () => { | ||
describe('arrowMarkerAbsolute', () => { | ||
it('should handle default value false of arrowMarkerAbsolute', () => { | ||
renderGraph( | ||
`graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
`, | ||
{ } | ||
); | ||
|
||
// Check the marker-end property to make sure it is properly set to | ||
// start with # | ||
cy.get('.edgePath path').first().should('have.attr', 'marker-end') | ||
.should('exist') | ||
.and('include', 'url(#'); | ||
}); | ||
it('should handle default value false of arrowMarkerAbsolute', () => { | ||
renderGraph( | ||
`graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
`, | ||
{ } | ||
); | ||
|
||
// Check the marker-end property to make sure it is properly set to | ||
// start with # | ||
cy.get('.edgePath path').first().should('have.attr', 'marker-end') | ||
.should('exist') | ||
.and('include', 'url(#'); | ||
}); | ||
it('should handle arrowMarkerAbsolute excplicitly set to false', () => { | ||
renderGraph( | ||
`graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
`, | ||
{ | ||
arrowMarkerAbsolute: false | ||
} | ||
); | ||
|
||
// Check the marker-end property to make sure it is properly set to | ||
// start with # | ||
cy.get('.edgePath path').first().should('have.attr', 'marker-end') | ||
.should('exist') | ||
.and('include', 'url(#'); | ||
}); | ||
it('should handle arrowMarkerAbsolute excplicitly set to "false" as false', () => { | ||
renderGraph( | ||
`graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
`, | ||
{ | ||
arrowMarkerAbsolute: "false" | ||
} | ||
); | ||
|
||
// Check the marker-end property to make sure it is properly set to | ||
// start with # | ||
cy.get('.edgePath path').first().should('have.attr', 'marker-end') | ||
.should('exist') | ||
.and('include', 'url(#'); | ||
}); | ||
it('should handle arrowMarkerAbsolute set to true', () => { | ||
renderGraph( | ||
`graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
`, | ||
{ | ||
arrowMarkerAbsolute: true | ||
} | ||
); | ||
|
||
cy.get('.edgePath path').first().should('have.attr', 'marker-end') | ||
.should('exist') | ||
.and('include', 'url(http://localhost'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.