π Parameters
Sherlo Parametersβ
Each story can have a set of parameters that customize the test setup
Parameter | Type | Default | Description |
---|---|---|---|
platform | <Platform.OS> | undefined | Test the story only on a specific platform |
exclude | <boolean> | false | Skip the story during testing |
Button.stories.js
export default {
component: Button,
parameters: {
sherlo: {
platform: "android", // Specify the testing platform
exclude: false // Set to true to exclude the story from testing
},
},
};
Platformβ
Setting platform
parameter to either "android"
or "ios"
tests the story only on that specific platform
Excludeβ
Setting exclude
to true
skips the story during testing
tip
Before excluding stories, consider using the isRunningVisualTests
to control rendering behavior
Figmaβ
You can integrate π¨ Figma with Sherlo to see designs side-by-side with screenshots
Add the design
parameter with type "figma"
:
Button.stories.js
export default {
component: Button,
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/..." // Your Figma design URL
},
},
};