Refactor: inputListComponent.spec.ts to improve test reliability and performance (#4859)
* Refactor inputListComponent.spec.ts to improve test reliability and performance * Refactor: update intComponent tests for improved reliability and performance (#4860) * Refactor inputListComponent.spec.ts to improve test reliability and performance * Refactor IntComponent test to improve search reliability and performance * Refactor test grep pattern to fix syntax error * debuging ci * Refactor test grep pattern to fix syntax error and improve test reliability and performance
This commit is contained in:
parent
cf30b88a91
commit
5d2de860e5
3 changed files with 18 additions and 8 deletions
|
|
@ -5,7 +5,6 @@ test(
|
|||
{ tag: ["@release", "@workspace"] },
|
||||
async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
|
|
@ -19,7 +18,9 @@ test(
|
|||
|
||||
while (modalCount === 0) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +28,9 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("url");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[data-testid="dataURL"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("dataURL")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ test("IntComponent", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|||
|
||||
while (modalCount === 0) {
|
||||
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();
|
||||
}
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
|
|
@ -32,7 +34,9 @@ test("IntComponent", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("openai");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[data-testid="modelsOpenAI"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("modelsOpenAI")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue