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
This commit is contained in:
Erik Sundell
2024-08-12 15:43:42 +02:00
committed by GitHub
parent b9cece8f9e
commit 2ed6ca360f
13 changed files with 162 additions and 13 deletions

View File

@@ -0,0 +1,9 @@
import { test, expect } from '@grafana/plugin-e2e';
const pluginId = 'myorg-componentconsumer-app';
const exposedComponentTestId = 'exposed-component';
test('should display component exposed by another app', async ({ page }) => {
await page.goto(`/a/${pluginId}`);
await expect(await page.getByTestId(exposedComponentTestId)).toHaveText('Hello World!');
});