Files
grafana/e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/useExposedComponent.spec.ts
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

10 lines
364 B
TypeScript

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!');
});