#1290 Hide/style today marker in gantt diagram

This commit is contained in:
Marc Faber
2020-04-05 01:59:18 +02:00
parent 9f8a0234aa
commit dcfa903176
7 changed files with 102 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Sequencediagram', () => {
describe('Gantt diagram', () => {
it('should render a gantt chart', () => {
imgSnapshotTest(
`
@@ -130,4 +130,34 @@ describe('Sequencediagram', () => {
{}
);
});
it('should hide today marker', () => {
imgSnapshotTest(
`
gantt
title Hide today marker (vertical line should not be visible)
dateFormat YYYY-MM-DD
axisFormat %d
todayMarker off
section Section1
Today: 1, -1h
`,
{}
);
});
it('should style today marker', () => {
imgSnapshotTest(
`
gantt
title Style today marker (vertical line should be 5px wide and half-transparent blue)
dateFormat YYYY-MM-DD
axisFormat %d
todayMarker stroke-width:5px,stroke:#00f,opacity:0.5
section Section1
Today: 1, -1h
`,
{}
);
});
});