Skip to content

Commit

Permalink
✨ (codeAreaModalComponent.spec.ts): add a delay of 1000ms to ensure p…
Browse files Browse the repository at this point in the history
…roper execution of drag and drop action in the test

🔧 (youtube-transcripts.spec.ts): introduce a loop to handle multiple instances of outdated components before proceeding with the test execution
  • Loading branch information
Cristhianzl committed Nov 12, 2024
1 parent 12bbb6a commit fe0cfb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/tests/core/unit/codeAreaModalComponent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ test("CodeAreaModalComponent", async ({ page }) => {
await page.getByTestId("sidebar-legacy-switch").isVisible({ timeout: 5000 });
await page.getByTestId("sidebar-legacy-switch").click();

await page.waitForTimeout(1000);

await page
.getByTestId("prototypesPython Function")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ test("user should be able to use youtube transcripts component", async ({
await page.mouse.down();
await page.getByTestId("fit_view").click();

let outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();

while (outdatedComponents > 0) {
await page.getByTestId("icon-AlertTriangle").first().click();
await page.waitForTimeout(1000);
outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();
}

await page
.getByTestId("textarea_str_url")
.fill("https://www.youtube.com/watch?v=VqhCQZaH4Vs");
Expand Down

0 comments on commit fe0cfb0

Please sign in to comment.