From c94468339c0a1ebcaabbaa7dc07eb4a244cdc7a8 Mon Sep 17 00:00:00 2001 From: Nathan Marrs Date: Mon, 21 Oct 2024 14:13:22 -0600 Subject: [PATCH] CloudWatch: Add playwright smoke test (#95087) add smoke test to cloudwatch --- e2e/plugin-e2e/cloudwatch/cloudwatch.spec.ts | 8 ++++++++ playwright.config.ts | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 e2e/plugin-e2e/cloudwatch/cloudwatch.spec.ts diff --git a/e2e/plugin-e2e/cloudwatch/cloudwatch.spec.ts b/e2e/plugin-e2e/cloudwatch/cloudwatch.spec.ts new file mode 100644 index 00000000000..e834252208d --- /dev/null +++ b/e2e/plugin-e2e/cloudwatch/cloudwatch.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: 'cloudwatch' }); + + await expect(await page.getByText('Type: CloudWatch', { exact: true })).toBeVisible(); + await expect(await page.getByRole('heading', { name: 'Connection Details', exact: true })).toBeVisible(); +}); diff --git a/playwright.config.ts b/playwright.config.ts index 6d0858b4f2d..78bce46b583 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -88,5 +88,14 @@ export default defineConfig({ }, dependencies: ['authenticate'], }, + { + name: 'cloudwatch', + testDir: path.join(testDirRoot, '/cloudwatch'), + use: { + ...devices['Desktop Chrome'], + storageState: 'playwright/.auth/admin.json', + }, + dependencies: ['authenticate'], + }, ], });