Skip to content

Commit 1373b37

Browse files
sunkertolzhabayev
andauthored
Plugin Extensions: E2E test addLink and legacy APIs (grafana#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 <[email protected]> * Update CODEOWNERS * use correct file names * cleanup tests --------- Co-authored-by: Timur Olzhabayev <[email protected]>
1 parent a2de893 commit 1373b37

35 files changed

+421
-389
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@
319319
/e2e/ @grafana/grafana-frontend-platform
320320
/e2e/cloud-plugins-suite/ @grafana/partner-datasources
321321
/e2e/plugin-e2e/plugin-e2e-api-tests/ @grafana/plugins-platform-frontend
322+
/e2e/test-plugins/grafana-extensionstest-app/ @grafana/plugins-platform-frontend
322323

323324
# Packages
324325
/packages/ @grafana/grafana-frontend-platform @grafana/plugins-platform-frontend

e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/extensionPoints.spec.ts

Lines changed: 0 additions & 51 deletions
This file was deleted.

e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/extensions.spec.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/useExposedComponent.spec.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/usePluginComponents.spec.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

e2e/test-plugins/grafana-extensionstest-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ Note that this plugin extends the `@grafana/plugin-configs` configs which is why
3232

3333
## Run Playwright tests
3434

35-
- `yarn e2e:playwright`
35+
- `yarn playwright --project extensions-test-app`

e2e/test-plugins/grafana-extensionstest-app/components/ActionButton/ActionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PluginExtension, PluginExtensionLink, SelectableValue, locationUtil } from '@grafana/data';
22
import { isPluginExtensionLink, locationService } from '@grafana/runtime';
33
import { Button, ButtonGroup, ButtonSelect, Modal, Stack, ToolbarButton } from '@grafana/ui';
4-
import { testIds } from '../testIds';
4+
import { testIds } from '../../testIds';
55

66
import { ReactElement, useMemo, useState } from 'react';
77

e2e/test-plugins/grafana-extensionstest-app/components/App/App.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
import { Route, Routes } from 'react-router-dom';
2+
23
import { AppRootProps } from '@grafana/data';
4+
35
import { ROUTES } from '../../constants';
4-
import { AddedComponents, ExposedComponents, LegacyAPIs } from '../../pages';
5-
import { testIds } from '../testIds';
6+
import { AddedComponents, AddedLinks, ExposedComponents, LegacyGetters, LegacyHooks } from '../../pages';
7+
import { testIds } from '../../testIds';
68

79
export function App(props: AppRootProps) {
810
return (
911
<div data-testid={testIds.container} style={{ marginTop: '5%' }}>
1012
<Routes>
11-
<Route path={ROUTES.LegacyAPIs} element={<LegacyAPIs />} />
13+
<Route path={ROUTES.LegacyGetters} element={<LegacyGetters />} />
14+
<Route path={ROUTES.LegacyHooks} element={<LegacyHooks />} />
1215
<Route path={ROUTES.ExposedComponents} element={<ExposedComponents />} />
1316
<Route path={ROUTES.AddedComponents} element={<AddedComponents />} />
17+
<Route path={ROUTES.AddedLinks} element={<AddedLinks />} />
1418

15-
<Route path={'*'} element={<LegacyAPIs />} />
19+
<Route path={'*'} element={<LegacyGetters />} />
1620
</Routes>
1721
</div>
1822
);

e2e/test-plugins/grafana-extensionstest-app/components/AppConfig/AppConfig.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

e2e/test-plugins/grafana-extensionstest-app/components/AppConfig/index.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)