Files
openobserve/tests/ui-testing/pages/rumPages/rumPerformancePage.js
T
BhargavandClaude Opus 4.8 2a3416ee35 fix: Rum automation (#13064)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 10:09:16 +00:00

31 lines
1.0 KiB
JavaScript

// rumPerformancePage.js — RUM Performance summary page
import { expect } from '@playwright/test';
export class RumPerformancePage {
constructor(page) {
this.page = page;
// Locators
this.refreshButton = page.locator('[data-test="rum-performance-refresh"]');
this.summaryLoadingIndicator = page.locator(
'[data-test="performance-summary-loading-indicator"]',
);
}
async gotoPerformance() {
const base = process.env.ZO_BASE_URL || 'http://localhost:5080';
const org = process.env.ORGNAME || 'default';
await this.page.goto(`${base}/web/rum/performance?org_identifier=${org}`);
await expect(this.refreshButton).toBeVisible({ timeout: 15000 });
}
async clickRefresh() {
await this.refreshButton.click();
}
/** The loading indicator must resolve (not hang) after refresh. */
async expectSummaryLoadingResolved(timeoutMs = 30000) {
await expect(this.summaryLoadingIndicator).toBeHidden({ timeout: timeoutMs });
}
}