Skip to content

Commit

Permalink
fix: parse json after reading it
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Dec 31, 2023
1 parent 8ae8ee5 commit d8a91e9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 8 additions & 4 deletions e2e/tests/functional/planning/ganttChart.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ import {
} from '../../../helper/planningUtils.js';
import { expect, test } from '../../../pluginFixtures.js';

const testPlan1 = fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small1.json', import.meta.url)
const testPlan1 = JSON.parse(
fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small1.json', import.meta.url)
)
);
const testPlan2 = fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small2.json', import.meta.url)
const testPlan2 = JSON.parse(
fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small2.json', import.meta.url)
)
);

test.describe('Gantt Chart', () => {
Expand Down
12 changes: 8 additions & 4 deletions e2e/tests/functional/planning/plan.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ import {
} from '../../../helper/planningUtils.js';
import { test } from '../../../pluginFixtures.js';

const testPlan1 = fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small1.json', import.meta.url)
const testPlan1 = JSON.parse(
fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlan_Small1.json', import.meta.url)
)
);

const testPlanWithOrderedLanes = fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlanWithOrderedLanes.json', import.meta.url)
const testPlanWithOrderedLanes = JSON.parse(
fs.readFileSync(
new URL('../../../test-data/examplePlans/ExamplePlanWithOrderedLanes.json', import.meta.url)
)
);

test.describe('Plan', () => {
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/visual-a11y/planning.visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import { scanForA11yViolations, test } from '../../avpFixtures.js';
import { VISUAL_URL } from '../../constants.js';
import { setBoundsToSpanAllActivities, setDraftStatusForPlan } from '../../helper/planningUtils.js';

const examplePlanSmall = fs.readFileSync(
new URL('../../test-data/examplePlans/ExamplePlan_Small2.json', import.meta.url)
const examplePlanSmall = JSON.parse(
fs.readFileSync(new URL('../../test-data/examplePlans/ExamplePlan_Small2.json', import.meta.url))
);

const snapshotScope = '.l-shell__pane-main .l-pane__contents';
Expand Down

0 comments on commit d8a91e9

Please sign in to comment.