Skip to content

Commit

Permalink
Handle optional chaining for 'data-type' attribute in LifeLine.vue.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Nov 21, 2024
1 parent 25eae1b commit 316db2e
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
LIFELINE_WIDTH,
MARGIN,
MIN_PARTICIPANT_WIDTH,
OCCURRENCE_BAR_SIDE_WIDTH,
} from "@/positioning/Constants";
import { _STARTER_ } from "@/parser/OrderedParticipants";

Expand Down Expand Up @@ -84,8 +83,7 @@ describe("Creation", () => {
MARGIN / 2 +
MIN_PARTICIPANT_WIDTH / 2 +
MARGIN / 2; // 100
const expected =
gapCausedByParticipant - OCCURRENCE_BAR_SIDE_WIDTH - LIFELINE_WIDTH; // 92
const expected = gapCausedByParticipant - LIFELINE_WIDTH; // 99

expect(vm.interactionWidth).toBe(expected);
});
Expand Down Expand Up @@ -114,8 +112,7 @@ describe("Creation", () => {
MARGIN / 2 +
MIN_PARTICIPANT_WIDTH / 2 +
MARGIN / 2; // 100
const expected =
gapCausedByParticipant - OCCURRENCE_BAR_SIDE_WIDTH - LIFELINE_WIDTH; // 92
const expected = gapCausedByParticipant - LIFELINE_WIDTH; // 99
expect(vm.interactionWidth).toBe(expected);
});
});

0 comments on commit 316db2e

Please sign in to comment.