Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Recover the commercial-funnel E2E batch against current surfaces

rcourtmana40886ff3a90
diff --git a/tests/integration/playwright.config.ts b/tests/integration/playwright.config.ts
index 252dcde671..0d8bda6e02 100644
--- a/tests/integration/playwright.config.ts
+++ b/tests/integration/playwright.config.ts
@@ -26,18 +26,10 @@ const QUARANTINED_SPECS = [
'**/49-demo-scenario-curation.spec.ts',
'**/51-quickstart-cross-surface.spec.ts',
'**/52-ai-settings-provider-setup.spec.ts',
- '**/53-demo-mode-commercial-boundary.spec.ts',
- '**/54-monitored-system-billing-focus.spec.ts',
- '**/55-self-hosted-upgrade-return.spec.ts',
- '**/56-pulse-account-upgrade-bootstrap.spec.ts',
'**/57-release-candidate-shell.spec.ts',
- '**/58-self-hosted-trial-rate-limit-ui.spec.ts',
- '**/59-self-hosted-plans-entitlement-summary.spec.ts',
'**/60-page-header-consistency.spec.ts',
- '**/61-diagnostics-commercial-funnel.spec.ts',
'**/62-runtime-home-onboarding-contract.spec.ts',
'**/63-pbs-active-tasks.spec.ts',
- '**/70-self-hosted-manual-activation-success.spec.ts',
'**/75-settings-infrastructure-fleet-status-coherence.spec.ts',
'**/77-msp-isolation.spec.ts',
'**/79-update-flow.spec.ts',
diff --git a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
index 0573bbd877..3a59049a35 100644
--- a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
+++ b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
@@ -145,6 +145,7 @@ async function probeDemoCommercialBoundaryFromBrowser(
vmwareDraftPreview: await probe('/api/vmware/connections/preview', postEmptyJSON),
vmwareSavedPreview: await probe('/api/vmware/connections/conn-1/preview', postEmptyJSON),
checkoutStart: await probe('/auth/license-purchase-start'),
+ trialActivate: await probe('/api/license/trial/activate', postEmptyJSON),
};
});
}
@@ -305,7 +306,9 @@ base.describe('Demo mode commercial boundary', () => {
await page.goto('/settings/system/billing/usage?details=counting-rules', {
waitUntil: 'domcontentloaded',
});
- await page.waitForURL('**/settings/infrastructure/install', { timeout: 15_000 });
+ // The demo shell now redirects hidden billing routes to the settings
+ // infrastructure root (the /install sub-route was retired).
+ await page.waitForURL('**/settings/infrastructure', { timeout: 15_000 });
await expect
.poll(() => runtimeCapabilitiesRequests, {
@@ -392,6 +395,7 @@ base.describe('Demo mode commercial boundary', () => {
await hiddenNotFound('**/api/license/clear');
// Demo mode must keep the retired trial-start route closed.
await hiddenNotFound('**/api/license/trial/start');
+ await hiddenNotFound('**/api/license/trial/activate');
await hiddenNotFound('**/api/license/monitored-system-ledger**');
await hiddenNotFound('**/api/admin/orgs/**/billing-state');
await hiddenNotFound('**/api/upgrade-metrics/**');
@@ -401,7 +405,7 @@ base.describe('Demo mode commercial boundary', () => {
await hiddenNotFound('**/api/vmware/connections/*/preview');
await hiddenNotFound('**/auth/license-purchase-start**');
- await page.goto('/settings/infrastructure/install', { waitUntil: 'domcontentloaded' });
+ await page.goto('/settings/infrastructure', { waitUntil: 'domcontentloaded' });
const responses = await probeDemoCommercialBoundaryFromBrowser(page);
expectPublicDemoRuntimeCapabilities(responses.runtimeCapabilities);
@@ -430,7 +434,7 @@ base.describe('Managed demo runtime commercial boundary', () => {
await page.goto('/settings/system/billing/usage?details=counting-rules', {
waitUntil: 'domcontentloaded',
});
- await page.waitForURL('**/settings/infrastructure/install', { timeout: 15_000 });
+ await page.waitForURL('**/settings/infrastructure', { timeout: 15_000 });
await expect(
page.getByText('Demo instance with mock data (read-only)', { exact: true }),
diff --git a/tests/integration/tests/58-self-hosted-trial-rate-limit-ui.spec.ts b/tests/integration/tests/58-self-hosted-trial-rate-limit-ui.spec.ts
index 84444aca96..01f04da78d 100644
--- a/tests/integration/tests/58-self-hosted-trial-rate-limit-ui.spec.ts
+++ b/tests/integration/tests/58-self-hosted-trial-rate-limit-ui.spec.ts
@@ -88,7 +88,10 @@ test.describe.serial('Self-hosted paid prompt visibility', () => {
await expect(page.getByRole('heading', { level: 1, name: 'Roles' })).toBeVisible();
await expect(page.getByText('Custom Roles (Pro)')).toHaveCount(0);
- await expect(page.getByRole('button', { name: 'Remote Access' })).toHaveCount(0);
+ // Remote Access stays in the nav without the relay feature on purpose:
+ // the panel renders its own upgrade gate, and hiding the item made Relay
+ // undiscoverable for free installs (settingsNavCatalog system-relay).
+ await expect(page.getByRole('button', { name: 'Remote Access' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Roles' })).toHaveCount(0);
await expect(page.getByRole('button', { name: 'Users' })).toHaveCount(0);
await expect(page.getByRole('button', { name: 'Audit Log' })).toHaveCount(0);
diff --git a/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts b/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
index 216ef5dc7b..7b38da077a 100644
--- a/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
+++ b/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
@@ -1,5 +1,7 @@
import { expect, test, type Page } from '@playwright/test';
+import { ensureAuthenticated } from './helpers';
+
const PRO_RUNTIME_IDENTITY = {
build: 'pro',
label: 'Pulse Pro runtime',
@@ -110,56 +112,6 @@ const PRO_PLAN_COMMUNITY_RUNTIME_CAPABILITIES = {
],
};
-async function stubAuthenticatedShell(page: Page) {
- await page.route('**/api/security/status', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({
- hasAuthentication: true,
- hideLocalLogin: false,
- ssoProviders: [],
- sessionCapabilities: {},
- settingsCapabilities: {
- apiAccessRead: true,
- apiAccessWrite: true,
- authenticationRead: true,
- authenticationWrite: true,
- singleSignOnRead: true,
- singleSignOnWrite: true,
- roles: true,
- users: true,
- auditLog: true,
- auditWebhooksRead: true,
- auditWebhooksWrite: true,
- relayRead: true,
- relayWrite: true,
- billingAdmin: true,
- },
- }),
- });
- });
-
- await page.route('**/api/state', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({ ok: true }),
- });
- });
-
- await page.route('**/api/system/settings', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({
- theme: 'system',
- fullWidthMode: false,
- }),
- });
- });
-}
-
async function stubSelfHostedPlanEndpoints(
page: Page,
payloads: {
@@ -168,7 +120,10 @@ async function stubSelfHostedPlanEndpoints(
runtimeCapabilities?: Record<string, unknown>;
} = {},
) {
- await stubAuthenticatedShell(page);
+ // The app shell makes auth-gated calls beyond the old stub set, so a
+ // stubbed session renders the login page; sign in for real and stub only
+ // the license surface under test.
+ await ensureAuthenticated(page);
const runtimeCapabilities = payloads.runtimeCapabilities ?? PRO_PLAN_RUNTIME_CAPABILITIES;
const entitlements = payloads.entitlements ?? PRO_PLAN_ENTITLEMENTS;
@@ -206,56 +161,54 @@ test.describe('Self-hosted plans entitlement summary', () => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop-only plans coverage');
await stubSelfHostedPlanEndpoints(page);
+ // The legacy system billing route must still land on the canonical
+ // Pulse Intelligence billing route.
await page.goto('/settings/system/billing/plan', { waitUntil: 'domcontentloaded' });
+ await page.waitForURL('**/settings/pulse-intelligence/billing/plan', { timeout: 30_000 });
await expect(
page.locator('[aria-label="Settings navigation"]').getByText('Plans', { exact: true }),
).toHaveCount(0);
- await expect(page.getByRole('heading', { name: 'Self-hosted plan' }).first()).toBeVisible();
- const currentPlanCard = page
- .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
- .filter({ has: page.getByText('Current plan: Pulse Pro') })
- .first();
-
- await expect(currentPlanCard.getByText('Current plan: Pulse Pro')).toBeVisible();
- await expect(
- currentPlanCard.getByText(
- 'Pulse Pro is active on this instance. Patrol control, alert investigation, verified fixes, 90-day history, and admin/reporting extras are available right now.',
- ),
- ).toBeVisible();
- await expect(currentPlanCard.getByText('Grandfathered price')).toBeVisible();
- await expect(currentPlanCard.getByText('Grandfathered floor')).toHaveCount(0);
+ await expect(page.getByRole('heading', { name: 'Plans & Billing' }).first()).toBeVisible({
+ timeout: 30_000,
+ });
+ await expect(page.getByRole('heading', { name: 'Current plan' })).toBeVisible();
+
+ // The plan panel renders once per page, so the copy assertions anchor at
+ // page scope; the old card container classes are private layout detail.
+ await expect(page.getByText('Current plan: Pulse Pro')).toBeVisible();
+ await expect(page.getByText(/^Pulse Pro is active on this instance\./)).toBeVisible();
+ await expect(page.getByText('Grandfathered price')).toBeVisible();
+ await expect(page.getByText('Grandfathered floor')).toHaveCount(0);
await expect(
- currentPlanCard.getByText(/keeps its existing recurring price until cancellation/i),
+ page.getByText(/keeps its existing recurring price until cancellation/i),
).toBeVisible();
await expect(
- currentPlanCard.getByText(
- /self-hosted monitoring and child-resource volume are not metered/i,
- ),
+ page.getByText(/self-hosted monitoring and child-resource volume are not metered/i).first(),
).toBeVisible();
const recurringContinuityNotice = page.getByText(
/This migrated v5 Pro subscription keeps its existing recurring price until you cancel/i,
);
- await expect(recurringContinuityNotice).toBeVisible();
- await expect(recurringContinuityNotice).toContainText(
+ await expect(recurringContinuityNotice.first()).toBeVisible();
+ await expect(recurringContinuityNotice.first()).toContainText(
/Self-hosted monitoring and child-resource volume are not metered/i,
);
- await expect(currentPlanCard.getByText(/effective monitored-system limit/i)).toHaveCount(0);
+ await expect(page.getByText(/effective monitored-system limit/i)).toHaveCount(0);
await expect(page.getByText('Core Monitoring', { exact: true })).toBeVisible();
await expect(page.getByText('Guest Capacity', { exact: true })).toHaveCount(0);
await expect(page.getByText('Unlimited self-hosted monitoring')).toHaveCount(0);
await expect(page.getByText('Included', { exact: true }).first()).toBeVisible();
- await expect(currentPlanCard.getByText('Primary capabilities')).toBeVisible();
- await expect(currentPlanCard.getByText('Included extras')).toBeVisible();
+ await expect(page.getByText('Primary capabilities')).toBeVisible();
+ await expect(page.getByText('Included extras', { exact: true })).toBeVisible();
await expect(
- currentPlanCard.getByText('Patrol Fixes Safe Issues', { exact: true }),
+ page.getByText('Patrol Applies Safe Fixes and Verifies the Result', { exact: true }),
).toBeVisible();
await expect(
- currentPlanCard.getByText('Patrol Investigates Alerts', { exact: true }),
+ page.getByText('Patrol Investigates Issues and Explains the Root Cause', { exact: true }),
).toBeVisible();
- await expect(currentPlanCard.getByText('PDF/CSV Reporting', { exact: true })).toBeVisible();
+ await expect(page.getByText('PDF/CSV Reporting', { exact: true })).toBeVisible();
await expect(
- currentPlanCard.getByText('Centralized Agent Profiles', { exact: true }),
+ page.getByText('Centralized Agent Profiles', { exact: true }),
).toBeVisible();
});
@@ -277,17 +230,13 @@ test.describe('Self-hosted plans entitlement summary', () => {
});
await page.goto('/settings/system/billing/plan', { waitUntil: 'domcontentloaded' });
- const currentPlanCard = page
- .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
- .filter({ has: page.getByText('Current plan: Pulse Pro') })
- .first();
-
- await expect(currentPlanCard.getByText('Pro runtime missing')).toBeVisible();
+ await expect(page.getByText('Current plan: Pulse Pro')).toBeVisible({ timeout: 30_000 });
+ await expect(page.getByText('Pro runtime missing').first()).toBeVisible();
await expect(
- currentPlanCard.getByText(/not reporting the private Pulse Pro runtime/i),
+ page.getByText(/not reporting (the private|a) Pulse Pro runtime/i).first(),
).toBeVisible();
await expect(
- currentPlanCard.getByRole('link', { name: 'Open Pulse Pro downloads' }),
+ page.getByRole('link', { name: 'Open Pulse Pro downloads' }).first(),
).toHaveAttribute('href', 'https://pulserelay.pro/download.html');
});
@@ -310,28 +259,18 @@ test.describe('Self-hosted plans entitlement summary', () => {
waitUntil: 'domcontentloaded',
});
- const currentPlanCard = page
- .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
- .filter({ has: page.getByText('Current plan: Pulse Pro') })
- .first();
-
+ await expect(page.getByText('Current plan: Pulse Pro')).toBeVisible({ timeout: 30_000 });
+ await expect(page.getByText('Pro runtime missing').first()).toBeVisible();
await expect(
- currentPlanCard.getByText('Pro runtime missing'),
+ page.getByText(/running the community runtime/i).first(),
).toBeVisible();
await expect(
- currentPlanCard.getByText(/running the community runtime/i),
+ page.getByText(/public GitHub releases and the public Docker image/i).first(),
).toBeVisible();
await expect(
- currentPlanCard.getByText(
- /public GitHub releases and the public Docker image/i,
- ),
- ).toBeVisible();
- await expect(
- currentPlanCard.getByRole('link', { name: 'Open Pulse Pro downloads' }),
+ page.getByRole('link', { name: 'Open Pulse Pro downloads' }).first(),
).toHaveAttribute('href', 'https://pulserelay.pro/download.html');
- await expect(currentPlanCard.getByText(/upgrade your plan/i)).toHaveCount(
- 0,
- );
+ await expect(page.getByText(/upgrade your plan/i)).toHaveCount(0);
});
test('surfaces advertised Pro settings sections when Pro capabilities are active', async ({
@@ -343,6 +282,7 @@ test.describe('Self-hosted plans entitlement summary', () => {
await page.goto('/settings/system/billing/plan', { waitUntil: 'domcontentloaded' });
const settingsNav = page.locator('[aria-label="Settings navigation"]');
+ await expect(settingsNav).toBeVisible({ timeout: 30_000 });
for (const label of [
'Data & Reports',
'Roles',
diff --git a/tests/integration/tests/61-diagnostics-commercial-funnel.spec.ts b/tests/integration/tests/61-diagnostics-commercial-funnel.spec.ts
index 4e22bc4b62..aa5763a793 100644
--- a/tests/integration/tests/61-diagnostics-commercial-funnel.spec.ts
+++ b/tests/integration/tests/61-diagnostics-commercial-funnel.spec.ts
@@ -1,5 +1,7 @@
import { expect, test } from "@playwright/test";
+import { ensureAuthenticated } from "./helpers";
+
const COMMERCIAL_DIAGNOSTICS_PAYLOAD = {
version: "6.0.0",
runtime: "go",
@@ -153,51 +155,18 @@ const COMMERCIAL_DIAGNOSTICS_PAYLOAD = {
errors: [],
};
-test("renders the commercial funnel diagnostics card in the browser", async ({
+// The Commercial Funnel diagnostics card was deliberately removed from the
+// user-facing diagnostics page (c6bcad255, "Remove internal analytics from
+// diagnostics"); the UI strips commercialFunnel and infrastructureOnboarding
+// from the payload before rendering. This spec pins that boundary: even when
+// the API serves funnel analytics, none of it may render in the browser.
+test("keeps internal commercial-funnel analytics out of the diagnostics page", async ({
page,
}, testInfo) => {
- await page.addInitScript(() => {
- sessionStorage.setItem(
- "pulse_auth",
- JSON.stringify({
- type: "token",
- value: "playwright-token",
- }),
- );
- sessionStorage.setItem("pulse_auth_user", "admin");
- });
-
- await page.route("**/api/security/status", async (route) => {
- await route.fulfill({
- status: 200,
- contentType: "application/json",
- body: JSON.stringify({
- hasAuthentication: true,
- hideLocalLogin: false,
- ssoProviders: [],
- sessionCapabilities: {},
- }),
- });
- });
-
- await page.route("**/api/state", async (route) => {
- await route.fulfill({
- status: 200,
- contentType: "application/json",
- body: JSON.stringify({ ok: true }),
- });
- });
-
- await page.route("**/api/system/settings", async (route) => {
- await route.fulfill({
- status: 200,
- contentType: "application/json",
- body: JSON.stringify({
- theme: "system",
- fullWidthMode: false,
- }),
- });
- });
+ // The app shell makes auth-gated calls beyond the old stub set, so a
+ // stubbed session renders the login page; sign in for real and stub only
+ // the license and diagnostics surfaces under test.
+ await ensureAuthenticated(page);
for (const path of [
"**/api/license/runtime-capabilities",
@@ -236,22 +205,31 @@ test("renders the commercial funnel diagnostics card in the browser", async ({
});
});
- await page.goto("/operations/diagnostics", { waitUntil: "domcontentloaded" });
+ // Diagnostics moved from the retired /operations shell onto the settings
+ // support group.
+ await page.goto("/settings/support/diagnostics", { waitUntil: "domcontentloaded" });
const runDiagnosticsButton = page
.locator("button")
.filter({ hasText: /^Run Diagnostics$/ })
.first();
- await expect(runDiagnosticsButton).toBeVisible();
+ await expect(runDiagnosticsButton).toBeVisible({ timeout: 30_000 });
await runDiagnosticsButton.click();
- await expect(page.getByText("Commercial Funnel", { exact: true })).toBeVisible();
- await expect(page.getByText("Self Hosted Plan", { exact: true })).toBeVisible();
+ // The stubbed payload rendered: the metrics-store card proves the run
+ // completed and the response was consumed.
+ await expect(page.getByText("Metrics Store", { exact: false }).first()).toBeVisible({
+ timeout: 30_000,
+ });
+
+ // None of the internal funnel analytics may surface.
+ await expect(page.getByText("Commercial Funnel", { exact: true })).toHaveCount(0);
+ await expect(page.getByText("Self Hosted Plan", { exact: true })).toHaveCount(0);
await expect(
page.getByText("Settings Self Hosted Billing Compare Prompt", { exact: true }),
- ).toBeVisible();
- await expect(page.getByText(/Pricing 4/i).first()).toBeVisible();
+ ).toHaveCount(0);
+ await expect(page.getByText(/pricing_viewed/i)).toHaveCount(0);
const screenshotPath = testInfo.outputPath("diagnostics-commercial-funnel.png");
await page.screenshot({ path: screenshotPath, fullPage: true });
diff --git a/tests/integration/tests/70-self-hosted-manual-activation-success.spec.ts b/tests/integration/tests/70-self-hosted-manual-activation-success.spec.ts
index 2c55154cf2..291f2edd4d 100644
--- a/tests/integration/tests/70-self-hosted-manual-activation-success.spec.ts
+++ b/tests/integration/tests/70-self-hosted-manual-activation-success.spec.ts
@@ -1,5 +1,7 @@
import { expect, test, type Page } from '@playwright/test';
+import { ensureAuthenticated } from './helpers';
+
const PRO_RUNTIME_IDENTITY = {
build: 'pro',
label: 'Pulse Pro runtime',
@@ -93,56 +95,6 @@ type ManualActivationRequestCounts = {
activate: number;
};
-async function stubAuthenticatedShell(page: Page) {
- await page.route('**/api/security/status', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({
- hasAuthentication: true,
- hideLocalLogin: false,
- ssoProviders: [],
- sessionCapabilities: {},
- settingsCapabilities: {
- apiAccessRead: true,
- apiAccessWrite: true,
- authenticationRead: true,
- authenticationWrite: true,
- singleSignOnRead: true,
- singleSignOnWrite: true,
- roles: true,
- users: true,
- auditLog: true,
- auditWebhooksRead: true,
- auditWebhooksWrite: true,
- relayRead: true,
- relayWrite: true,
- billingAdmin: true,
- },
- }),
- });
- });
-
- await page.route('**/api/state', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({ ok: true }),
- });
- });
-
- await page.route('**/api/system/settings', async (route) => {
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({
- theme: 'system',
- fullWidthMode: false,
- }),
- });
- });
-}
-
async function stubManualActivationEndpoints(page: Page) {
let activated = false;
const requestCounts: ManualActivationRequestCounts = {
@@ -211,64 +163,51 @@ test.describe('Self-hosted manual activation success', () => {
}, testInfo) => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop-only plans coverage');
- await stubAuthenticatedShell(page);
+ // The app shell makes auth-gated calls beyond the old stub set, so a
+ // stubbed session renders the login page; sign in for real and stub only
+ // the license surface under test.
+ await ensureAuthenticated(page);
const requestCounts = await stubManualActivationEndpoints(page);
await page.goto('/settings/system/billing/plan', { waitUntil: 'domcontentloaded' });
- const communityPlanCard = page
- .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
- .filter({ has: page.getByText('Current plan: Community') })
- .first();
-
- await expect(communityPlanCard.getByText('Current plan: Community')).toBeVisible();
- await expect(communityPlanCard.getByText('Community', { exact: true })).toBeVisible();
- await expect(communityPlanCard.getByText('Expired', { exact: true })).toHaveCount(0);
- await expect(
- communityPlanCard.getByText(
- 'Community is active on this instance. It includes self-hosted monitoring, 7-day metric history, Pulse Patrol (BYOK), update alerts, and SSO.',
- ),
- ).toBeVisible();
+ // The plan panel renders once per page, so copy assertions anchor at page
+ // scope; the old card container classes were private layout detail.
+ await expect(page.getByText('Current plan: Community')).toBeVisible({ timeout: 30_000 });
+ await expect(page.getByText('Community', { exact: true }).first()).toBeVisible();
+ await expect(page.getByText('Expired', { exact: true })).toHaveCount(0);
+ await expect(page.getByText(/^Community is active on this instance\./)).toBeVisible();
await expect(page.getByText('Optional extras')).toHaveCount(0);
await expect(page.getByText('What Relay adds')).toHaveCount(0);
await expect(page.getByText('What Pulse Pro adds')).toHaveCount(0);
await expect(page.getByRole('link', { name: 'Compare plans' })).toHaveCount(0);
- await page.locator('summary').filter({ hasText: 'Use existing key' }).first().click();
+ await page.locator('summary').filter({ hasText: 'Manual key recovery' }).first().click();
const activationField = page.locator('#pulse-pro-license-key');
await expect(activationField).toBeVisible();
await activationField.fill('ppk_live_test_activation_key');
- await page.getByRole('button', { name: 'Activate Key' }).click();
-
- const activationSummary = page
- .locator('div.rounded-md.border.p-3.text-sm')
- .filter({ has: page.getByText('Pulse Pro is now active', { exact: true }) })
- .first();
+ await page.getByRole('button', { name: 'Apply key' }).click();
- await expect(activationSummary.getByText('Pulse Pro is now active', { exact: true })).toBeVisible();
+ await expect(page.getByText('Pulse Pro is now active', { exact: true })).toBeVisible();
+ // With Patrol control available the summary body leads with the accepted
+ // key and pivots to choosing a Patrol mode.
+ await expect(
+ page.getByText(/^The license key was accepted and Pulse Pro is active/).first(),
+ ).toBeVisible();
+ await expect(page.getByText('Available now on this instance')).toBeVisible();
await expect(
- activationSummary.getByText(
- 'The activation key was accepted and this instance is now running Pulse Pro.',
- ),
+ page.getByText('Patrol Applies Safe Fixes and Verifies the Result').first(),
+ ).toBeVisible();
+ await expect(
+ page.getByText('Patrol Investigates Issues and Explains the Root Cause').first(),
).toBeVisible();
- await expect(activationSummary.getByText('Available now on this instance')).toBeVisible();
- await expect(activationSummary.getByText('Patrol Fixes Safe Issues')).toBeVisible();
- await expect(activationSummary.getByText('Patrol Investigates Alerts')).toBeVisible();
await expect.poll(() => requestCounts.activate).toBe(1);
await expect.poll(() => requestCounts.active.entitlements).toBeGreaterThan(0);
await expect.poll(() => requestCounts.active.runtimeCapabilities).toBeGreaterThan(0);
await expect.poll(() => requestCounts.active.commercialPosture).toBeGreaterThan(0);
await expect(page.getByText('Current plan: Pulse Pro')).toBeVisible();
- const currentPlanCard = page
- .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
- .filter({ has: page.getByText('Current plan: Pulse Pro') })
- .first();
- await expect(
- currentPlanCard.getByText(
- 'Pulse Pro is active on this instance. Patrol control, alert investigation, verified fixes, 90-day history, and admin/reporting extras are available right now.',
- ),
- ).toBeVisible();
- await expect(currentPlanCard.getByText('Included extras')).toBeVisible();
+ await expect(page.getByText(/^Pulse Pro is active on this instance\./)).toBeVisible();
+ await expect(page.getByText('Included extras', { exact: true })).toBeVisible();
await expect(page.getByText('Optional extras')).toHaveCount(0);
});
});