Skip to content

Commit

Permalink
chore: fix customization tests (#3612)
Browse files Browse the repository at this point in the history
* chore: fix test

* chore: fix bad story
  • Loading branch information
nkrantz authored Nov 15, 2023
1 parent cd6c11c commit 949df9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changeset/curvy-eels-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/customization": patch
"@twilio-paste/core": patch
---

[Customization] Minor change to customization tests to reflect updated prop change from 'variant' to 'variants' on CustomizationProvider.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ describe("CustomizationProvider", () => {
render(
<CustomizationProvider
baseTheme="default"
elements={{ CARD: { backgroundColor: "colorBackground", variant: { padded: { padding: "space20" } } } }}
elements={{ CARD: { backgroundColor: "colorBackground", variants: { padded: { padding: "space20" } } } }}
>
<ThemeConsumerElementsExample />
</CustomizationProvider>,
);
expect(screen.getByTestId("elements-test").textContent).toEqual(
'Elements: {"CARD":{"backgroundColor":"colorBackground","variant":{"padded":{"padding":"space20"}}}}',
'Elements: {"CARD":{"backgroundColor":"colorBackground","variants":{"padded":{"padding":"space20"}}}}',
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export const Provider: StoryFn = (_args, { parameters: { isTestEnvironment } })
fonts: { fontFamilyText: "cursive" },
}}
elements={{
CARD: {
BUTTON: {
backgroundColor: "colorBackground",
variant: {
primary: {
backgroundColor: "colorBackgroundBody",
variants: {
destructive: {
backgroundColor: "colorBackgroundAvailable",
},
},
},
Expand Down

0 comments on commit 949df9e

Please sign in to comment.