From 385f7ac0da966e6a3df5cc792159fd5a716ab6bf Mon Sep 17 00:00:00 2001 From: Stan Wang Date: Mon, 18 Nov 2024 11:04:40 -0800 Subject: [PATCH] Revert "Revert "fix: comments and test"" This reverts commit b48d853ed2f48ff0cf52f635967a26ec1c740e57. --- src/components/Text/Text.stories.tsx | 14 +- src/components/Text/Text.unit.test.tsx.snap | 3035 ++++++++++++++++--- 2 files changed, 2643 insertions(+), 406 deletions(-) diff --git a/src/components/Text/Text.stories.tsx b/src/components/Text/Text.stories.tsx index 0c3fbc06f..a0b4293e6 100644 --- a/src/components/Text/Text.stories.tsx +++ b/src/components/Text/Text.stories.tsx @@ -59,12 +59,16 @@ NewMomentumDesignTypes.parameters = { ], }; -const TypesWithTagName = MultiTemplate(Text).bind({}); +const TypesWithTagNameSmall = MultiTemplate(Text).bind({}); -TypesWithTagName.argTypes = { ...argTypes }; -delete TypesWithTagName.argTypes.type; +TypesWithTagNameSmall.argTypes = { ...argTypes }; +delete TypesWithTagNameSmall.argTypes.type; +TypesWithTagNameSmall.argTypes.tagName = { + ...argTypes.tagName, + control: false, +}; -TypesWithTagName.parameters = { +TypesWithTagNameSmall.parameters = { variants: [ ...Object.values(TYPES).map((type) => { return { @@ -77,4 +81,4 @@ TypesWithTagName.parameters = { }; -export { Example, Types, NewMomentumDesignTypes, TypesWithTagName }; +export { Example, Types, NewMomentumDesignTypes, TypesWithTagNameSmall }; diff --git a/src/components/Text/Text.unit.test.tsx.snap b/src/components/Text/Text.unit.test.tsx.snap index d48623317..ddd725ec4 100644 --- a/src/components/Text/Text.unit.test.tsx.snap +++ b/src/components/Text/Text.unit.test.tsx.snap @@ -173,269 +173,206 @@ exports[`Text should match snapshot with type 1`] = ` > Example Text - - -`; - -exports[`Text should match snapshot with type and tagName override 1`] = ` -
-
- - Example Text - - - Example Text - - - Example Text - - - Example Text - - - Example Text - - - Example Text - Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 2`] = ` -
-
Example Text Example Text Example Text Example Text Example Text - Example Text - - Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text @@ -443,265 +380,335 @@ exports[`Text should match snapshot with type and tagName override 2`] = `
`; -exports[`Text should match snapshot with type and tagName override 3`] = ` +exports[`Text should match snapshot with type and tagName override 1`] = `
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 4`] = ` -
-
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + Example Text @@ -709,398 +716,2687 @@ exports[`Text should match snapshot with type and tagName override 4`] = `
`; -exports[`Text should match snapshot with type and tagName override 5`] = ` +exports[`Text should match snapshot with type and tagName override 2`] = `
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 6`] = ` -
-
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text + Example Text + + + Example Text + + + Example Text + + + Example Text + + Example Text + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 3`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 4`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 5`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 6`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 7`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 8`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + +
+
+`; + +exports[`Text should match snapshot with type and tagName override 9`] = ` +
+
+ + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + + Example Text + + Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 7`] = ` -
-
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text @@ -1108,398 +3404,335 @@ exports[`Text should match snapshot with type and tagName override 7`] = `
`; -exports[`Text should match snapshot with type and tagName override 8`] = ` +exports[`Text should match snapshot with type and tagName override 10`] = `
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 9`] = ` -
-
- - Example Text - - - Example Text - - - Example Text - - - Example Text - - - Example Text - - - Example Text - Example Text Example Text Example Text Example Text Example Text - Example Text - - Example Text Example Text Example Text Example Text Example Text Example Text -
-
-`; - -exports[`Text should match snapshot with type and tagName override 10`] = ` -
-
Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text Example Text