refactor: Remove unnecessary wait timeouts in chatInputOutputUser-shard-1.spec.ts (#5126)
fix: Remove unnecessary wait timeouts in chatInputOutputUser-shard-1.spec.ts
This commit is contained in:
parent
3e5ab7e0f5
commit
5a42c82fc4
1 changed files with 3 additions and 6 deletions
|
|
@ -17,8 +17,6 @@ test(
|
||||||
|
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
let modalCount = 0;
|
let modalCount = 0;
|
||||||
try {
|
try {
|
||||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||||
|
|
@ -31,7 +29,9 @@ test(
|
||||||
|
|
||||||
while (modalCount === 0) {
|
while (modalCount === 0) {
|
||||||
await page.getByText("New Flow", { exact: true }).click();
|
await page.getByText("New Flow", { exact: true }).click();
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||||
|
timeout: 3000,
|
||||||
|
});
|
||||||
modalCount = await page.getByTestId("modal-title")?.count();
|
modalCount = await page.getByTestId("modal-title")?.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,14 +52,12 @@ test(
|
||||||
|
|
||||||
while (outdatedComponents > 0) {
|
while (outdatedComponents > 0) {
|
||||||
await page.getByTestId("icon-AlertTriangle").first().click();
|
await page.getByTestId("icon-AlertTriangle").first().click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();
|
outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();
|
||||||
}
|
}
|
||||||
|
|
||||||
let filledApiKey = await page.getByTestId("remove-icon-badge").count();
|
let filledApiKey = await page.getByTestId("remove-icon-badge").count();
|
||||||
while (filledApiKey > 0) {
|
while (filledApiKey > 0) {
|
||||||
await page.getByTestId("remove-icon-badge").first().click();
|
await page.getByTestId("remove-icon-badge").first().click();
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
filledApiKey = await page.getByTestId("remove-icon-badge").count();
|
filledApiKey = await page.getByTestId("remove-icon-badge").count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,7 +71,6 @@ test(
|
||||||
await page.getByTestId("dropdown_str_model_name").click();
|
await page.getByTestId("dropdown_str_model_name").click();
|
||||||
await page.getByTestId("gpt-4o-1-option").click();
|
await page.getByTestId("gpt-4o-1-option").click();
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
await page.getByTestId("button_run_chat output").last().click();
|
await page.getByTestId("button_run_chat output").last().click();
|
||||||
|
|
||||||
await page.waitForSelector("text=built successfully", { timeout: 30000 });
|
await page.waitForSelector("text=built successfully", { timeout: 30000 });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue