Skip to content

Commit 7c0ebd3

Browse files
committed
Fixed unit test.
1 parent 1dfa1fe commit 7c0ebd3

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/components/DiagramFrame/SeqDiagram/MessageLayer/Block/Statement/Creation/Creation.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe("Creation", () => {
3434
expect(vm.from).toBe("_STARTER_");
3535
expect(vm.signature).toBe("«create»");
3636
expect(vm.assignee).toBe("a");
37-
expect(vm.distance).toStrictEqual(expect.any(Function));
38-
expect(vm.interactionWidth).toBe(84);
37+
expect(vm.distance2).toStrictEqual(expect.any(Function));
38+
expect(vm.interactionWidth).toBe(83);
3939
expect(vm.rightToLeft).toBeFalsy();
4040
});
4141

@@ -47,7 +47,7 @@ describe("Creation", () => {
4747
const vm = creationWrapper.vm as any;
4848
console.log(creationWrapper);
4949
expect(vm.rightToLeft).toBeTruthy();
50-
expect(vm.interactionWidth).toBe(120);
50+
expect(vm.interactionWidth).toBe(119);
5151
});
5252

5353
it("right to left within alt fragment", async () => {
@@ -65,6 +65,6 @@ describe("Creation", () => {
6565
);
6666
const vm = creationWrapper.vm as any;
6767
expect(vm.rightToLeft).toBeTruthy();
68-
expect(vm.interactionWidth).toBe(120);
68+
expect(vm.interactionWidth).toBe(119);
6969
});
7070
});

src/components/DiagramFrame/SeqDiagram/MessageLayer/Block/Statement/Interaction/Interaction.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ describe("Highlight current interact based on position of cursor", () => {
3939
describe("Interaction width", () => {
4040
test.each([
4141
// A --- ?px ---> B
42-
[1, 10, 25, 14],
43-
[1, 25, 10, 16],
42+
[1, 10, 25, 13],
43+
[1, 25, 10, 15],
4444
])(
4545
"If selfCallIndent is %s and distance is %s, interactionWidth should be %s",
4646
(selfCallIndent, a, b, width) => {

src/components/DiagramFrame/SeqDiagram/MessageLayer/MessageLayer.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import parentLogger from "../../../../logger/logger";
1414
const StylePanel = defineAsyncComponent(() => import("./StylePanel.vue"));
1515
1616
const logger = parentLogger.child({ name: "MessageLayer" });
17-
17+
// @typescript-eslint/no-unused-vars for `context`
18+
// eslint-disable-next-line
19+
const props = defineProps<{
20+
context: any;
21+
}>();
1822
const store = useStore();
1923
2024
const participants = computed(() => store.getters.participants);

0 commit comments

Comments
 (0)