Created
October 12, 2020 17:55
-
-
Save acmiyaguchi/084f52020fe557697ca6d1f78f6f028c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From a2d8c5fd36fd654dc7d7c324c93a6706fd7b66d0 Mon Sep 17 00:00:00 2001 | |
| From: Anthony Miyaguchi <amiyaguchi@mozilla.com> | |
| Date: Mon, 12 Oct 2020 10:53:19 -0700 | |
| Subject: [PATCH] Add storybook test for nested search (with css fix from #74 | |
| @linh) | |
| --- | |
| .storybook/story.css | 1 + | |
| stories/schemaviewer.stories.js | 46 +++++++++++++++++++++++++++++++++ | |
| 2 files changed, 47 insertions(+) | |
| diff --git a/.storybook/story.css b/.storybook/story.css | |
| index e69de29..b4dd3ad 100644 | |
| --- a/.storybook/story.css | |
| +++ b/.storybook/story.css | |
| @@ -0,0 +1 @@ | |
| +@import "../public/build/bundle.css"; | |
| diff --git a/stories/schemaviewer.stories.js b/stories/schemaviewer.stories.js | |
| index 9f4d433..a24103c 100644 | |
| --- a/stories/schemaviewer.stories.js | |
| +++ b/stories/schemaviewer.stories.js | |
| @@ -37,6 +37,44 @@ const nodes = [ | |
| }, | |
| ]; | |
| +const nested_nodes = [ | |
| + { | |
| + name: "a", | |
| + mode: "NULLABLE", | |
| + type: "RECORD", | |
| + fields: [ | |
| + { | |
| + name: "b", | |
| + mode: "NULLABLE", | |
| + type: "RECORD", | |
| + fields: [ | |
| + { | |
| + mode: "NULLABLE", | |
| + name: "c", | |
| + type: "STRING", | |
| + }, | |
| + { | |
| + name: "d", | |
| + mode: "NULLABLE", | |
| + fields: [ | |
| + { | |
| + mode: "NULLABLE", | |
| + name: "e", | |
| + type: "STRING", | |
| + }, | |
| + ], | |
| + }, | |
| + ], | |
| + }, | |
| + { | |
| + mode: "NULLABLE", | |
| + name: "e", | |
| + type: "STRING", | |
| + }, | |
| + ], | |
| + }, | |
| +]; | |
| + | |
| export default { | |
| title: "Schema Viewer", | |
| }; | |
| @@ -48,3 +86,11 @@ export const Basic = () => ({ | |
| nodes, | |
| }, | |
| }); | |
| + | |
| +export const Nested = () => ({ | |
| + Component: SchemaViewer, | |
| + props: { | |
| + app: "fenix", | |
| + nodes: nested_nodes, | |
| + }, | |
| +}); | |
| -- | |
| 2.24.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment