From 1aac862470a3213a60ea51994fce011e743b79df Mon Sep 17 00:00:00 2001 From: Declan Carroll Date: Fri, 20 Mar 2026 10:00:42 +0000 Subject: [PATCH] chore(testing): fix scope-lockdown violations in page objects --- packages/testing/playwright/pages/CommunityNodesPage.ts | 4 ++++ .../testing/playwright/pages/SettingsEnvironmentPage.ts | 4 ++++ .../testing/playwright/pages/SettingsLogStreamingPage.ts | 4 ++++ packages/testing/playwright/pages/SettingsUsersPage.ts | 4 ++++ packages/testing/playwright/pages/TemplatesPage.ts | 4 ++++ packages/testing/playwright/pages/VariablesPage.ts | 4 ++++ .../testing/playwright/pages/WorkflowActivationModal.ts | 6 +++++- 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/testing/playwright/pages/CommunityNodesPage.ts b/packages/testing/playwright/pages/CommunityNodesPage.ts index 4ad5442ec508..6c1e8e48f00f 100644 --- a/packages/testing/playwright/pages/CommunityNodesPage.ts +++ b/packages/testing/playwright/pages/CommunityNodesPage.ts @@ -3,6 +3,10 @@ import type { Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class CommunityNodesPage extends BasePage { + async goto(): Promise { + await this.page.goto('/settings/community-nodes'); + } + // Element getters getCommunityCards(): Locator { return this.page.getByTestId('community-package-card'); diff --git a/packages/testing/playwright/pages/SettingsEnvironmentPage.ts b/packages/testing/playwright/pages/SettingsEnvironmentPage.ts index 58d45ea95183..b95b3f25041f 100644 --- a/packages/testing/playwright/pages/SettingsEnvironmentPage.ts +++ b/packages/testing/playwright/pages/SettingsEnvironmentPage.ts @@ -3,6 +3,10 @@ import { expect, type Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class SettingsEnvironmentPage extends BasePage { + async goto(): Promise { + await this.page.goto('/settings/environments'); + } + getConnectButton(): Locator { return this.page.getByTestId('source-control-connect-button'); } diff --git a/packages/testing/playwright/pages/SettingsLogStreamingPage.ts b/packages/testing/playwright/pages/SettingsLogStreamingPage.ts index 0c6a05bef353..e9af042f1059 100644 --- a/packages/testing/playwright/pages/SettingsLogStreamingPage.ts +++ b/packages/testing/playwright/pages/SettingsLogStreamingPage.ts @@ -3,6 +3,10 @@ import type { Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class SettingsLogStreamingPage extends BasePage { + async goto(): Promise { + await this.page.goto('/settings/log-streaming'); + } + getActionBoxUnlicensed(): Locator { return this.page.getByTestId('action-box-unlicensed'); } diff --git a/packages/testing/playwright/pages/SettingsUsersPage.ts b/packages/testing/playwright/pages/SettingsUsersPage.ts index 26243b98624b..26d41df40d57 100644 --- a/packages/testing/playwright/pages/SettingsUsersPage.ts +++ b/packages/testing/playwright/pages/SettingsUsersPage.ts @@ -3,6 +3,10 @@ import type { Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class SettingsUsersPage extends BasePage { + async goto(): Promise { + await this.page.goto('/settings/users'); + } + getSearchInput(): Locator { return this.page.getByTestId('users-list-search'); } diff --git a/packages/testing/playwright/pages/TemplatesPage.ts b/packages/testing/playwright/pages/TemplatesPage.ts index 9532eeaca912..06c892c36252 100644 --- a/packages/testing/playwright/pages/TemplatesPage.ts +++ b/packages/testing/playwright/pages/TemplatesPage.ts @@ -3,6 +3,10 @@ import type { Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class TemplatesPage extends BasePage { + async goto(): Promise { + await this.page.goto('/templates'); + } + getPageHeading(): Locator { return this.page.getByRole('heading', { name: /workflow.*templates/i }); } diff --git a/packages/testing/playwright/pages/VariablesPage.ts b/packages/testing/playwright/pages/VariablesPage.ts index 502e5c01d318..82ac18798256 100644 --- a/packages/testing/playwright/pages/VariablesPage.ts +++ b/packages/testing/playwright/pages/VariablesPage.ts @@ -4,6 +4,10 @@ import { BasePage } from './BasePage'; import { VariableModal } from './components/VariableModal'; export class VariablesPage extends BasePage { + async goto(): Promise { + await this.page.goto('/variables'); + } + readonly variableModal = new VariableModal(this.page.getByTestId('variableModal-modal')); getUnavailableResourcesList() { diff --git a/packages/testing/playwright/pages/WorkflowActivationModal.ts b/packages/testing/playwright/pages/WorkflowActivationModal.ts index 9e34d501bd6c..4c0ae7d3ac5d 100644 --- a/packages/testing/playwright/pages/WorkflowActivationModal.ts +++ b/packages/testing/playwright/pages/WorkflowActivationModal.ts @@ -3,10 +3,14 @@ import type { Locator } from '@playwright/test'; import { BasePage } from './BasePage'; export class WorkflowActivationModal extends BasePage { - getModal(): Locator { + get container(): Locator { return this.page.getByTestId('activation-modal'); } + getModal(): Locator { + return this.container; + } + getDontShowAgainCheckbox(): Locator { return this.getModal().getByText("Don't show again"); }