2ed6ca360f
* add simple test apps that use usePluginComponent hook and exposeComponent api * add e2e test * update readme * Update README.md * fix lint issue * pr feedback
App with exposed components
This directory contains two apps - myorg-componentconsumer-app and myorg-componentexposer-app which is nested inside myorg-componentconsumer-app.
myorg-componentconsumer-app exposes a simple React component using the exposeComponent api. myorg-componentconsumer-app in turn, consumes this compoment using the https://grafana.com/developers/plugin-tools/reference/ui-extensions#useplugincomponent hook.
To test this app:
# start e2e test instance (it will install this plugin)
PORT=3000 ./scripts/grafana-server/start-server
# run Playwright tests using Playwright VSCode extension or with the following script
yarn e2e:playwright
or
PORT=3000 ./scripts/grafana-server/start-server
yarn start
yarn e2e