From 593ab4559debafb75d2dc86e6e11456d6db5c848 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Mon, 21 Oct 2024 11:36:18 +0200 Subject: [PATCH] MSSQL: Add playwright smoke test (#94977) test(mssql-datasource): add smoke test to assert decoupled plugin assets are built and load --- e2e/plugin-e2e/mssql/mssql.spec.ts | 8 ++++++++ playwright.config.ts | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 e2e/plugin-e2e/mssql/mssql.spec.ts diff --git a/e2e/plugin-e2e/mssql/mssql.spec.ts b/e2e/plugin-e2e/mssql/mssql.spec.ts new file mode 100644 index 00000000000..125024935ea --- /dev/null +++ b/e2e/plugin-e2e/mssql/mssql.spec.ts @@ -0,0 +1,8 @@ +import { test, expect } from '@grafana/plugin-e2e'; + +test('Smoke test: decoupled frontend plugin loads', async ({ createDataSourceConfigPage, page }) => { + await createDataSourceConfigPage({ type: 'mssql' }); + + await expect(await page.getByText('Type: Microsoft SQL Server', { 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 3dc0984aef1..6d0858b4f2d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -70,6 +70,15 @@ export default defineConfig({ }, dependencies: ['authenticate'], }, + { + name: 'mssql', + testDir: path.join(testDirRoot, '/mssql'), + use: { + ...devices['Desktop Chrome'], + storageState: 'playwright/.auth/admin.json', + }, + dependencies: ['authenticate'], + }, { name: 'extensions-test-app', testDir: 'e2e/test-plugins/grafana-extensionstest-app',