Open justintemps opened 2 months ago
@justintemps Small question here :- 1. Can we use the default preview values for some components that do not have things features like additional variants or as a practice do we have to always pass the values using json.
http://localhost:8081/pattern-preview?id=button&fields=%7b%0a%22label%22%3a%20%22Button%22%2c%0a%22type%22%3a%20%22primary%22%2c%0a%22kind%22%3a%20%22button%22%2c%0a%22size%22%3a%20%22medium%22%0a%7d
Expand tests to check functionality of components. Eg :- Action events.
Where available use the variant endpoint to render and test out key features of variants as well.
CC :- @justintemps @GGKapanadze @bashlk
@Shashika6 IMO it is better to explicitly pass the values to each components so that the behavior being tested is fixed.
But it should be alright even if you rely on the defaults. If they change, the tests should fail 😉.
Also @Shashika6 , I think it would be good if you create a cypress command that takes the props and constructs the page URL - instead of having it hardcoded in the tests.
Thats the plan @bashlk :')
this ticket is a stub for expanding tests in the Twig package. Right now, they're mostly just checking to see if the component renders, but now we should add tests for variants and edge cases.
@Shashika6 our first job here is to expand this ticket and determine a reasonable scope for another round of adding tickets. Please embelish this ticket with a scope describing what level of additional tests you think we should add and which components those tests should be applied to.