Files
grafana/e2e/test-plugins/grafana-extensionstest-app/tests/utils.ts
T
Erik SundellandTimur Olzhabayev 1373b37166 Plugin Extensions: E2E test addLink and legacy APIs (#92394)
* cleanup tests

* more cleanup

* added links

* test legacy hooks

* test legacy hooks

* update codeowners

* revert package changes

* add project specfic example script

* remove console log

* Update .github/CODEOWNERS

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* Update CODEOWNERS

* use correct file names

* cleanup tests

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2024-08-26 16:01:32 +02:00

11 lines
491 B
TypeScript

import { Page } from '@playwright/test';
import { selectors } from '@grafana/e2e-selectors';
export async function ensureExtensionRegistryIsPopulated(page: Page) {
// Due to these plugins using the old getter extensions api we need to force a refresh by navigating home then back
// to guarantee the extensions are available to the plugin before we interact with the page.
await page.getByTestId(selectors.components.Breadcrumbs.breadcrumb('Home')).click();
await page.goBack();
}