test: inspect top-level SuperAPI skill cards
This commit is contained in:
@@ -461,15 +461,15 @@ export default async function superApiManagementSmoke({ page, goto, wait, screen
|
||||
summary: element.querySelector("span")?.textContent?.trim() || "",
|
||||
})));
|
||||
const skillNodes = await requestPanel
|
||||
.locator('[data-section-id="skills"] > .readable-tree > .readable-node > summary')
|
||||
.locator('[data-section-id="skills"] > .readable-section-body > .readable-node > summary')
|
||||
.evaluateAll((elements) => elements.map((element) => ({
|
||||
label: element.querySelector("strong")?.textContent?.trim() || "",
|
||||
source: element.parentElement?.getAttribute("data-node-type") || "",
|
||||
})));
|
||||
const skillNodeCount = await requestPanel.locator('[data-section-id="skills"] .readable-node').count();
|
||||
const toolNodeCount = await requestPanel.locator('[data-section-id="tools"] .readable-node').count();
|
||||
const namespaceNodeCount = await requestPanel.locator('[data-section-id="mcpNamespaces"] .readable-node').count();
|
||||
const inputItemNodeCount = await requestPanel.locator('[data-section-id="inputItems"] .readable-node').count();
|
||||
const skillNodeCount = await requestPanel.locator('[data-section-id="skills"] > .readable-section-body > .readable-node').count();
|
||||
const toolNodeCount = await requestPanel.locator('[data-section-id="tools"] > .readable-section-body > .readable-node').count();
|
||||
const namespaceNodeCount = await requestPanel.locator('[data-section-id="mcpNamespaces"] > .readable-section-body > .readable-node').count();
|
||||
const inputItemNodeCount = await requestPanel.locator('[data-section-id="inputItems"] > .readable-section-body > .readable-node').count();
|
||||
if (skillNodeCount > 0) await skillNode.locator("summary").first().click();
|
||||
if (toolNodeCount > 0) await toolNode.locator("summary").first().click();
|
||||
if (namespaceNodeCount > 0) await namespaceNode.locator("summary").first().click();
|
||||
|
||||
Reference in New Issue
Block a user