Refactor: improve YouTube Transcripts integration tests (#5129)
fix: improve YouTube Transcripts integration tests Improve the integration tests for the YouTube Transcripts feature by adding explicit wait conditions for modals and elements. This ensures that the tests are more reliable and less prone to timing issues.
This commit is contained in:
parent
47d7004fc0
commit
6d252d34c6
1 changed files with 7 additions and 6 deletions
|
|
@ -25,7 +25,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();
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +35,9 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("youtube");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[id="toolsYouTube Transcripts"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.locator('//*[@id="toolsYouTube Transcripts"]')
|
||||
|
|
@ -48,7 +52,6 @@ test(
|
|||
|
||||
while (outdatedComponents > 0) {
|
||||
await page.getByTestId("icon-AlertTriangle").first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();
|
||||
}
|
||||
|
||||
|
|
@ -62,12 +65,10 @@ test(
|
|||
|
||||
await page.getByTestId("output-inspection-data").first().click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector("text=Component Output", { timeout: 30000 });
|
||||
|
||||
await page.getByRole("gridcell").first().click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
const value = await page.getByPlaceholder("Empty").inputValue();
|
||||
expect(value.length).toBeGreaterThan(10);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue