@iblai/iblai-js 2.30.0 → 2.32.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/chat-privacy-helpers.d.ts +9 -9
- package/dist/playwright/index.cjs +15 -15
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +9 -9
- package/dist/playwright/index.esm.js +15 -15
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/chat-privacy-helpers.d.ts +9 -9
- package/dist/security/playwright/chat-privacy-helpers.d.ts +9 -9
- package/dist/web-containers/playwright/chat-privacy-helpers.d.ts +9 -9
- package/dist/web-containers/source/index.esm.js +1474 -407
- package/dist/web-containers/source/next/index.esm.js +1208 -252
- package/dist/web-utils/playwright/chat-privacy-helpers.d.ts +9 -9
- package/package.json +4 -4
|
@@ -5,8 +5,8 @@ import { Locator, Page } from '@playwright/test';
|
|
|
5
5
|
* Three surfaces, three groups of helpers:
|
|
6
6
|
*
|
|
7
7
|
* 1. **Header toggle** — the nav-bar `ChatPrivacyToggle` (`<HatGlasses />`
|
|
8
|
-
* icon-button that morphs into the "
|
|
9
|
-
* 2. **User profile** — the "
|
|
8
|
+
* icon-button that morphs into the "Incognito" pill).
|
|
9
|
+
* 2. **User profile** — the "Privacy" tab in `UserProfileModal`
|
|
10
10
|
* (three radio-card options: Normal / Anonymized / Disabled).
|
|
11
11
|
* 3. **Tenant admin** — the "Allow users to control chat privacy" row in
|
|
12
12
|
* the Advanced settings tab (`<Switch>`).
|
|
@@ -20,21 +20,21 @@ import { Locator, Page } from '@playwright/test';
|
|
|
20
20
|
export declare const CHAT_PRIVACY_LABELS: {
|
|
21
21
|
readonly toggle: {
|
|
22
22
|
/** Title of the mid-session confirmation dialog. */
|
|
23
|
-
readonly dialogTitle: "Enable
|
|
23
|
+
readonly dialogTitle: "Enable Incognito for this chat?";
|
|
24
24
|
/** Label on the dialog's confirm button (matches both idle + busy state via regex). */
|
|
25
25
|
readonly dialogConfirm: RegExp;
|
|
26
26
|
};
|
|
27
27
|
readonly profileTab: {
|
|
28
|
-
/**
|
|
29
|
-
readonly tabName: "
|
|
28
|
+
/** Rail entry in the user profile modal (the feature inside is called Incognito). */
|
|
29
|
+
readonly tabName: "Privacy";
|
|
30
30
|
/** Section heading inside the tab body. */
|
|
31
|
-
readonly sectionHeading: "Default
|
|
31
|
+
readonly sectionHeading: "Default Incognito Setting";
|
|
32
32
|
/** Label text on each radio card. Kept in case the test wants to assert
|
|
33
33
|
* copy explicitly — the click + read paths use the testid instead. */
|
|
34
34
|
readonly cards: {
|
|
35
35
|
readonly normal: "Normal";
|
|
36
36
|
readonly anonymized: "Anonymized";
|
|
37
|
-
readonly disabled: "
|
|
37
|
+
readonly disabled: "Incognito";
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
readonly tenantToggle: {
|
|
@@ -85,7 +85,7 @@ export declare function expectChatPrivacyConfirmDialogOpen(scope: Page | Locator
|
|
|
85
85
|
/**
|
|
86
86
|
* Mid-conversation enable flow:
|
|
87
87
|
* 1. Click the toggle (opens the confirm dialog).
|
|
88
|
-
* 2. Click the "Enable
|
|
88
|
+
* 2. Click the "Enable Incognito" action.
|
|
89
89
|
* The session-level disable-chathistory POST is one-way per spec; the
|
|
90
90
|
* helper resolves once the dialog closes after a successful confirm.
|
|
91
91
|
*/
|
|
@@ -93,7 +93,7 @@ export declare function confirmEnableChatPrivacyMidSession(scope: Page | Locator
|
|
|
93
93
|
/** Cancel the confirm dialog without enabling. */
|
|
94
94
|
export declare function cancelEnableChatPrivacyMidSession(scope: Page | Locator): Promise<void>;
|
|
95
95
|
/**
|
|
96
|
-
* Switch to the
|
|
96
|
+
* Switch to the Privacy tab inside the user profile modal. Assumes
|
|
97
97
|
* the modal is already open. The tab only appears when the tenant has
|
|
98
98
|
* `allow_user_chat_privacy_control` on, so a `false` return from
|
|
99
99
|
* `isPrivateModeTabVisible` is a meaningful state, not an error.
|
|
@@ -4069,8 +4069,8 @@ async function expectOutputFilterEnabled(scope, enabled) {
|
|
|
4069
4069
|
* Three surfaces, three groups of helpers:
|
|
4070
4070
|
*
|
|
4071
4071
|
* 1. **Header toggle** — the nav-bar `ChatPrivacyToggle` (`<HatGlasses />`
|
|
4072
|
-
* icon-button that morphs into the "
|
|
4073
|
-
* 2. **User profile** — the "
|
|
4072
|
+
* icon-button that morphs into the "Incognito" pill).
|
|
4073
|
+
* 2. **User profile** — the "Privacy" tab in `UserProfileModal`
|
|
4074
4074
|
* (three radio-card options: Normal / Anonymized / Disabled).
|
|
4075
4075
|
* 3. **Tenant admin** — the "Allow users to control chat privacy" row in
|
|
4076
4076
|
* the Advanced settings tab (`<Switch>`).
|
|
@@ -4084,21 +4084,21 @@ async function expectOutputFilterEnabled(scope, enabled) {
|
|
|
4084
4084
|
const CHAT_PRIVACY_LABELS = {
|
|
4085
4085
|
toggle: {
|
|
4086
4086
|
/** Title of the mid-session confirmation dialog. */
|
|
4087
|
-
dialogTitle: 'Enable
|
|
4087
|
+
dialogTitle: 'Enable Incognito for this chat?',
|
|
4088
4088
|
/** Label on the dialog's confirm button (matches both idle + busy state via regex). */
|
|
4089
|
-
dialogConfirm: /Enable
|
|
4089
|
+
dialogConfirm: /Enable Incognito|Enabling…/,
|
|
4090
4090
|
},
|
|
4091
4091
|
profileTab: {
|
|
4092
|
-
/**
|
|
4093
|
-
tabName: '
|
|
4092
|
+
/** Rail entry in the user profile modal (the feature inside is called Incognito). */
|
|
4093
|
+
tabName: 'Privacy',
|
|
4094
4094
|
/** Section heading inside the tab body. */
|
|
4095
|
-
sectionHeading: 'Default
|
|
4095
|
+
sectionHeading: 'Default Incognito Setting',
|
|
4096
4096
|
/** Label text on each radio card. Kept in case the test wants to assert
|
|
4097
4097
|
* copy explicitly — the click + read paths use the testid instead. */
|
|
4098
4098
|
cards: {
|
|
4099
4099
|
normal: 'Normal',
|
|
4100
4100
|
anonymized: 'Anonymized',
|
|
4101
|
-
disabled: '
|
|
4101
|
+
disabled: 'Incognito',
|
|
4102
4102
|
},
|
|
4103
4103
|
},
|
|
4104
4104
|
tenantToggle: {
|
|
@@ -4191,7 +4191,7 @@ async function expectChatPrivacyConfirmDialogOpen(scope, open) {
|
|
|
4191
4191
|
/**
|
|
4192
4192
|
* Mid-conversation enable flow:
|
|
4193
4193
|
* 1. Click the toggle (opens the confirm dialog).
|
|
4194
|
-
* 2. Click the "Enable
|
|
4194
|
+
* 2. Click the "Enable Incognito" action.
|
|
4195
4195
|
* The session-level disable-chathistory POST is one-way per spec; the
|
|
4196
4196
|
* helper resolves once the dialog closes after a successful confirm.
|
|
4197
4197
|
*/
|
|
@@ -4204,7 +4204,7 @@ async function confirmEnableChatPrivacyMidSession(scope) {
|
|
|
4204
4204
|
await test$1.expect(action).toBeEnabled({ timeout: 10000 });
|
|
4205
4205
|
await action.click();
|
|
4206
4206
|
await expectChatPrivacyConfirmDialogOpen(page, false);
|
|
4207
|
-
logger.info('Confirmed mid-session
|
|
4207
|
+
logger.info('Confirmed mid-session Incognito enable');
|
|
4208
4208
|
}
|
|
4209
4209
|
/** Cancel the confirm dialog without enabling. */
|
|
4210
4210
|
async function cancelEnableChatPrivacyMidSession(scope) {
|
|
@@ -4213,13 +4213,13 @@ async function cancelEnableChatPrivacyMidSession(scope) {
|
|
|
4213
4213
|
await test$1.expect(cancel).toBeVisible({ timeout: 10000 });
|
|
4214
4214
|
await cancel.click();
|
|
4215
4215
|
await expectChatPrivacyConfirmDialogOpen(page, false);
|
|
4216
|
-
logger.info('Cancelled mid-session
|
|
4216
|
+
logger.info('Cancelled mid-session Incognito dialog');
|
|
4217
4217
|
}
|
|
4218
4218
|
// ──────────────────────────────────────────────────────────────────────
|
|
4219
|
-
// 2. User profile —
|
|
4219
|
+
// 2. User profile — Privacy tab
|
|
4220
4220
|
// ──────────────────────────────────────────────────────────────────────
|
|
4221
4221
|
/**
|
|
4222
|
-
* Switch to the
|
|
4222
|
+
* Switch to the Privacy tab inside the user profile modal. Assumes
|
|
4223
4223
|
* the modal is already open. The tab only appears when the tenant has
|
|
4224
4224
|
* `allow_user_chat_privacy_control` on, so a `false` return from
|
|
4225
4225
|
* `isPrivateModeTabVisible` is a meaningful state, not an error.
|
|
@@ -4245,7 +4245,7 @@ async function switchToPrivateModeTab(page) {
|
|
|
4245
4245
|
await test$1.expect(tab).toBeVisible({ timeout: 10000 });
|
|
4246
4246
|
await tab.click();
|
|
4247
4247
|
await test$1.expect(page.getByTestId('chat-privacy-tab-body')).toBeVisible({ timeout: 10000 });
|
|
4248
|
-
logger.info('Switched to
|
|
4248
|
+
logger.info('Switched to Privacy tab');
|
|
4249
4249
|
}
|
|
4250
4250
|
/** Locator for one of the three radio cards. */
|
|
4251
4251
|
function getPrivateModeCard(scope, mode) {
|
|
@@ -4262,7 +4262,7 @@ async function selectPrivateMode(scope, mode) {
|
|
|
4262
4262
|
await test$1.expect(card).toBeEnabled({ timeout: 10000 });
|
|
4263
4263
|
await card.click();
|
|
4264
4264
|
await test$1.expect(card).toHaveAttribute('aria-pressed', 'true', { timeout: 10000 });
|
|
4265
|
-
logger.info(`Selected
|
|
4265
|
+
logger.info(`Selected Incognito "${mode}"`);
|
|
4266
4266
|
}
|
|
4267
4267
|
/** Assert which mode is currently selected. Uses `aria-pressed` + `data-state`. */
|
|
4268
4268
|
async function expectPrivateModeSelected(scope, mode) {
|