mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
test: increase waitForFeedItems timeout to prevent flakiness
Increases the timeout for `waitForFeedItems` from 15s to 30s across multiple E2E test files to prevent test flakiness in slower environments (e.g. Firefox in GitHub Actions). Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
f7712f51a9
commit
c58dde0fb6
3 files changed
+8
-8
No files matched your search
@@ -35,7 +35,7 @@ async function setupAndOpenSettings(
|
||||
await loginAs(page);
|
||||
|
||||
await page.evaluate(() =>
|
||||
(window as any).__bitvidTest__.waitForFeedItems(1, 15000),
|
||||
(window as any).__bitvidTest__.waitForFeedItems(1, 30000),
|
||||
);
|
||||
|
||||
const card = page.locator("[data-video-card]").first();
|
||||
|
||||
@@ -92,7 +92,7 @@ test.describe("Video upload and discovery", () => {
|
||||
|
||||
// Then: feed items should contain the seeded video
|
||||
const items = await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 30000);
|
||||
});
|
||||
|
||||
expect(items.length).toBeGreaterThanOrEqual(1);
|
||||
@@ -123,7 +123,7 @@ test.describe("Video upload and discovery", () => {
|
||||
|
||||
// Then: the video appears with magnet attribute
|
||||
const items = await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 30000);
|
||||
});
|
||||
|
||||
expect(items.length).toBeGreaterThanOrEqual(1);
|
||||
@@ -165,7 +165,7 @@ test.describe("Video upload and discovery", () => {
|
||||
|
||||
// Then: all three videos appear
|
||||
const items = await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(3, 20000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(3, 30000);
|
||||
});
|
||||
|
||||
expect(items.length).toBeGreaterThanOrEqual(3);
|
||||
@@ -202,7 +202,7 @@ test.describe("Video upload and discovery", () => {
|
||||
await loginAs(page);
|
||||
|
||||
await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 30000);
|
||||
});
|
||||
|
||||
// Then: the video card DOM elements have correct data attributes
|
||||
|
||||
@@ -171,7 +171,7 @@ test.describe("View navigation — direct hash routing", () => {
|
||||
|
||||
// Then: the feed should populate with the seeded video
|
||||
const items = await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 30000);
|
||||
});
|
||||
expect(items.length).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
@@ -256,7 +256,7 @@ test.describe("View navigation — feed with seeded content", () => {
|
||||
|
||||
// Then: both videos should appear in the feed
|
||||
const items = await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(2, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(2, 30000);
|
||||
});
|
||||
expect(items.length).toBeGreaterThanOrEqual(2);
|
||||
|
||||
@@ -282,7 +282,7 @@ test.describe("View navigation — feed with seeded content", () => {
|
||||
await loginAs(page);
|
||||
|
||||
await page.evaluate(() => {
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 15000);
|
||||
return (window as any).__bitvidTest__.waitForFeedItems(1, 30000);
|
||||
});
|
||||
|
||||
// When: user navigates to kids view and back
|
||||
|
||||
Reference in new issue
Block a user