Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,24 @@ import { expect, type Page, type Locator } from '@playwright/test';
export class KubernetesEAFlowPage {
page: Page;

private readonly receivedDataIndicatorKubernetes: Locator;
private readonly kubernetesAgentExploreDataActionLink: Locator;
private readonly codeBlock: Locator;
private readonly copyToClipboardButton: Locator;
private readonly logsDataReceivedIndicator: Locator;
private readonly exploreLogsButton: Locator;

constructor(page: Page) {
this.page = page;

this.receivedDataIndicatorKubernetes = this.page
.getByTestId('observabilityOnboardingKubernetesPanelDataProgressIndicator')
.getByText('We are monitoring your cluster');
this.kubernetesAgentExploreDataActionLink = this.page.getByTestId(
'observabilityOnboardingDataIngestStatusActionLink-kubernetes-f4dc26db-1b53-4ea2-a78b-1bfab8ea267c'
);
this.codeBlock = this.page.getByTestId('observabilityOnboardingKubernetesPanelCodeSnippet');
this.copyToClipboardButton = this.page.getByTestId(
'observabilityOnboardingCopyToClipboardButton'
);
this.logsDataReceivedIndicator = this.page
.getByTestId('observabilityOnboardingKubernetesPanelDataProgressIndicator')
.getByText('We are monitoring your cluster');

this.exploreLogsButton = this.page.getByText('Explore logs');
this.exploreLogsButton = this.page.getByTestId(
'observabilityOnboardingDataIngestStatusActionLink-logs'
);
}

public async assertVisibilityCodeBlock() {
Expand All @@ -47,15 +40,8 @@ export class KubernetesEAFlowPage {

public async assertReceivedDataIndicatorKubernetes() {
await expect(
this.receivedDataIndicatorKubernetes,
'Received data indicator should be visible'
).toBeVisible();
}

public async assertLogsDataReceivedIndicator() {
await expect(
this.logsDataReceivedIndicator,
'Logs data received indicator should be visible'
this.exploreLogsButton,
'Explore logs action link should be visible after data is detected'
).toBeVisible();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export class OtelHostFlowPage {

private readonly exploreLogsButton: Locator;
private readonly exploreMetricsButton: Locator;
private readonly dataReceivedIndicator: Locator;

constructor(page: Page) {
this.page = page;
Expand All @@ -23,9 +22,6 @@ export class OtelHostFlowPage {
this.exploreMetricsButton = this.page.getByTestId(
'observabilityOnboardingDataIngestStatusActionLink-metrics'
);
this.dataReceivedIndicator = this.page
.getByTestId('observabilityOnboardingOtelHostDataProgressIndicator')
.getByText('We are monitoring your host');
}

public async selectPlatform(osName: string) {
Expand Down Expand Up @@ -66,12 +62,8 @@ export class OtelHostFlowPage {

public async assertDataReceivedIndicator(): Promise<void> {
await expect(
this.dataReceivedIndicator,
'Data received indicator should be visible'
).toBeVisible({ timeout: 5 * 60_000 });
}

public async assertLogsExplorationButtonVisible() {
await expect(this.exploreLogsButton, 'Logs exploration button should be visible').toBeVisible();
this.exploreLogsButton,
'Explore logs action link should be visible after data is detected'
).toBeVisible();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ export class OtelKubernetesFlowPage {
context: BrowserContext;

private readonly exploreLogsButton: Locator;
private readonly dataReceivedIndicator: Locator;

constructor(page: Page, context: BrowserContext) {
this.page = page;
this.context = context;

this.exploreLogsButton = this.page.getByText('Explore logs');
this.dataReceivedIndicator = this.page
.getByTestId('observabilityOnboardingKubernetesPanelDataProgressIndicator')
.getByText('We are monitoring your cluster');
this.exploreLogsButton = this.page.getByTestId(
'observabilityOnboardingDataIngestStatusActionLink-logs'
);
}

public async copyHelmRepositorySnippetToClipboard() {
Expand Down Expand Up @@ -88,13 +86,9 @@ export class OtelKubernetesFlowPage {

public async assertDataReceivedIndicator(): Promise<void> {
await expect(
this.dataReceivedIndicator,
'Data received indicator should be visible'
).toBeVisible({ timeout: 5 * 60_000 });
}

public async assertLogsExplorationButtonVisible() {
await expect(this.exploreLogsButton, 'Logs exploration button should be visible').toBeVisible();
this.exploreLogsButton,
'Explore logs action link should be visible after data is detected'
).toBeVisible();
}

public async clickExploreLogsCTA() {
Expand Down
Loading