fix: mcp test when there are a lot of flows (#8197)
This commit is contained in:
parent
5872826985
commit
1670330868
1 changed files with 30 additions and 12 deletions
|
|
@ -93,17 +93,29 @@ test(
|
|||
expect(isCheckedAgainAgain).toBeFalsy();
|
||||
|
||||
// Select first action
|
||||
await page
|
||||
.locator('input[data-ref="eInput"]')
|
||||
.last()
|
||||
.scrollIntoViewIfNeeded();
|
||||
await page.locator('input[data-ref="eInput"]').last().click();
|
||||
await page.waitForTimeout(1000);
|
||||
let element = page.locator('input[data-ref="eInput"]').last();
|
||||
let elementText = await element.getAttribute("id");
|
||||
|
||||
await element.scrollIntoViewIfNeeded();
|
||||
|
||||
let count = 0;
|
||||
|
||||
while (
|
||||
elementText !==
|
||||
(await page
|
||||
.locator('input[data-ref="eInput"]')
|
||||
.last()
|
||||
.getAttribute("id")) &&
|
||||
count < 20
|
||||
) {
|
||||
element = page.locator('input[data-ref="eInput"]').last();
|
||||
elementText = await element.getAttribute("id");
|
||||
await element.scrollIntoViewIfNeeded();
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
|
||||
await page.locator('input[data-ref="eInput"]').last().click();
|
||||
|
||||
await page
|
||||
.getByRole("gridcell")
|
||||
.nth(cellsCount - 1)
|
||||
.click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
const isLastChecked = await page
|
||||
|
|
@ -113,16 +125,22 @@ test(
|
|||
|
||||
expect(isLastChecked).toBeTruthy();
|
||||
|
||||
await page
|
||||
.getByRole("gridcell")
|
||||
.nth(cellsCount - 1)
|
||||
.click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
expect(
|
||||
await page.locator('[data-testid="input_update_name"]').isVisible(),
|
||||
).toBe(true);
|
||||
|
||||
await page.getByTestId("input_update_name").fill("mcp test name");
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Close the modal
|
||||
await page.getByText("Close").last().click();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Verify the selected action is visible in the tab
|
||||
await expect(page.getByTestId("div-mcp-server-tools")).toBeVisible();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue