Add E2E smoke tests for Jaeger, PostgreSQL, Zipkin (#99515)

This commit is contained in:
Adam Yeats 2025-01-24 19:21:41 +00:00 committed by GitHub
parent 92d6762a3a
commit 4570f7319d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import { test, expect } from '@grafana/plugin-e2e';
test('Smoke test: plugin loads', async ({ createDataSourceConfigPage, page }) => {
await createDataSourceConfigPage({ type: 'jaeger' });
await expect(await page.getByText('Type: Jaeger', { exact: true })).toBeVisible();
await expect(await page.getByRole('heading', { name: 'Connection', exact: true })).toBeVisible();
});

View File

@ -0,0 +1,8 @@
import { test, expect } from '@grafana/plugin-e2e';
test('Smoke test: plugin loads', async ({ createDataSourceConfigPage, page }) => {
await createDataSourceConfigPage({ type: 'grafana-postgresql-datasource' });
await expect(await page.getByText('Type: PostgreSQL', { exact: true })).toBeVisible();
await expect(await page.getByRole('heading', { name: 'Connection', exact: true })).toBeVisible();
});

View File

@ -0,0 +1,8 @@
import { test, expect } from '@grafana/plugin-e2e';
test('Smoke test: plugin loads', async ({ createDataSourceConfigPage, page }) => {
await createDataSourceConfigPage({ type: 'zipkin' });
await expect(await page.getByText('Type: Zipkin', { exact: true })).toBeVisible();
await expect(await page.getByRole('heading', { name: 'Connection', exact: true })).toBeVisible();
});

View File

@ -160,5 +160,32 @@ export default defineConfig<PluginOptions>({
},
dependencies: ['authenticate'],
},
{
name: 'jaeger',
testDir: path.join(testDirRoot, '/jaeger'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'grafana-postgresql-datasource',
testDir: path.join(testDirRoot, '/grafana-postgresql-datasource'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'zipkin',
testDir: path.join(testDirRoot, '/zipkin'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
],
});