Closed justintemps closed 4 months ago
I'm gonna provide a test module that will be enabled by default in the Docker container, this module will expose a page that, given the pattern ID and fields, will render it.
For example, the following URL will generate the following pattern:
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
This is now ready to be reviewed at the linked PR. A useful tool to encode JSON for manual testing can be found here https://onlinetools.com/json/url-encode-json#tool
Create a module that accepts GET requests with a properly encoded JSON in the query string so that cypress can run tests against the components with different settings passed in.