@iblai/iblai-js 2.7.4 → 2.7.5

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.
@@ -55,15 +55,17 @@ export declare function addSkillToAgent(page: Page, skillName: string): Promise<
55
55
  */
56
56
  export declare function verifySkillAdded(page: Page, skillName: string): Promise<void>;
57
57
  /**
58
- * Open the three-dots actions menu for a skill row on the active sub-tab.
59
- * Agent-tab rows offer "Remove from Agent" only; catalog rows offer
60
- * Edit/Delete (for editable skills). The menu content portals to
61
- * document.body, so the returned locator is page-level by design.
58
+ * Open the three-dots actions menu for a CATALOG skill row (Edit/Delete on
59
+ * editable skills). Agent-tab rows have no menu detaching is a direct
60
+ * "Remove" button there (see `removeSkillFromAgent`). The menu content
61
+ * portals to document.body, so the returned locator is page-level by design.
62
62
  */
63
63
  export declare function openSkillActionsMenu(page: Page, skillName: string): Promise<Locator>;
64
64
  /**
65
- * Detach a skill from the agent via its row menu ("Remove from Agent") on the
66
- * "Agent Skills" sub-tab. Waits for the toast and for the row to disappear.
65
+ * Detach a skill from the agent via its row's direct "Remove" button on the
66
+ * "Agent Skills" sub-tab (the visible text is just "Remove"; the button's
67
+ * accessible name carries the skill, mirroring the catalog's Add button).
68
+ * Waits for the toast confirming the detach.
67
69
  */
68
70
  export declare function removeSkillFromAgent(page: Page, skillName: string): Promise<void>;
69
71
  /**
@@ -2918,10 +2918,10 @@ async function verifySkillAdded(page, skillName) {
2918
2918
  logger.info(`Skill "${skillName}" shows as Added`);
2919
2919
  }
2920
2920
  /**
2921
- * Open the three-dots actions menu for a skill row on the active sub-tab.
2922
- * Agent-tab rows offer "Remove from Agent" only; catalog rows offer
2923
- * Edit/Delete (for editable skills). The menu content portals to
2924
- * document.body, so the returned locator is page-level by design.
2921
+ * Open the three-dots actions menu for a CATALOG skill row (Edit/Delete on
2922
+ * editable skills). Agent-tab rows have no menu detaching is a direct
2923
+ * "Remove" button there (see `removeSkillFromAgent`). The menu content
2924
+ * portals to document.body, so the returned locator is page-level by design.
2925
2925
  */
2926
2926
  async function openSkillActionsMenu(page, skillName) {
2927
2927
  const actionsButton = page.getByRole('button', { name: `${skillName} actions` });
@@ -2932,12 +2932,17 @@ async function openSkillActionsMenu(page, skillName) {
2932
2932
  return menu;
2933
2933
  }
2934
2934
  /**
2935
- * Detach a skill from the agent via its row menu ("Remove from Agent") on the
2936
- * "Agent Skills" sub-tab. Waits for the toast and for the row to disappear.
2935
+ * Detach a skill from the agent via its row's direct "Remove" button on the
2936
+ * "Agent Skills" sub-tab (the visible text is just "Remove"; the button's
2937
+ * accessible name carries the skill, mirroring the catalog's Add button).
2938
+ * Waits for the toast confirming the detach.
2937
2939
  */
2938
2940
  async function removeSkillFromAgent(page, skillName) {
2939
- const menu = await openSkillActionsMenu(page, skillName);
2940
- await menu.getByRole('menuitem', { name: /Remove from Agent/i }).click();
2941
+ const removeButton = page.getByRole('button', {
2942
+ name: `Remove ${skillName} from this agent`,
2943
+ });
2944
+ await test$1.expect(removeButton).toBeVisible({ timeout: 10000 });
2945
+ await removeButton.click();
2941
2946
  await test$1.expect(page.getByText(`${skillName} removed`, { exact: false })).toBeVisible({
2942
2947
  timeout: 10000,
2943
2948
  });