mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 16:10:43 +00:00
## Summary - The AI integrations regression test (`datasources-regression.spec.js`) was using `.first()` to select the first integration in the sidebar, but manifest-backed rich-content cards placed at the top of each category render `AIRichSetupCard` or `AIIntegrationCard` — neither contains the `[data-test="rum-content-text"]` element that the test expects. - Fix: navigate directly to the "agno" child route and click the agno-specific tab (`[data-test="ai-integrations-item-agno"]`). Agno is a known stub integration without rich content that always uses the `CopyContent` fallback. ## Test plan - [ ] CI Playwright run: `Data Sources Regression Bug Fixes` suite passes on chromium --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
81 lines
3.5 KiB
JavaScript
81 lines
3.5 KiB
JavaScript
/**
|
|
* Data Sources Regression Bug Tests
|
|
*
|
|
* Bug fixes for Data Sources page functionality:
|
|
* - #11682: On clicking on AI integration the credentials disappear
|
|
*/
|
|
|
|
const { test, expect, navigateToBase } = require('../../utils/enhanced-baseFixtures.js');
|
|
const testLogger = require('../../utils/test-logger.js');
|
|
const PageManager = require('../../../pages/page-manager.js');
|
|
|
|
test.describe("Data Sources Regression Bug Fixes", () => {
|
|
test.describe.configure({ mode: 'parallel' });
|
|
let pm;
|
|
|
|
test.beforeEach(async ({ page }, testInfo) => {
|
|
testLogger.testStart(testInfo.title, testInfo.file);
|
|
await navigateToBase(page);
|
|
pm = new PageManager(page);
|
|
await page.waitForLoadState('networkidle', { timeout: 10000 });
|
|
testLogger.info('Data sources regression test setup completed');
|
|
});
|
|
|
|
// ==========================================================================
|
|
// Bug #11682: On clicking on AI integration the credentials disappear
|
|
// https://github.com/openobserve/openobserve/issues/11682
|
|
// ==========================================================================
|
|
test("AI integration content should persist when integration is re-clicked", {
|
|
tag: ['@bug-11682', '@P1', '@regression', '@datasourcesRegression']
|
|
}, async ({ page }) => {
|
|
testLogger.info('Test: Verify AI integration content persists on re-click (Bug #11682)');
|
|
|
|
// Navigate to Data Sources → AI Integrations.
|
|
// The empty child redirect auto-selects the first integration so the detail
|
|
// pane is already populated — no click needed for the initial render.
|
|
await pm.dataPage.navigateToAIIntegrations(process.env.ZO_BASE_URL, process.env.ORGNAME);
|
|
testLogger.info('Navigated to AI Integrations');
|
|
|
|
// Click the first available AI integration item to view its detail
|
|
await pm.dataPage.clickFirstAIIntegration();
|
|
testLogger.info('Clicked first AI integration item');
|
|
|
|
// Verify detail content rendered (any of the three rendering paths:
|
|
// AIRichSetupCard, AIIntegrationCard, or the legacy CopyContent fallback).
|
|
// The "Select an integration" placeholder must NOT be visible, and the
|
|
// detail pane must contain text.
|
|
await expect(pm.dataPage.aiIntegrationPlaceholder,
|
|
'Bug #11682: placeholder should not show after clicking an integration'
|
|
).not.toBeVisible({ timeout: 5000 });
|
|
|
|
const contentBefore = (await pm.dataPage.aiIntegrationDetailPane.textContent())?.trim() || '';
|
|
testLogger.info(`Detail content length before re-click: ${contentBefore.length}`);
|
|
|
|
expect(contentBefore.length,
|
|
'Bug #11682: AI Integration detail should show content on first click'
|
|
).toBeGreaterThan(0);
|
|
|
|
// Re-click the same integration — this was the bug trigger (#11682)
|
|
await pm.dataPage.aiIntegrationFirstItem.click();
|
|
await page.waitForTimeout(1500);
|
|
|
|
// Verify content is still present after re-click (not blank)
|
|
await expect(pm.dataPage.aiIntegrationPlaceholder,
|
|
'Bug #11682: placeholder should not show after re-click'
|
|
).not.toBeVisible({ timeout: 5000 });
|
|
|
|
const contentAfter = (await pm.dataPage.aiIntegrationDetailPane.textContent())?.trim() || '';
|
|
testLogger.info(`Detail content length after re-click: ${contentAfter.length}`);
|
|
|
|
expect(contentAfter.length,
|
|
'Bug #11682: AI Integration content should not disappear when re-clicking'
|
|
).toBeGreaterThan(0);
|
|
|
|
testLogger.info('PASSED: AI Integration content persists on re-click');
|
|
});
|
|
|
|
test.afterEach(async () => {
|
|
testLogger.info('Data sources regression test completed');
|
|
});
|
|
});
|