@iblai/iblai-js 2.32.0 → 2.33.1
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 +21 -6
- package/dist/data-layer/playwright/index.d.ts +1 -1
- package/dist/playwright/index.cjs +47 -6
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +22 -7
- package/dist/playwright/index.esm.js +47 -7
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/chat-privacy-helpers.d.ts +21 -6
- package/dist/playwright/playwright/index.d.ts +1 -1
- package/dist/security/playwright/chat-privacy-helpers.d.ts +21 -6
- package/dist/security/playwright/index.d.ts +1 -1
- package/dist/web-containers/playwright/chat-privacy-helpers.d.ts +21 -6
- package/dist/web-containers/playwright/index.d.ts +1 -1
- package/dist/web-containers/source/index.esm.js +45266 -44577
- package/dist/web-containers/source/next/index.esm.js +44966 -44382
- package/dist/web-utils/playwright/chat-privacy-helpers.d.ts +21 -6
- package/dist/web-utils/playwright/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -73,10 +73,12 @@ export declare function expectChatPrivacySource(scope: Page | Locator, source: C
|
|
|
73
73
|
*/
|
|
74
74
|
export declare function expectChatPrivacyLocked(scope: Page | Locator, locked: boolean): Promise<void>;
|
|
75
75
|
/**
|
|
76
|
-
* Click the toggle. Covers
|
|
77
|
-
* - Off → on (
|
|
78
|
-
* - On (
|
|
79
|
-
*
|
|
76
|
+
* Click the toggle. Covers the no-dialog transitions:
|
|
77
|
+
* - Off → on (no user messages) → starts a fresh private session.
|
|
78
|
+
* - On → off (no user messages) → starts a fresh normal session.
|
|
79
|
+
* - On → off (user messages sent) → resumes history on the same session;
|
|
80
|
+
* `turnOffChatPrivacyMidSession` wraps this with the state assertion.
|
|
81
|
+
* Use `confirmEnableChatPrivacyMidSession` for the mid-conversation enable.
|
|
80
82
|
*/
|
|
81
83
|
export declare function clickChatPrivacyToggle(scope: Page | Locator): Promise<void>;
|
|
82
84
|
/** Locator for the AlertDialog content that the mid-session enable opens. */
|
|
@@ -86,10 +88,23 @@ export declare function expectChatPrivacyConfirmDialogOpen(scope: Page | Locator
|
|
|
86
88
|
* Mid-conversation enable flow:
|
|
87
89
|
* 1. Click the toggle (opens the confirm dialog).
|
|
88
90
|
* 2. Click the "Enable Incognito" action.
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
+
* Waits for any in-flight reply first (the toggle is `aria-disabled`
|
|
92
|
+
* meanwhile). Earlier messages stay in history and the flip is reversible
|
|
93
|
+
* (see `turnOffChatPrivacyMidSession`); the helper resolves once the dialog
|
|
94
|
+
* closes — which it also does when the backend refuses.
|
|
91
95
|
*/
|
|
92
96
|
export declare function confirmEnableChatPrivacyMidSession(scope: Page | Locator): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Mid-conversation turn-off: with Incognito on and user messages sent, one
|
|
99
|
+
* click POSTs `disable_chathistory: false` on the same session — no dialog —
|
|
100
|
+
* and history resumes. Resolves once the backend accepted the flip and the
|
|
101
|
+
* effective mode refetched; fails with the response status when it refuses.
|
|
102
|
+
* The toggle flips to `off` optimistically before the answer, so `data-state`
|
|
103
|
+
* alone proves nothing. It unmounts after a successful off on an agent with
|
|
104
|
+
* Never Incognito; that counts as off. A conversation that started in
|
|
105
|
+
* Incognito never gets here: its toggle is locked on.
|
|
106
|
+
*/
|
|
107
|
+
export declare function turnOffChatPrivacyMidSession(scope: Page | Locator): Promise<void>;
|
|
93
108
|
/** Cancel the confirm dialog without enabling. */
|
|
94
109
|
export declare function cancelEnableChatPrivacyMidSession(scope: Page | Locator): Promise<void>;
|
|
95
110
|
/**
|
|
@@ -27,7 +27,7 @@ export { getCurrentTenantShowPaywall, creditBalanceTrigger, creditBalancePanel,
|
|
|
27
27
|
export type { CreditBalancePlan } from './credit-balance-helpers';
|
|
28
28
|
export { PRIVACY_LABELS, isPrivacyTabVisible, switchToPrivacyTab, expectPrivacyFieldsHidden, expectPrivacyFieldsVisible, selectPrivacyAction, setBlockMessage, getEntityChip, setEntitySelected, expectEntitySelected, getOutputFilterSwitch, setOutputFilterEnabled, expectOutputFilterEnabled, } from './privacy-tab-helpers';
|
|
29
29
|
export type { PrivacyAction, PrivacyEntity } from './privacy-tab-helpers';
|
|
30
|
-
export { CHAT_PRIVACY_LABELS, getChatPrivacyToggle, expectChatPrivacyToggleVisible, expectChatPrivacyState, expectChatPrivacySource, expectChatPrivacyLocked, clickChatPrivacyToggle, getChatPrivacyConfirmDialog, expectChatPrivacyConfirmDialogOpen, confirmEnableChatPrivacyMidSession, cancelEnableChatPrivacyMidSession, isPrivateModeTabVisible, switchToPrivateModeTab, getPrivateModeCard, selectPrivateMode, expectPrivateModeSelected, expectPrivateModeTabReady, getTenantChatPrivacySwitch, getTenantChatPrivacyRow, expectTenantChatPrivacyVisible, expectTenantChatPrivacyEnabled, setTenantChatPrivacyEnabled, } from './chat-privacy-helpers';
|
|
30
|
+
export { CHAT_PRIVACY_LABELS, getChatPrivacyToggle, expectChatPrivacyToggleVisible, expectChatPrivacyState, expectChatPrivacySource, expectChatPrivacyLocked, clickChatPrivacyToggle, getChatPrivacyConfirmDialog, expectChatPrivacyConfirmDialogOpen, confirmEnableChatPrivacyMidSession, turnOffChatPrivacyMidSession, cancelEnableChatPrivacyMidSession, isPrivateModeTabVisible, switchToPrivateModeTab, getPrivateModeCard, selectPrivateMode, expectPrivateModeSelected, expectPrivateModeTabReady, getTenantChatPrivacySwitch, getTenantChatPrivacyRow, expectTenantChatPrivacyVisible, expectTenantChatPrivacyEnabled, setTenantChatPrivacyEnabled, } from './chat-privacy-helpers';
|
|
31
31
|
export type { ChatPrivacyMode, ChatPrivacySource, ChatPrivacyToggleState, } from './chat-privacy-helpers';
|
|
32
32
|
export { VOICE_LABELS, isVoiceTabVisible, switchToVoiceTab, switchToVoiceSubTab, getVoiceProviderCard, selectVoiceProvider, expectVoiceProviderSelected, openMentorVoicePicker, openCallConfigVoicePicker, previewMentorVoiceInline, previewCallConfigVoiceInline, expectMentorVoiceTriggerShows, expectCallConfigVoiceTriggerShows, searchVoices, getVoiceRow, expectVoiceVisible, selectVoice, previewVoice, openVoiceInstructionsEditor, setVoiceInstructions, expectVoiceInstructionsValue, applyVoiceInstructionsPreset, saveVoiceSettings, getCallConfigForm, expectCallConfigVisible, selectCallMode, setCallLanguage, selectLlmProvider, selectTtsProvider, selectSttProvider, expectTtsSelectDisabled, expectSttSelectDisabled, setUseFunctionCallingEnabled, setEnableVideo, saveCallConfig, resetCallConfig, } from './voice-tab-helpers';
|
|
33
33
|
export type { VoiceProvider, VoiceInstructionsPreset, CallMode, TtsProvider, SttProvider, LlmProvider, } from './voice-tab-helpers';
|
|
@@ -4164,10 +4164,12 @@ async function expectChatPrivacyLocked(scope, locked) {
|
|
|
4164
4164
|
}
|
|
4165
4165
|
}
|
|
4166
4166
|
/**
|
|
4167
|
-
* Click the toggle. Covers
|
|
4168
|
-
* - Off → on (
|
|
4169
|
-
* - On (
|
|
4170
|
-
*
|
|
4167
|
+
* Click the toggle. Covers the no-dialog transitions:
|
|
4168
|
+
* - Off → on (no user messages) → starts a fresh private session.
|
|
4169
|
+
* - On → off (no user messages) → starts a fresh normal session.
|
|
4170
|
+
* - On → off (user messages sent) → resumes history on the same session;
|
|
4171
|
+
* `turnOffChatPrivacyMidSession` wraps this with the state assertion.
|
|
4172
|
+
* Use `confirmEnableChatPrivacyMidSession` for the mid-conversation enable.
|
|
4171
4173
|
*/
|
|
4172
4174
|
async function clickChatPrivacyToggle(scope) {
|
|
4173
4175
|
const toggle = getChatPrivacyToggle(scope);
|
|
@@ -4192,10 +4194,17 @@ async function expectChatPrivacyConfirmDialogOpen(scope, open) {
|
|
|
4192
4194
|
* Mid-conversation enable flow:
|
|
4193
4195
|
* 1. Click the toggle (opens the confirm dialog).
|
|
4194
4196
|
* 2. Click the "Enable Incognito" action.
|
|
4195
|
-
*
|
|
4196
|
-
*
|
|
4197
|
+
* Waits for any in-flight reply first (the toggle is `aria-disabled`
|
|
4198
|
+
* meanwhile). Earlier messages stay in history and the flip is reversible
|
|
4199
|
+
* (see `turnOffChatPrivacyMidSession`); the helper resolves once the dialog
|
|
4200
|
+
* closes — which it also does when the backend refuses.
|
|
4197
4201
|
*/
|
|
4198
4202
|
async function confirmEnableChatPrivacyMidSession(scope) {
|
|
4203
|
+
// The toggle is aria-disabled while a reply is in flight (an enable before
|
|
4204
|
+
// the first turn is saved would drop the conversation from history).
|
|
4205
|
+
await test$1.expect(getChatPrivacyToggle(scope)).not.toHaveAttribute('aria-disabled', 'true', {
|
|
4206
|
+
timeout: 120000,
|
|
4207
|
+
});
|
|
4199
4208
|
await clickChatPrivacyToggle(scope);
|
|
4200
4209
|
const page = asPage$7(scope);
|
|
4201
4210
|
await expectChatPrivacyConfirmDialogOpen(page, true);
|
|
@@ -4206,6 +4215,37 @@ async function confirmEnableChatPrivacyMidSession(scope) {
|
|
|
4206
4215
|
await expectChatPrivacyConfirmDialogOpen(page, false);
|
|
4207
4216
|
logger.info('Confirmed mid-session Incognito enable');
|
|
4208
4217
|
}
|
|
4218
|
+
/**
|
|
4219
|
+
* Mid-conversation turn-off: with Incognito on and user messages sent, one
|
|
4220
|
+
* click POSTs `disable_chathistory: false` on the same session — no dialog —
|
|
4221
|
+
* and history resumes. Resolves once the backend accepted the flip and the
|
|
4222
|
+
* effective mode refetched; fails with the response status when it refuses.
|
|
4223
|
+
* The toggle flips to `off` optimistically before the answer, so `data-state`
|
|
4224
|
+
* alone proves nothing. It unmounts after a successful off on an agent with
|
|
4225
|
+
* Never Incognito; that counts as off. A conversation that started in
|
|
4226
|
+
* Incognito never gets here: its toggle is locked on.
|
|
4227
|
+
*/
|
|
4228
|
+
async function turnOffChatPrivacyMidSession(scope) {
|
|
4229
|
+
const page = asPage$7(scope);
|
|
4230
|
+
const toggle = getChatPrivacyToggle(scope);
|
|
4231
|
+
await test$1.expect(toggle).not.toHaveAttribute('aria-disabled', 'true', { timeout: 120000 });
|
|
4232
|
+
const flip = page.waitForResponse((r) => {
|
|
4233
|
+
var _a;
|
|
4234
|
+
return r.request().method() === 'POST' &&
|
|
4235
|
+
r.url().includes('/disable-chathistory/') &&
|
|
4236
|
+
((_a = r.request().postDataJSON()) === null || _a === void 0 ? void 0 : _a.disable_chathistory) === false;
|
|
4237
|
+
}, { timeout: 30000 });
|
|
4238
|
+
await clickChatPrivacyToggle(scope);
|
|
4239
|
+
const response = await flip;
|
|
4240
|
+
test$1.expect(response.status(), 'disable-chathistory false was refused').toBe(200);
|
|
4241
|
+
await test$1.expect(async () => {
|
|
4242
|
+
if ((await toggle.count()) === 0)
|
|
4243
|
+
return;
|
|
4244
|
+
await test$1.expect(toggle).toHaveAttribute('data-state', 'off', { timeout: 1000 });
|
|
4245
|
+
await test$1.expect(toggle).not.toHaveAttribute('data-source', 'session', { timeout: 1000 });
|
|
4246
|
+
}).toPass({ timeout: 30000 });
|
|
4247
|
+
logger.info('Turned Incognito off mid-session');
|
|
4248
|
+
}
|
|
4209
4249
|
/** Cancel the confirm dialog without enabling. */
|
|
4210
4250
|
async function cancelEnableChatPrivacyMidSession(scope) {
|
|
4211
4251
|
const page = asPage$7(scope);
|
|
@@ -9307,6 +9347,7 @@ exports.toggleSandboxKind = toggleSandboxKind;
|
|
|
9307
9347
|
exports.toggleSkill = toggleSkill;
|
|
9308
9348
|
exports.toggleUserMemoryAdminSetting = toggleUserMemoryAdminSetting;
|
|
9309
9349
|
exports.toolFields = toolFields;
|
|
9350
|
+
exports.turnOffChatPrivacyMidSession = turnOffChatPrivacyMidSession;
|
|
9310
9351
|
exports.uploadAssetResource = uploadAssetResource;
|
|
9311
9352
|
exports.uploadQaCsv = uploadQaCsv;
|
|
9312
9353
|
exports.userSpendLimitRow = userSpendLimitRow;
|