Files
grafana/e2e/custom-plugins/app-with-exposed-components
Erik Sundell 2ed6ca360f Extensions: e2e test usePluginComponent hook (#91750)
* add simple test apps that use usePluginComponent hook and exposeComponent api

* add e2e test

* update readme

* Update README.md

* fix lint issue

* pr feedback
2024-08-12 15:43:42 +02:00
..

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