Partner data sources smoke tests (#98446)

* Add smoke tests for remaining partner data sources

* Fix test names and run them

* Use text check for gcm
This commit is contained in:
Andreas Christou
2025-01-03 11:52:15 +00:00
committed by GitHub
parent 937e8dea2d
commit deab83a958
6 changed files with 85 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,8 @@
import { test, expect } from '@grafana/plugin-e2e';
test('Smoke test: decoupled frontend plugin loads', async ({ createDataSourceConfigPage, page }) => {
await createDataSourceConfigPage({ type: 'stackdriver' });
await expect(await page.getByText('Type: Google Cloud Monitoring', { exact: true })).toBeVisible();
await expect(await page.getByText('Google JWT File', { exact: true })).toBeVisible();
});

View File

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

View File

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

View File

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

View File

@@ -115,5 +115,50 @@ export default defineConfig<PluginOptions>({
},
dependencies: ['authenticate'],
},
{
name: 'azuremonitor',
testDir: path.join(testDirRoot, '/azuremonitor'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'cloudmonitoring',
testDir: path.join(testDirRoot, '/cloudmonitoring'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'graphite',
testDir: path.join(testDirRoot, '/graphite'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'influxdb',
testDir: path.join(testDirRoot, '/influxdb'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
{
name: 'opentsdb',
testDir: path.join(testDirRoot, '/opentsdb'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
],
});