mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins Catalog: show Grafana and plugin dependencies (#39062)
* fix(@grafana/data): add a missing optional field to the plugin types * refactor(Plugins/ADmin): use the type from @grafana/data for plugin dependencies * fix(Datasources/Graphite): add missing `state` to useEffect dependencies * refactor(Plugins/Admin): remove unnecessary comment * feat(Plugins/Admin): add plugin and grafana dependencies to the CatalogPluginDetails * feat(Plugins/ADmin): show Grafana dependency under plugin details * feat(Plugins/Admin): show grafana and plugin dependencies for a plugin * test(Plugins/Admin): add a smoke test for plugin dependencies * refactor(Plugins/Admin): remove unused style from the header
This commit is contained in:
@@ -197,6 +197,15 @@ describe('Plugin details page', () => {
|
||||
await waitFor(() => expect(queryByRole('link', { name: /update via grafana.com/i })).toBeInTheDocument());
|
||||
expect(queryByRole('link', { name: /uninstall via grafana.com/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should display grafana dependencies for a plugin if they are available', async () => {
|
||||
const { queryByText } = setup('not-installed');
|
||||
|
||||
// Wait for the dependencies part to be loaded
|
||||
await waitFor(() => expect(queryByText(/dependencies:/i)).toBeInTheDocument());
|
||||
|
||||
expect(queryByText('Grafana >=7.3.0')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
function remotePlugin(plugin: Partial<RemotePlugin> = {}): RemotePlugin {
|
||||
@@ -237,6 +246,7 @@ function remotePlugin(plugin: Partial<RemotePlugin> = {}): RemotePlugin {
|
||||
dependencies: {
|
||||
grafanaDependency: '>=7.3.0',
|
||||
grafanaVersion: '7.3',
|
||||
plugins: [],
|
||||
},
|
||||
info: {
|
||||
links: [],
|
||||
|
||||
Reference in New Issue
Block a user