mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 05:19:58 +02:00
Added e2e tests and snapshot files
This commit is contained in:
29
e2e/spec/gitGraph.spec.js
Normal file
29
e2e/spec/gitGraph.spec.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/* eslint-env jest */
|
||||
import { imgSnapshotTest } from '../helpers/util.js'
|
||||
const { toMatchImageSnapshot } = require('jest-image-snapshot')
|
||||
|
||||
expect.extend({ toMatchImageSnapshot })
|
||||
|
||||
describe('Sequencediagram', () => {
|
||||
it('should render a simple git graph', async () => {
|
||||
await imgSnapshotTest(page, `
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
"nodeSpacing": 150,
|
||||
"nodeRadius": 10
|
||||
}
|
||||
end
|
||||
commit
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
commit
|
||||
commit
|
||||
checkout master
|
||||
commit
|
||||
commit
|
||||
merge newbranch
|
||||
`,
|
||||
{})
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user