@iblai/iblai-js 2.6.1 → 2.7.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.
@@ -183,4 +183,35 @@ export declare function setupSandboxInstance(page: Page, instance: {
183
183
  * then delete it from the table.
184
184
  */
185
185
  export declare function teardownSandboxInstance(page: Page, instanceName: string): Promise<void>;
186
+ /** The three sandbox kinds selectable on the Sandbox tab. Mutually exclusive —
187
+ * enabling one turns off whichever kind was enabled before. */
188
+ export type SandboxKind = 'computational-runtime' | 'virtual-machine' | 'claw';
189
+ /**
190
+ * Verify the sandbox kind selector shows all three kind switches
191
+ * (Computing Runtime, Virtual Machine Shell, Claw).
192
+ */
193
+ export declare function verifySandboxKindsVisible(page: Page): Promise<void>;
194
+ /** Read whether a sandbox kind switch is currently on. Waits for the switch to
195
+ * render first so a not-yet-mounted selector never reads as "off". */
196
+ export declare function isSandboxKindEnabled(page: Page, kind: SandboxKind): Promise<boolean>;
197
+ /**
198
+ * Toggle a sandbox kind switch. The kinds are mutually exclusive: enabling one
199
+ * turns off whichever kind was enabled before in the same request; disabling
200
+ * the active kind leaves none enabled. Deterministic completion signals: the
201
+ * switch's own aria-checked state flipping to the target value, then the save
202
+ * toast.
203
+ */
204
+ export declare function toggleSandboxKind(page: Page, kind: SandboxKind): Promise<void>;
205
+ /**
206
+ * Verify the Claw instance section renders below the kind selector — either
207
+ * state qualifies: the not-connected instance table (its search box) or the
208
+ * connected-instance card. Only shown while the Claw kind is enabled.
209
+ */
210
+ export declare function verifyClawSectionVisible(page: Page): Promise<void>;
211
+ /**
212
+ * Verify the Claw instance section is absent — the state while Claw is not the
213
+ * selected kind. Anchors on the kind selector first so "section missing" can
214
+ * never be confused with "tab not rendered yet".
215
+ */
216
+ export declare function verifyClawSectionHidden(page: Page): Promise<void>;
186
217
  export {};
@@ -18,8 +18,8 @@ export type { ReportDownloadOptions } from './report-download';
18
18
  export { isMemoryTabVisible, switchToMemoryTab, verifyMemoryTabSettings, verifyMemoryTabMemoriesList, openAddMemoryDialog, toggleMemorySwitch, addMemory, deleteFirstMemory, deleteMemoryByContent, archiveFirstMemory, archiveMemoryByContent, getMemoryCount, verifyMemoryExists, verifyMemoryNotExists, } from './memory-test-helpers';
19
19
  export { MEMORY_ADMIN_LABELS, memoryAdminGlobalSection, memoryAdminAgentSection, memoryAdminUserRow, memoryAdminAgentRow, memoryRowByContent, isTenantMemoryTabVisible, switchToTenantMemoryTab, switchToMemoryAdminSubTab, searchMemoryAdminUsers, openUserMemoriesPopup, closeUserMemoriesPopup, addUserGlobalMemory, editUserGlobalMemory, deleteUserGlobalMemory, toggleUserMemoryAdminSetting, filterAgentMemories, clearAgentMemoriesFilter, openAgentMemoriesPopup, closeAgentMemoriesPopup, addAgentMemoryFromPopup, } from './memory-admin-helpers';
20
20
  export type { MemoryAdminSubTab, MemoryAdminSetting } from './memory-admin-helpers';
21
- export { isSandboxTabVisible, switchToSandboxTab, verifyInstanceTableVisible, getInstanceRowCount, verifyInstanceTableEmpty, searchInstances, clearInstanceSearch, openInstanceActionsMenu, openNewInstanceDialog, createInstance, cancelNewInstanceDialog, openEditInstanceDialog, editInstance, deleteInstance, cancelDeleteInstance, connectToInstance, disconnectInstance, cancelDisconnectInstance, runInstanceChecks, runConnectedInstanceChecks, getInstanceHealthLabel, getInstanceStatusLabel, verifyConnectDisabledForUnhealthy, verifyConnectedInstanceCard, toggleAutoPush, pushConfiguration, openLLMProviderPicker, selectLLMModel, getCurrentModel, verifyAgentConfigPromptsVisible, openAgentPromptEditModal, editAgentPrompt, setupSandboxInstance, teardownSandboxInstance, } from './claw-sandbox-helpers';
22
- export type { AgentPromptField } from './claw-sandbox-helpers';
21
+ export { isSandboxTabVisible, switchToSandboxTab, verifyInstanceTableVisible, getInstanceRowCount, verifyInstanceTableEmpty, searchInstances, clearInstanceSearch, openInstanceActionsMenu, openNewInstanceDialog, createInstance, cancelNewInstanceDialog, openEditInstanceDialog, editInstance, deleteInstance, cancelDeleteInstance, connectToInstance, disconnectInstance, cancelDisconnectInstance, runInstanceChecks, runConnectedInstanceChecks, getInstanceHealthLabel, getInstanceStatusLabel, verifyConnectDisabledForUnhealthy, verifyConnectedInstanceCard, toggleAutoPush, pushConfiguration, openLLMProviderPicker, selectLLMModel, getCurrentModel, verifyAgentConfigPromptsVisible, openAgentPromptEditModal, editAgentPrompt, setupSandboxInstance, teardownSandboxInstance, verifySandboxKindsVisible, isSandboxKindEnabled, toggleSandboxKind, verifyClawSectionVisible, verifyClawSectionHidden, } from './claw-sandbox-helpers';
22
+ export type { AgentPromptField, SandboxKind } from './claw-sandbox-helpers';
23
23
  export { switchToSkillsTab, verifySkillsTabVisible, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, goToSkillsListPage, verifySkillsEmptyState, verifyAgentSkillsEmptyState, getSkillRowCount, verifySkillVisible, addSkillToAgent, verifySkillAdded, removeSkillFromAgent, isSkillEnabled, enableSkill, disableSkill, toggleSkill, setCatalogSkillEnabled, openNewSkillDialog, createSkill, openSkillActionsMenu, openEditSkillDialog, editSkill, deleteSkill, cancelDeleteSkill, switchToSkillResourcesSubTab, addTextResource, uploadAssetResource, editTextResource, deleteResource, openSlashSkillPicker, selectSlashSkill, } from './agent-skills-helpers';
24
24
  export type { SkillFormValues, TextResourceValues } from './agent-skills-helpers';
25
25
  export { navigateToAuditLog, verifyAuditLogTableVisible, getAuditLogRowCount, verifyAuditLogEntryStructure, verifyAuditLogEmptyState, verifyAuditLogPermissionError, verifyAuditLogGenericError, verifyAuditLogLoading, waitForAuditLogDataLoaded, filterByAction, filterByActor, getAvailableActors, filterByDateRange, clearDateRangeFilter, getPaginationInfo, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, goToPage, verifyCurrentPage, isOnLastPage, isOnFirstPage, navigateToAuditLogAndWaitForData, filterByActionAndVerify, filterByActorAndVerify, } from './audit-log-helpers';
@@ -2160,7 +2160,10 @@ async function switchToSandboxTab(page) {
2160
2160
  const tab = page.getByRole('tab', { name: 'Sandbox', exact: true });
2161
2161
  await test$1.expect(tab).toBeVisible({ timeout: 10000 });
2162
2162
  await tab.click();
2163
- await test$1.expect(page.getByRole('heading', { name: 'Sandbox' }).or(page.getByText('Sandbox'))).toBeVisible({ timeout: 10000 });
2163
+ // The Sandbox Type selector always renders (regardless of which kind is on),
2164
+ // so its Claw switch is a solid, unambiguous "panel is ready" signal — unlike
2165
+ // text matches on "Sandbox", which collide with the tab label itself.
2166
+ await test$1.expect(page.getByTestId('sandbox-kind-claw')).toBeVisible({ timeout: 10000 });
2164
2167
  logger.info('Switched to Sandbox tab');
2165
2168
  }
2166
2169
  // ============================
@@ -2689,6 +2692,72 @@ async function teardownSandboxInstance(page, instanceName) {
2689
2692
  await deleteInstance(page, instanceName);
2690
2693
  logger.info(`Sandbox teardown complete for "${instanceName}"`);
2691
2694
  }
2695
+ function getSandboxKindSwitch(page, kind) {
2696
+ return page.getByTestId(`sandbox-kind-${kind}`);
2697
+ }
2698
+ /**
2699
+ * Verify the sandbox kind selector shows all three kind switches
2700
+ * (Computing Runtime, Virtual Machine Shell, Claw).
2701
+ */
2702
+ async function verifySandboxKindsVisible(page) {
2703
+ await test$1.expect(getSandboxKindSwitch(page, 'computational-runtime')).toBeVisible({
2704
+ timeout: 10000,
2705
+ });
2706
+ await test$1.expect(getSandboxKindSwitch(page, 'virtual-machine')).toBeVisible();
2707
+ await test$1.expect(getSandboxKindSwitch(page, 'claw')).toBeVisible();
2708
+ logger.info('Sandbox kind switches are visible');
2709
+ }
2710
+ /** Read whether a sandbox kind switch is currently on. Waits for the switch to
2711
+ * render first so a not-yet-mounted selector never reads as "off". */
2712
+ async function isSandboxKindEnabled(page, kind) {
2713
+ const kindSwitch = getSandboxKindSwitch(page, kind);
2714
+ await test$1.expect(kindSwitch).toBeVisible({ timeout: 10000 });
2715
+ const state = await kindSwitch.getAttribute('aria-checked');
2716
+ return state === 'true';
2717
+ }
2718
+ /**
2719
+ * Toggle a sandbox kind switch. The kinds are mutually exclusive: enabling one
2720
+ * turns off whichever kind was enabled before in the same request; disabling
2721
+ * the active kind leaves none enabled. Deterministic completion signals: the
2722
+ * switch's own aria-checked state flipping to the target value, then the save
2723
+ * toast.
2724
+ */
2725
+ async function toggleSandboxKind(page, kind) {
2726
+ const kindSwitch = getSandboxKindSwitch(page, kind);
2727
+ await test$1.expect(kindSwitch).toBeVisible({ timeout: 10000 });
2728
+ await test$1.expect(kindSwitch).toBeEnabled({ timeout: 10000 });
2729
+ const wasEnabled = (await kindSwitch.getAttribute('aria-checked')) === 'true';
2730
+ await kindSwitch.click();
2731
+ // The switch flips optimistically; waiting on its state pins the click as
2732
+ // registered before we wait on the toast (which can render more than once).
2733
+ await test$1.expect(kindSwitch).toHaveAttribute('aria-checked', String(!wasEnabled), {
2734
+ timeout: 10000,
2735
+ });
2736
+ await test$1.expect(page.getByText('Sandbox type updated').first()).toBeVisible({ timeout: 10000 });
2737
+ logger.info(`Toggled sandbox kind "${kind}" ${wasEnabled ? 'off' : 'on'}`);
2738
+ }
2739
+ /**
2740
+ * Verify the Claw instance section renders below the kind selector — either
2741
+ * state qualifies: the not-connected instance table (its search box) or the
2742
+ * connected-instance card. Only shown while the Claw kind is enabled.
2743
+ */
2744
+ async function verifyClawSectionVisible(page) {
2745
+ const instanceSearch = page.getByPlaceholder('Search instances...');
2746
+ const connectedCard = page.getByText('Connected Instance');
2747
+ await test$1.expect(instanceSearch.or(connectedCard)).toBeVisible({ timeout: 15000 });
2748
+ logger.info('Claw section is visible');
2749
+ }
2750
+ /**
2751
+ * Verify the Claw instance section is absent — the state while Claw is not the
2752
+ * selected kind. Anchors on the kind selector first so "section missing" can
2753
+ * never be confused with "tab not rendered yet".
2754
+ */
2755
+ async function verifyClawSectionHidden(page) {
2756
+ await test$1.expect(getSandboxKindSwitch(page, 'claw')).toBeVisible({ timeout: 10000 });
2757
+ await test$1.expect(page.getByPlaceholder('Search instances...')).not.toBeVisible();
2758
+ await test$1.expect(page.getByText('Connected Instance')).not.toBeVisible();
2759
+ logger.info('Claw section is hidden');
2760
+ }
2692
2761
 
2693
2762
  // Agent Skills helpers — the Skills section of the edit-agent dialog
2694
2763
  // ("Agent Skills" / "Available Skills" sub-tabs, skill CRUD with the
@@ -9042,6 +9111,7 @@ exports.isOnFirstPage = isOnFirstPage;
9042
9111
  exports.isOnLastPage = isOnLastPage;
9043
9112
  exports.isPrivacyTabVisible = isPrivacyTabVisible;
9044
9113
  exports.isPrivateModeTabVisible = isPrivateModeTabVisible;
9114
+ exports.isSandboxKindEnabled = isSandboxKindEnabled;
9045
9115
  exports.isSandboxTabVisible = isSandboxTabVisible;
9046
9116
  exports.isScreenShareTabVisible = isScreenShareTabVisible;
9047
9117
  exports.isSkillEnabled = isSkillEnabled;
@@ -9228,6 +9298,7 @@ exports.teardownSandboxInstance = teardownSandboxInstance;
9228
9298
  exports.test = test;
9229
9299
  exports.toggleAutoPush = toggleAutoPush;
9230
9300
  exports.toggleMemorySwitch = toggleMemorySwitch;
9301
+ exports.toggleSandboxKind = toggleSandboxKind;
9231
9302
  exports.toggleSkill = toggleSkill;
9232
9303
  exports.toggleUserMemoryAdminSetting = toggleUserMemoryAdminSetting;
9233
9304
  exports.toolFields = toolFields;
@@ -9242,6 +9313,8 @@ exports.verifyAuditLogGenericError = verifyAuditLogGenericError;
9242
9313
  exports.verifyAuditLogLoading = verifyAuditLogLoading;
9243
9314
  exports.verifyAuditLogPermissionError = verifyAuditLogPermissionError;
9244
9315
  exports.verifyAuditLogTableVisible = verifyAuditLogTableVisible;
9316
+ exports.verifyClawSectionHidden = verifyClawSectionHidden;
9317
+ exports.verifyClawSectionVisible = verifyClawSectionVisible;
9245
9318
  exports.verifyConnectDisabledForUnhealthy = verifyConnectDisabledForUnhealthy;
9246
9319
  exports.verifyConnectedInstanceCard = verifyConnectedInstanceCard;
9247
9320
  exports.verifyCurrentPage = verifyCurrentPage;
@@ -9255,6 +9328,7 @@ exports.verifyMemoryNotExists = verifyMemoryNotExists;
9255
9328
  exports.verifyMemoryTabMemoriesList = verifyMemoryTabMemoriesList;
9256
9329
  exports.verifyMemoryTabSettings = verifyMemoryTabSettings;
9257
9330
  exports.verifyPreparingPhase = verifyPreparingPhase;
9331
+ exports.verifySandboxKindsVisible = verifySandboxKindsVisible;
9258
9332
  exports.verifySkillAdded = verifySkillAdded;
9259
9333
  exports.verifySkillVisible = verifySkillVisible;
9260
9334
  exports.verifySkillsEmptyState = verifySkillsEmptyState;