@iblai/iblai-js 2.7.4 → 2.7.6

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.
@@ -817,15 +817,17 @@ declare function addSkillToAgent(page: Page, skillName: string): Promise<void>;
817
817
  */
818
818
  declare function verifySkillAdded(page: Page, skillName: string): Promise<void>;
819
819
  /**
820
- * Open the three-dots actions menu for a skill row on the active sub-tab.
821
- * Agent-tab rows offer "Remove from Agent" only; catalog rows offer
822
- * Edit/Delete (for editable skills). The menu content portals to
823
- * document.body, so the returned locator is page-level by design.
820
+ * Open the three-dots actions menu for a CATALOG skill row (Edit/Delete on
821
+ * editable skills). Agent-tab rows have no menu detaching is a direct
822
+ * "Remove" button there (see `removeSkillFromAgent`). The menu content
823
+ * portals to document.body, so the returned locator is page-level by design.
824
824
  */
825
825
  declare function openSkillActionsMenu(page: Page, skillName: string): Promise<Locator>;
826
826
  /**
827
- * Detach a skill from the agent via its row menu ("Remove from Agent") on the
828
- * "Agent Skills" sub-tab. Waits for the toast and for the row to disappear.
827
+ * Detach a skill from the agent via its row's direct "Remove" button on the
828
+ * "Agent Skills" sub-tab (the visible text is just "Remove"; the button's
829
+ * accessible name carries the skill, mirroring the catalog's Add button).
830
+ * Waits for the toast confirming the detach.
829
831
  */
830
832
  declare function removeSkillFromAgent(page: Page, skillName: string): Promise<void>;
831
833
  /**
@@ -2917,10 +2917,10 @@ async function verifySkillAdded(page, skillName) {
2917
2917
  logger.info(`Skill "${skillName}" shows as Added`);
2918
2918
  }
2919
2919
  /**
2920
- * Open the three-dots actions menu for a skill row on the active sub-tab.
2921
- * Agent-tab rows offer "Remove from Agent" only; catalog rows offer
2922
- * Edit/Delete (for editable skills). The menu content portals to
2923
- * document.body, so the returned locator is page-level by design.
2920
+ * Open the three-dots actions menu for a CATALOG skill row (Edit/Delete on
2921
+ * editable skills). Agent-tab rows have no menu detaching is a direct
2922
+ * "Remove" button there (see `removeSkillFromAgent`). The menu content
2923
+ * portals to document.body, so the returned locator is page-level by design.
2924
2924
  */
2925
2925
  async function openSkillActionsMenu(page, skillName) {
2926
2926
  const actionsButton = page.getByRole('button', { name: `${skillName} actions` });
@@ -2931,12 +2931,17 @@ async function openSkillActionsMenu(page, skillName) {
2931
2931
  return menu;
2932
2932
  }
2933
2933
  /**
2934
- * Detach a skill from the agent via its row menu ("Remove from Agent") on the
2935
- * "Agent Skills" sub-tab. Waits for the toast and for the row to disappear.
2934
+ * Detach a skill from the agent via its row's direct "Remove" button on the
2935
+ * "Agent Skills" sub-tab (the visible text is just "Remove"; the button's
2936
+ * accessible name carries the skill, mirroring the catalog's Add button).
2937
+ * Waits for the toast confirming the detach.
2936
2938
  */
2937
2939
  async function removeSkillFromAgent(page, skillName) {
2938
- const menu = await openSkillActionsMenu(page, skillName);
2939
- await menu.getByRole('menuitem', { name: /Remove from Agent/i }).click();
2940
+ const removeButton = page.getByRole('button', {
2941
+ name: `Remove ${skillName} from this agent`,
2942
+ });
2943
+ await expect(removeButton).toBeVisible({ timeout: 10000 });
2944
+ await removeButton.click();
2940
2945
  await expect(page.getByText(`${skillName} removed`, { exact: false })).toBeVisible({
2941
2946
  timeout: 10000,
2942
2947
  });