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();
|
expect(isCheckedAgainAgain).toBeFalsy();
|
||||||
|
|
||||||
// Select first action
|
// Select first action
|
||||||
await page
|
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"]')
|
.locator('input[data-ref="eInput"]')
|
||||||
.last()
|
.last()
|
||||||
.scrollIntoViewIfNeeded();
|
.getAttribute("id")) &&
|
||||||
await page.locator('input[data-ref="eInput"]').last().click();
|
count < 20
|
||||||
await page.waitForTimeout(1000);
|
) {
|
||||||
|
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);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
const isLastChecked = await page
|
const isLastChecked = await page
|
||||||
|
|
@ -113,16 +125,22 @@ test(
|
||||||
|
|
||||||
expect(isLastChecked).toBeTruthy();
|
expect(isLastChecked).toBeTruthy();
|
||||||
|
|
||||||
|
await page
|
||||||
|
.getByRole("gridcell")
|
||||||
|
.nth(cellsCount - 1)
|
||||||
|
.click();
|
||||||
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
await page.locator('[data-testid="input_update_name"]').isVisible(),
|
await page.locator('[data-testid="input_update_name"]').isVisible(),
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
|
|
||||||
await page.getByTestId("input_update_name").fill("mcp test name");
|
await page.getByTestId("input_update_name").fill("mcp test name");
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
// Close the modal
|
// Close the modal
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
// Verify the selected action is visible in the tab
|
// Verify the selected action is visible in the tab
|
||||||
await expect(page.getByTestId("div-mcp-server-tools")).toBeVisible();
|
await expect(page.getByTestId("div-mcp-server-tools")).toBeVisible();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue