Skip to content

Commit a29112e

Browse files
committed
Add multiple models to MethodModeling story
1 parent ee1bf88 commit a29112e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

extensions/ql-vscode/src/stories/method-modeling/MethodModeling.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Meta, StoryFn } from "@storybook/react";
44

55
import { MethodModeling as MethodModelingComponent } from "../../view/method-modeling/MethodModeling";
66
import { createMethod } from "../../../test/factories/model-editor/method-factories";
7+
import { createModeledMethod } from "../../../test/factories/model-editor/modeled-method-factories";
78
export default {
89
title: "Method Modeling/Method Modeling",
910
component: MethodModelingComponent,
@@ -35,3 +36,20 @@ MethodSaved.args = {
3536
modeledMethods: [],
3637
modelingStatus: "saved",
3738
};
39+
40+
export const MultipleModelings = Template.bind({});
41+
MultipleModelings.args = {
42+
method,
43+
modeledMethods: [
44+
createModeledMethod(method),
45+
createModeledMethod({
46+
...method,
47+
type: "source",
48+
input: "",
49+
output: "ReturnValue",
50+
kind: "remote",
51+
}),
52+
],
53+
showMultipleModels: true,
54+
modelingStatus: "saved",
55+
};

extensions/ql-vscode/test/factories/model-editor/modeled-method-factories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function createModeledMethod(
1313
type: "sink",
1414
input: "Argument[0]",
1515
output: "",
16-
kind: "jndi-injection",
16+
kind: "path-injection",
1717
provenance: "manual",
1818
...data,
1919
};

0 commit comments

Comments
 (0)