Skip to content
Snippets Groups Projects
Unverified Commit 22944e11 authored by Denis Berezin's avatar Denis Berezin Committed by GitHub
Browse files

feat(sdk): Add storybook docs for embedding SDK e2e tests debug (#46496)

parent 5ed7d786
Branches
Tags
No related merge requests found
......@@ -173,6 +173,14 @@ Cypress._.times(N, ()=> {
});
```
### Embedding SDK tests
Tests located in `e2e/test/scenarios/embedding-sdk` are used to run automated checks for the Embedding SDK.
Embedding SDK is a library, and not an application. We use Storybook to host public components, and we run tests against it.
In order to run stories used for tests locally, please check [storybook setup docs](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk/README.md#storybook)
## DB Snapshots
At the beginning of each test suite we wipe the backend's db and settings cache. This ensures that the test suite starts in a predictable state.
......
......@@ -86,7 +86,7 @@ java -jar metabase.jar
You can then use the API key to authenticate with Metabase in your application. Here's an example of how you can
authenticate with the API key:
```
```
const metabaseConfig = {
...
apiKey: "YOUR_API_KEY"
......@@ -1011,6 +1011,22 @@ disclosure [here](https://github.com/metabase/metabase/blob/master/SECURITY.md#r
# Development
## Storybook
You can use storybook to run SDK components during local development.
When you have Metabase instance running:
```bash
yarn storybook-embedding-sdk
```
### Initial configuration
1. Set JWT secret to be "`0000000000000000000000000000000000000000000000000000000000000000`" in Admin > Authentication > JWT > String used by the JWT signing key
1. Make sure "User Provisioning" setting is set to "`on`".
1. Set Authorized Origins to "`*`" in Admin > Embedding > Interactive embedding
## Building locally
First you need to build the Metabase Embedding SDK for React locally:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment