@iblai/iblai-js 2.43.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-layer/playwright/edit-agent-category-helpers.d.ts +13 -0
- package/dist/data-layer/playwright/human-support-tab-helpers.d.ts +2 -2
- package/dist/data-layer/playwright/privacy-tab-helpers.d.ts +7 -4
- package/dist/data-layer/playwright/spend-limits-helpers.d.ts +7 -4
- package/dist/playwright/index.cjs +55 -15
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +16 -10
- package/dist/playwright/index.esm.js +55 -15
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/edit-agent-category-helpers.d.ts +13 -0
- package/dist/playwright/playwright/human-support-tab-helpers.d.ts +2 -2
- package/dist/playwright/playwright/privacy-tab-helpers.d.ts +7 -4
- package/dist/playwright/playwright/spend-limits-helpers.d.ts +7 -4
- package/dist/security/playwright/edit-agent-category-helpers.d.ts +13 -0
- package/dist/security/playwright/human-support-tab-helpers.d.ts +2 -2
- package/dist/security/playwright/privacy-tab-helpers.d.ts +7 -4
- package/dist/security/playwright/spend-limits-helpers.d.ts +7 -4
- package/dist/web-containers/playwright/edit-agent-category-helpers.d.ts +13 -0
- package/dist/web-containers/playwright/human-support-tab-helpers.d.ts +2 -2
- package/dist/web-containers/playwright/privacy-tab-helpers.d.ts +7 -4
- package/dist/web-containers/playwright/spend-limits-helpers.d.ts +7 -4
- package/dist/web-containers/source/admin/tabs/applications/applications-tab.js +5 -2
- package/dist/web-containers/source/admin/tabs/applications/applications-tab.js.map +1 -1
- package/dist/web-containers/source/applications/applications-tab.js +5 -2
- package/dist/web-containers/source/applications/applications-tab.js.map +1 -1
- package/dist/web-containers/source/applications-tab.js +5 -2
- package/dist/web-containers/source/applications-tab.js.map +1 -1
- package/dist/web-containers/source/approvals-mode-button.js +177 -0
- package/dist/web-containers/source/approvals-mode-button.js.map +1 -0
- package/dist/web-containers/source/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/chat/chat-host-context.js.map +1 -1
- package/dist/web-containers/source/chat/code-permission-card.js +39 -2
- package/dist/web-containers/source/chat/code-permission-card.js.map +1 -1
- package/dist/web-containers/source/chat-host-context.js.map +1 -1
- package/dist/web-containers/source/chat-input-form/approvals-mode-button.js +177 -0
- package/dist/web-containers/source/chat-input-form/approvals-mode-button.js.map +1 -0
- package/dist/web-containers/source/chat-input-form/composer-canvas-pill.js +30 -0
- package/dist/web-containers/source/chat-input-form/composer-canvas-pill.js.map +1 -0
- package/dist/web-containers/source/chat-input-form/composer-model-chip.js +23 -0
- package/dist/web-containers/source/chat-input-form/composer-model-chip.js.map +1 -0
- package/dist/web-containers/source/chat-input-form/composer-plus-menu.js +3 -3
- package/dist/web-containers/source/chat-input-form/composer-plus-menu.js.map +1 -1
- package/dist/web-containers/source/chat-input-form/composer-tool-row.js +91 -0
- package/dist/web-containers/source/chat-input-form/composer-tool-row.js.map +1 -0
- package/dist/web-containers/source/chat-input-form/cowork-control.js +7 -4
- package/dist/web-containers/source/chat-input-form/cowork-control.js.map +1 -1
- package/dist/web-containers/source/chat-input-form.js +8 -30
- package/dist/web-containers/source/chat-input-form.js.map +1 -1
- package/dist/web-containers/source/claw-sandbox/sandbox-config.js +1 -3
- package/dist/web-containers/source/claw-sandbox/sandbox-config.js.map +1 -1
- package/dist/web-containers/source/claw-sandbox/sandbox-kind-row.js +12 -0
- package/dist/web-containers/source/claw-sandbox/sandbox-kind-row.js.map +1 -0
- package/dist/web-containers/source/code-permission-card.js +39 -2
- package/dist/web-containers/source/code-permission-card.js.map +1 -1
- package/dist/web-containers/source/components/chat/chat-host-context.js.map +1 -1
- package/dist/web-containers/source/components/chat/code-permission-card.js +39 -2
- package/dist/web-containers/source/components/chat/code-permission-card.js.map +1 -1
- package/dist/web-containers/source/components/chat-input-form/approvals-mode-button.js +177 -0
- package/dist/web-containers/source/components/chat-input-form/approvals-mode-button.js.map +1 -0
- package/dist/web-containers/source/components/chat-input-form/composer-canvas-pill.js +30 -0
- package/dist/web-containers/source/components/chat-input-form/composer-canvas-pill.js.map +1 -0
- package/dist/web-containers/source/components/chat-input-form/composer-model-chip.js +23 -0
- package/dist/web-containers/source/components/chat-input-form/composer-model-chip.js.map +1 -0
- package/dist/web-containers/source/components/chat-input-form/composer-plus-menu.js +3 -3
- package/dist/web-containers/source/components/chat-input-form/composer-plus-menu.js.map +1 -1
- package/dist/web-containers/source/components/chat-input-form/composer-tool-row.js +91 -0
- package/dist/web-containers/source/components/chat-input-form/composer-tool-row.js.map +1 -0
- package/dist/web-containers/source/components/chat-input-form/cowork-control.js +7 -4
- package/dist/web-containers/source/components/chat-input-form/cowork-control.js.map +1 -1
- package/dist/web-containers/source/components/chat-input-form.js +8 -30
- package/dist/web-containers/source/components/chat-input-form.js.map +1 -1
- package/dist/web-containers/source/components/claw-sandbox/sandbox-config.js +1 -3
- package/dist/web-containers/source/components/claw-sandbox/sandbox-config.js.map +1 -1
- package/dist/web-containers/source/components/claw-sandbox/sandbox-kind-row.js +12 -0
- package/dist/web-containers/source/components/claw-sandbox/sandbox-kind-row.js.map +1 -0
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab.js +34 -6
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/components/profile/admin/tabs/applications/applications-tab.js +5 -2
- package/dist/web-containers/source/components/profile/admin/tabs/applications/applications-tab.js.map +1 -1
- package/dist/web-containers/source/components/profile/users-models/index.js +192 -0
- package/dist/web-containers/source/components/profile/users-models/index.js.map +1 -0
- package/dist/web-containers/source/components/profile/users-models/llm-access.js +206 -0
- package/dist/web-containers/source/components/profile/users-models/llm-access.js.map +1 -0
- package/dist/web-containers/source/composer-canvas-pill.js +30 -0
- package/dist/web-containers/source/composer-canvas-pill.js.map +1 -0
- package/dist/web-containers/source/composer-model-chip.js +23 -0
- package/dist/web-containers/source/composer-model-chip.js.map +1 -0
- package/dist/web-containers/source/composer-plus-menu.js +3 -3
- package/dist/web-containers/source/composer-plus-menu.js.map +1 -1
- package/dist/web-containers/source/composer-tool-row.js +91 -0
- package/dist/web-containers/source/composer-tool-row.js.map +1 -0
- package/dist/web-containers/source/cowork-control.js +7 -4
- package/dist/web-containers/source/cowork-control.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab.js +34 -6
- package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/en.json.js +50 -9
- package/dist/web-containers/source/en.json.js.map +1 -1
- package/dist/web-containers/source/es.json.js +49 -8
- package/dist/web-containers/source/es.json.js.map +1 -1
- package/dist/web-containers/source/fr.json.js +49 -8
- package/dist/web-containers/source/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/en.json.js +50 -9
- package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/es.json.js +49 -8
- package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/fr.json.js +49 -8
- package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/zh.json.js +49 -8
- package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/labels.js +289 -23
- package/dist/web-containers/source/labels.js.map +1 -1
- package/dist/web-containers/source/llm-access.js +206 -0
- package/dist/web-containers/source/llm-access.js.map +1 -0
- package/dist/web-containers/source/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/llm-tab/labels.js +12 -0
- package/dist/web-containers/source/llm-tab/labels.js.map +1 -1
- package/dist/web-containers/source/llm-tab/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/llm-tab/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/llm-tab.js +34 -6
- package/dist/web-containers/source/llm-tab.js.map +1 -1
- package/dist/web-containers/source/messages/en.json.js +50 -9
- package/dist/web-containers/source/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/messages/es.json.js +49 -8
- package/dist/web-containers/source/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/messages/fr.json.js +49 -8
- package/dist/web-containers/source/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/messages/zh.json.js +49 -8
- package/dist/web-containers/source/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab.js +34 -6
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/next/index.js +2 -0
- package/dist/web-containers/source/next/index.js.map +1 -1
- package/dist/web-containers/source/profile/admin/tabs/applications/applications-tab.js +5 -2
- package/dist/web-containers/source/profile/admin/tabs/applications/applications-tab.js.map +1 -1
- package/dist/web-containers/source/profile/users-models/index.js +192 -0
- package/dist/web-containers/source/profile/users-models/index.js.map +1 -0
- package/dist/web-containers/source/profile/users-models/llm-access.js +206 -0
- package/dist/web-containers/source/profile/users-models/llm-access.js.map +1 -0
- package/dist/web-containers/source/sandbox-config.js +1 -3
- package/dist/web-containers/source/sandbox-config.js.map +1 -1
- package/dist/web-containers/source/sandbox-kind-row.js +12 -0
- package/dist/web-containers/source/sandbox-kind-row.js.map +1 -0
- package/dist/web-containers/source/settings-tab/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/settings-tab/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/settings-tab/labels.js +1 -9
- package/dist/web-containers/source/settings-tab/labels.js.map +1 -1
- package/dist/web-containers/source/settings-tab/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/settings-tab/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/tabs/applications/applications-tab.js +5 -2
- package/dist/web-containers/source/tabs/applications/applications-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/llm-tab/labels.js +12 -0
- package/dist/web-containers/source/tabs/llm-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/llm-tab/llm-provider-modal.js +46 -32
- package/dist/web-containers/source/tabs/llm-tab/llm-provider-modal.js.map +1 -1
- package/dist/web-containers/source/tabs/llm-tab.js +34 -6
- package/dist/web-containers/source/tabs/llm-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/settings-tab/capabilities-sub-tab.js +1 -1
- package/dist/web-containers/source/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/settings-tab/labels.js +1 -9
- package/dist/web-containers/source/tabs/settings-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/tsconfig.tsbuildinfo +1 -1
- package/dist/web-containers/source/use-edit-mentor-settings.js +4 -8
- package/dist/web-containers/source/use-edit-mentor-settings.js.map +1 -1
- package/dist/web-containers/source/users-models/index.js +192 -0
- package/dist/web-containers/source/users-models/index.js.map +1 -0
- package/dist/web-containers/source/users-models/llm-access.js +206 -0
- package/dist/web-containers/source/users-models/llm-access.js.map +1 -0
- package/dist/web-containers/source/web-containers/tsconfig.tsbuildinfo +1 -1
- package/dist/web-containers/source/zh.json.js +49 -8
- package/dist/web-containers/source/zh.json.js.map +1 -1
- package/dist/web-utils/playwright/edit-agent-category-helpers.d.ts +13 -0
- package/dist/web-utils/playwright/human-support-tab-helpers.d.ts +2 -2
- package/dist/web-utils/playwright/privacy-tab-helpers.d.ts +7 -4
- package/dist/web-utils/playwright/spend-limits-helpers.d.ts +7 -4
- package/package.json +5 -5
|
@@ -1148,6 +1148,8 @@ declare function expectCreditBalanceForCurrentPlan(page: Page, options?: {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
declare const PRIVACY_LABELS: {
|
|
1150
1150
|
readonly tabName: "Privacy";
|
|
1151
|
+
/** Category strip pill that hosts the Privacy segment. */
|
|
1152
|
+
readonly navCategory: "Policies";
|
|
1151
1153
|
readonly headerTitle: "Privacy";
|
|
1152
1154
|
readonly actionLabel: "When PII is detected";
|
|
1153
1155
|
readonly blockMessageLabel: "Block Message";
|
|
@@ -1178,13 +1180,14 @@ declare const PRIVACY_LABELS: {
|
|
|
1178
1180
|
type PrivacyAction = keyof typeof PRIVACY_LABELS.actionOptions;
|
|
1179
1181
|
type PrivacyEntity = keyof typeof PRIVACY_LABELS.entityChips;
|
|
1180
1182
|
/**
|
|
1181
|
-
* Check whether the Privacy tab is
|
|
1182
|
-
*
|
|
1183
|
-
* conditionally rendered tabs.
|
|
1183
|
+
* Check whether the Privacy tab is reachable in the Edit Mentor dialog
|
|
1184
|
+
* (switches to the Policies category first). Returns false instead of
|
|
1185
|
+
* throwing so consumers can guard conditionally rendered tabs.
|
|
1184
1186
|
*/
|
|
1185
1187
|
declare function isPrivacyTabVisible(page: Page): Promise<boolean>;
|
|
1186
1188
|
/**
|
|
1187
|
-
* Switch to the Privacy tab. Assumes the Edit Mentor
|
|
1189
|
+
* Switch to the Privacy tab (Policies category). Assumes the Edit Mentor
|
|
1190
|
+
* dialog is open.
|
|
1188
1191
|
*
|
|
1189
1192
|
* The Privacy Router on/off toggle lives on the Settings tab — this tab
|
|
1190
1193
|
* only shows dependent PII-handling fields when the router is enabled.
|
|
@@ -1946,6 +1949,8 @@ declare function clickBillingManageUsage(page: Page): Promise<void>;
|
|
|
1946
1949
|
declare const SPEND_LIMITS_LABELS: {
|
|
1947
1950
|
/** Agent-settings modal tab name (host registries label it "Billing"). */
|
|
1948
1951
|
readonly tabName: "Billing";
|
|
1952
|
+
/** Category strip pill that hosts the Billing segment. */
|
|
1953
|
+
readonly navCategory: "Policies";
|
|
1949
1954
|
readonly subTabs: {
|
|
1950
1955
|
readonly agent: "This Agent";
|
|
1951
1956
|
readonly users: "Per User";
|
|
@@ -2012,13 +2017,14 @@ declare function spendLimitsTabBody(page: Page, scope?: Locator): Locator;
|
|
|
2012
2017
|
/** A per-user table row for the given username. */
|
|
2013
2018
|
declare function userSpendLimitRow(page: Page, username: string, scope?: Locator): Locator;
|
|
2014
2019
|
/**
|
|
2015
|
-
* Returns false if the Billing tab isn't
|
|
2016
|
-
*
|
|
2020
|
+
* Returns false if the Billing tab isn't reachable in the edit-agent dialog
|
|
2021
|
+
* (host didn't register it, or RBAC hid it). Switches to the Policies
|
|
2022
|
+
* category first.
|
|
2017
2023
|
*/
|
|
2018
2024
|
declare function isSpendLimitsTabVisible(page: Page): Promise<boolean>;
|
|
2019
2025
|
/**
|
|
2020
|
-
* Switch to the Billing top-level tab of the edit-agent
|
|
2021
|
-
* is gated on the tab body's testid, not on timing.
|
|
2026
|
+
* Switch to the Billing top-level tab (Policies category) of the edit-agent
|
|
2027
|
+
* dialog. Completion is gated on the tab body's testid, not on timing.
|
|
2022
2028
|
*/
|
|
2023
2029
|
declare function switchToSpendLimitsTab(page: Page): Promise<void>;
|
|
2024
2030
|
/**
|
|
@@ -3060,7 +3066,7 @@ declare function expectAllEndpointsVisible(scope: Page | Locator): Promise<void>
|
|
|
3060
3066
|
|
|
3061
3067
|
/**
|
|
3062
3068
|
* Support tab helpers — Playwright bindings for the `AgentHumanSupportTab`
|
|
3063
|
-
* component from `@iblai/web-containers` (Edit Agent modal →
|
|
3069
|
+
* component from `@iblai/web-containers` (Edit Agent modal → Activity →
|
|
3064
3070
|
* Support).
|
|
3065
3071
|
*
|
|
3066
3072
|
* All UI strings below mirror `AGENT_HUMAN_SUPPORT_TAB_LABELS` from
|
|
@@ -3079,7 +3085,7 @@ declare const SUPPORT_LABELS: {
|
|
|
3079
3085
|
/** The host sidebar trigger's `aria-controls` panel id suffix. */
|
|
3080
3086
|
readonly panelValue: "human_support";
|
|
3081
3087
|
/** Category strip pill that hosts the Support segment. */
|
|
3082
|
-
readonly navCategory: "
|
|
3088
|
+
readonly navCategory: "Activity";
|
|
3083
3089
|
readonly header: {
|
|
3084
3090
|
readonly title: "Support";
|
|
3085
3091
|
readonly description: "Review and respond to support requests submitted for this agent.";
|
|
@@ -3886,6 +3886,35 @@ async function expectCreditBalanceForCurrentPlan(page, options) {
|
|
|
3886
3886
|
return plan;
|
|
3887
3887
|
}
|
|
3888
3888
|
|
|
3889
|
+
/**
|
|
3890
|
+
* Best-effort switch to the Edit Agent modal's category pill (Setup /
|
|
3891
|
+
* Policies / Integrations / Activity) that hosts a segment. The host mounts
|
|
3892
|
+
* only the active category's segment triggers, so a tab lookup misses every
|
|
3893
|
+
* segment outside it. The strip only renders when more than one category has
|
|
3894
|
+
* items, so a missing pill is not an error — the segment is then already
|
|
3895
|
+
* mounted in the single visible list.
|
|
3896
|
+
*
|
|
3897
|
+
* `scope` is the Edit Agent dialog when the caller holds one; with a `Page`
|
|
3898
|
+
* the pill is looked up inside the open dialogs.
|
|
3899
|
+
*/
|
|
3900
|
+
async function switchToEditAgentCategory(scope, category) {
|
|
3901
|
+
const dialog = 'page' in scope ? scope : scope.getByRole('dialog');
|
|
3902
|
+
const pill = dialog
|
|
3903
|
+
.getByRole('tab', { name: category, exact: true })
|
|
3904
|
+
.and(dialog.locator(':visible'))
|
|
3905
|
+
.first();
|
|
3906
|
+
const hasStrip = await pill
|
|
3907
|
+
.waitFor({ state: 'visible', timeout: 5000 })
|
|
3908
|
+
.then(() => true)
|
|
3909
|
+
.catch(() => false);
|
|
3910
|
+
if (!hasStrip)
|
|
3911
|
+
return;
|
|
3912
|
+
if ((await pill.getAttribute('data-state').catch(() => null)) !== 'active') {
|
|
3913
|
+
await pill.click();
|
|
3914
|
+
await expect(pill).toHaveAttribute('data-state', 'active', { timeout: 5000 });
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3889
3918
|
/**
|
|
3890
3919
|
* Privacy tab helpers — Playwright bindings for the `AgentPrivacyTab`
|
|
3891
3920
|
* component from `@iblai/web-containers`.
|
|
@@ -3900,6 +3929,8 @@ async function expectCreditBalanceForCurrentPlan(page, options) {
|
|
|
3900
3929
|
*/
|
|
3901
3930
|
const PRIVACY_LABELS = {
|
|
3902
3931
|
tabName: 'Privacy',
|
|
3932
|
+
/** Category strip pill that hosts the Privacy segment. */
|
|
3933
|
+
navCategory: 'Policies',
|
|
3903
3934
|
headerTitle: 'Privacy',
|
|
3904
3935
|
actionLabel: 'When PII is detected',
|
|
3905
3936
|
blockMessageLabel: 'Block Message',
|
|
@@ -3936,13 +3967,14 @@ function asPage$8(scope) {
|
|
|
3936
3967
|
return 'page' in scope ? scope.page() : scope;
|
|
3937
3968
|
}
|
|
3938
3969
|
/**
|
|
3939
|
-
* Check whether the Privacy tab is
|
|
3940
|
-
*
|
|
3941
|
-
* conditionally rendered tabs.
|
|
3970
|
+
* Check whether the Privacy tab is reachable in the Edit Mentor dialog
|
|
3971
|
+
* (switches to the Policies category first). Returns false instead of
|
|
3972
|
+
* throwing so consumers can guard conditionally rendered tabs.
|
|
3942
3973
|
*/
|
|
3943
3974
|
async function isPrivacyTabVisible(page) {
|
|
3944
3975
|
const tab = page.getByRole('tab', { name: PRIVACY_LABELS.tabName, exact: true });
|
|
3945
3976
|
try {
|
|
3977
|
+
await switchToEditAgentCategory(page, PRIVACY_LABELS.navCategory);
|
|
3946
3978
|
await expect(tab).toBeVisible({ timeout: 5000 });
|
|
3947
3979
|
return true;
|
|
3948
3980
|
}
|
|
@@ -3951,7 +3983,8 @@ async function isPrivacyTabVisible(page) {
|
|
|
3951
3983
|
}
|
|
3952
3984
|
}
|
|
3953
3985
|
/**
|
|
3954
|
-
* Switch to the Privacy tab. Assumes the Edit Mentor
|
|
3986
|
+
* Switch to the Privacy tab (Policies category). Assumes the Edit Mentor
|
|
3987
|
+
* dialog is open.
|
|
3955
3988
|
*
|
|
3956
3989
|
* The Privacy Router on/off toggle lives on the Settings tab — this tab
|
|
3957
3990
|
* only shows dependent PII-handling fields when the router is enabled.
|
|
@@ -3959,6 +3992,7 @@ async function isPrivacyTabVisible(page) {
|
|
|
3959
3992
|
* since the field labels are conditional.
|
|
3960
3993
|
*/
|
|
3961
3994
|
async function switchToPrivacyTab(page) {
|
|
3995
|
+
await switchToEditAgentCategory(page, PRIVACY_LABELS.navCategory);
|
|
3962
3996
|
const tab = page.getByRole('tab', { name: PRIVACY_LABELS.tabName, exact: true });
|
|
3963
3997
|
await expect(tab).toBeVisible({ timeout: 10000 });
|
|
3964
3998
|
await tab.click();
|
|
@@ -5547,6 +5581,8 @@ async function clickBillingManageUsage(page) {
|
|
|
5547
5581
|
const SPEND_LIMITS_LABELS = {
|
|
5548
5582
|
/** Agent-settings modal tab name (host registries label it "Billing"). */
|
|
5549
5583
|
tabName: 'Billing',
|
|
5584
|
+
/** Category strip pill that hosts the Billing segment. */
|
|
5585
|
+
navCategory: 'Policies',
|
|
5550
5586
|
subTabs: {
|
|
5551
5587
|
agent: 'This Agent',
|
|
5552
5588
|
users: 'Per User',
|
|
@@ -5620,15 +5656,18 @@ function userSpendLimitRow(page, username, scope) {
|
|
|
5620
5656
|
return userCapsSection(page, scope).getByTestId(`user-cap-row-${username}`);
|
|
5621
5657
|
}
|
|
5622
5658
|
/**
|
|
5623
|
-
* Returns false if the Billing tab isn't
|
|
5624
|
-
*
|
|
5659
|
+
* Returns false if the Billing tab isn't reachable in the edit-agent dialog
|
|
5660
|
+
* (host didn't register it, or RBAC hid it). Switches to the Policies
|
|
5661
|
+
* category first.
|
|
5625
5662
|
*/
|
|
5626
5663
|
async function isSpendLimitsTabVisible(page) {
|
|
5627
|
-
const
|
|
5664
|
+
const dialog = editAgentDialog(page);
|
|
5665
|
+
const tab = dialog.getByRole('tab', {
|
|
5628
5666
|
name: SPEND_LIMITS_LABELS.tabName,
|
|
5629
5667
|
exact: true,
|
|
5630
5668
|
});
|
|
5631
5669
|
try {
|
|
5670
|
+
await switchToEditAgentCategory(dialog, SPEND_LIMITS_LABELS.navCategory);
|
|
5632
5671
|
await expect(tab).toBeVisible({ timeout: 5000 });
|
|
5633
5672
|
return true;
|
|
5634
5673
|
}
|
|
@@ -5637,11 +5676,12 @@ async function isSpendLimitsTabVisible(page) {
|
|
|
5637
5676
|
}
|
|
5638
5677
|
}
|
|
5639
5678
|
/**
|
|
5640
|
-
* Switch to the Billing top-level tab of the edit-agent
|
|
5641
|
-
* is gated on the tab body's testid, not on timing.
|
|
5679
|
+
* Switch to the Billing top-level tab (Policies category) of the edit-agent
|
|
5680
|
+
* dialog. Completion is gated on the tab body's testid, not on timing.
|
|
5642
5681
|
*/
|
|
5643
5682
|
async function switchToSpendLimitsTab(page) {
|
|
5644
5683
|
const dialog = editAgentDialog(page);
|
|
5684
|
+
await switchToEditAgentCategory(dialog, SPEND_LIMITS_LABELS.navCategory);
|
|
5645
5685
|
const tab = dialog.getByRole('tab', { name: SPEND_LIMITS_LABELS.tabName, exact: true });
|
|
5646
5686
|
await expect(tab).toBeVisible({ timeout: UI_TIMEOUT });
|
|
5647
5687
|
await tab.click();
|
|
@@ -7872,7 +7912,7 @@ async function expectAllEndpointsVisible(scope) {
|
|
|
7872
7912
|
|
|
7873
7913
|
/**
|
|
7874
7914
|
* Support tab helpers — Playwright bindings for the `AgentHumanSupportTab`
|
|
7875
|
-
* component from `@iblai/web-containers` (Edit Agent modal →
|
|
7915
|
+
* component from `@iblai/web-containers` (Edit Agent modal → Activity →
|
|
7876
7916
|
* Support).
|
|
7877
7917
|
*
|
|
7878
7918
|
* All UI strings below mirror `AGENT_HUMAN_SUPPORT_TAB_LABELS` from
|
|
@@ -7891,7 +7931,7 @@ const SUPPORT_LABELS = {
|
|
|
7891
7931
|
/** The host sidebar trigger's `aria-controls` panel id suffix. */
|
|
7892
7932
|
panelValue: 'human_support',
|
|
7893
7933
|
/** Category strip pill that hosts the Support segment. */
|
|
7894
|
-
navCategory: '
|
|
7934
|
+
navCategory: 'Activity',
|
|
7895
7935
|
header: {
|
|
7896
7936
|
title: 'Support',
|
|
7897
7937
|
description: 'Review and respond to support requests submitted for this agent.',
|
|
@@ -7979,7 +8019,7 @@ function getEditAgentDialog(page, dialogTitle = 'Edit Agent') {
|
|
|
7979
8019
|
async function isSupportTabVisible(page) {
|
|
7980
8020
|
const dialog = getEditAgentDialog(page);
|
|
7981
8021
|
try {
|
|
7982
|
-
await
|
|
8022
|
+
await switchToActivityCategory(dialog);
|
|
7983
8023
|
await expect(getSupportTabTrigger(dialog)).toBeVisible({ timeout: 5000 });
|
|
7984
8024
|
return true;
|
|
7985
8025
|
}
|
|
@@ -7999,12 +8039,12 @@ function getSupportTabTrigger(dialog) {
|
|
|
7999
8039
|
.first();
|
|
8000
8040
|
}
|
|
8001
8041
|
/**
|
|
8002
|
-
* Best-effort switch to the "
|
|
8042
|
+
* Best-effort switch to the "Activity" category strip that hosts the
|
|
8003
8043
|
* Support segment. The strip only renders when more than one category has
|
|
8004
8044
|
* items, so a missing pill is not an error — the segment is then already
|
|
8005
8045
|
* mounted in the single visible list.
|
|
8006
8046
|
*/
|
|
8007
|
-
async function
|
|
8047
|
+
async function switchToActivityCategory(dialog) {
|
|
8008
8048
|
const pill = dialog
|
|
8009
8049
|
.getByRole('tab', { name: SUPPORT_LABELS.navCategory, exact: true })
|
|
8010
8050
|
.and(dialog.locator(':visible'))
|
|
@@ -8028,7 +8068,7 @@ async function switchToRuntimeCategory(dialog) {
|
|
|
8028
8068
|
async function switchToSupportTab(page) {
|
|
8029
8069
|
const dialog = getEditAgentDialog(page);
|
|
8030
8070
|
await expect(dialog).toBeVisible({ timeout: 15000 });
|
|
8031
|
-
await
|
|
8071
|
+
await switchToActivityCategory(dialog);
|
|
8032
8072
|
const trigger = getSupportTabTrigger(dialog);
|
|
8033
8073
|
await expect(trigger).toBeVisible({ timeout: 10000 });
|
|
8034
8074
|
await trigger.click();
|