grafana/e2e/test-plugins/grafana-extensionstest-app
Erik Sundell db0cc24f2b
Plugin extensions: Introduce new registry for added links (#92343)
* add added component registry

* fix broken test

* add tests for usePluginComponents hook

* readd expose components

* add type assertion exceptions to betterer results

* use new addedComponent registry in legacy endpoints

* remove unused code

* cleanup

* revert test code

* remove commented code

* initial commit

* refactor sync method and hook

* fix tests

* subscribe to the correct registry

* remove old registry

* cleanup types

* add use usePluginLinks hook

* add more tests

* fix import order

* fix typo

* fix and temporarly skip failing tests

* wip

* add hook tests

* add more tests

* remove old hook

* fix versioning

* add version to all extension point ids

* remove cleanup

* remove unused imports

* revert touched file

* fix test

* test: remove hook creation

* catch init error

* send error to faro

* fix broken hook

* comment out call hook initialization

* use the right import ofr isString

* remove unused import

* remove registryState type

* pr feedback

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* remove no longer relevant comment

* fix broken tests

* Fixed test to verify that the memotization works properly.

* simplify hooks

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2024-08-30 10:09:01 +02:00
..
components Plugin Extensions: E2E test addLink and legacy APIs (#92394) 2024-08-26 16:01:32 +02:00
img E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
pages Plugin extensions: Introduce new registry for added links (#92343) 2024-08-30 10:09:01 +02:00
plugins Plugin extensions: Introduce new registry for added links (#92343) 2024-08-30 10:09:01 +02:00
tests Plugin extensions: Introduce new registry for added links (#92343) 2024-08-30 10:09:01 +02:00
utils E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
.gitignore E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
CHANGELOG.md E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
constants.ts Plugin Extensions: E2E test addLink and legacy APIs (#92394) 2024-08-26 16:01:32 +02:00
module.tsx E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
package.json E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
plugin.json Plugin Extensions: E2E test addLink and legacy APIs (#92394) 2024-08-26 16:01:32 +02:00
README.md Plugin Extensions: E2E test addLink and legacy APIs (#92394) 2024-08-26 16:01:32 +02:00
testIds.ts Plugin extensions: Introduce new registry for added links (#92343) 2024-08-30 10:09:01 +02:00
tsconfig.json E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00
webpack.config.ts E2E: Add support for building test plugins (#91873) 2024-08-23 09:00:03 +02:00

Extensions test plugins

This is an app plugin containing nested app plugins that are used for testing the plugins ui extensions APIs.

Further reading:

Build

To build this plugin run yarn e2e:plugin:build.

Development

1: Install frontend dependencies: yarn install --immutable

2: Build and watch the core frontend yarn start

3: Build and watch the test plugins yarn e2e:plugin:build:dev

4: Build the backend make build-go

5: Start the Grafana e2e test server with the provisioned test plugin PORT=3000 ./scripts/grafana-server/start-server

Note that this plugin extends the @grafana/plugin-configs configs which is why it has no src directory and uses a custom webpack config to copy necessary files.

Run Playwright tests

  • yarn playwright --project extensions-test-app