From 4570f7319d76836dafe21bfde370b14853dc6493 Mon Sep 17 00:00:00 2001 From: Adam Yeats <16296989+adamyeats@users.noreply.github.com> Date: Fri, 24 Jan 2025 19:21:41 +0000 Subject: [PATCH] Add E2E smoke tests for Jaeger, PostgreSQL, Zipkin (#99515) --- e2e/plugin-e2e/jaeger/jaeger.spec.ts | 8 +++++++ e2e/plugin-e2e/postgres/postgres.spec.ts | 8 +++++++ e2e/plugin-e2e/zipkin/zipkin.spec.ts | 8 +++++++ playwright.config.ts | 27 ++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 e2e/plugin-e2e/jaeger/jaeger.spec.ts create mode 100644 e2e/plugin-e2e/postgres/postgres.spec.ts create mode 100644 e2e/plugin-e2e/zipkin/zipkin.spec.ts diff --git a/e2e/plugin-e2e/jaeger/jaeger.spec.ts b/e2e/plugin-e2e/jaeger/jaeger.spec.ts new file mode 100644 index 00000000000..c7e1bc88951 --- /dev/null +++ b/e2e/plugin-e2e/jaeger/jaeger.spec.ts @@ -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(); +}); diff --git a/e2e/plugin-e2e/postgres/postgres.spec.ts b/e2e/plugin-e2e/postgres/postgres.spec.ts new file mode 100644 index 00000000000..aafdcbee40b --- /dev/null +++ b/e2e/plugin-e2e/postgres/postgres.spec.ts @@ -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(); +}); diff --git a/e2e/plugin-e2e/zipkin/zipkin.spec.ts b/e2e/plugin-e2e/zipkin/zipkin.spec.ts new file mode 100644 index 00000000000..5a58dc656fb --- /dev/null +++ b/e2e/plugin-e2e/zipkin/zipkin.spec.ts @@ -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(); +}); diff --git a/playwright.config.ts b/playwright.config.ts index 16e635ff0b6..ff4e8ae7d10 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -160,5 +160,32 @@ export default defineConfig({ }, 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'], + }, ], });