refactor: remove networkidle waiters (#16483)

* refactor: remove networkidle waiters

* Update out-of-office.e2e.ts

* Update auth-index.e2e.ts

* WIP

* Update booking-limits.e2e.ts

* fix-conflicts

* fix failed e2e tests

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: unknown <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-09-15 12:25:48 +00:00
1 parent 9bfd933699
commit 747591fded
34 files changed
+224 -202

No files matched your search

+5 -5
View File
@@ -47,7 +47,7 @@ test.describe("Unpublished", () => {
const { team: org } = await owner.getOrgMembership();
const { requestedSlug } = org.metadata as { requestedSlug: string };
await page.goto(`/org/${requestedSlug}`);
await page.waitForLoadState("networkidle");
// await page.waitForLoadState("networkidle");
await expect(page.locator('[data-testid="empty-screen"]')).toHaveCount(1);
await expect(page.locator(`h2:has-text("${title(org.name)}")`)).toHaveCount(1);
await expect(page.locator(`div:text("${description("organization")}")`)).toHaveCount(1);
@@ -65,7 +65,7 @@ test.describe("Unpublished", () => {
const { requestedSlug } = org.metadata as { requestedSlug: string };
const [{ slug: subteamSlug }] = org.children as { slug: string }[];
await page.goto(`/org/${requestedSlug}/team/${subteamSlug}`);
await page.waitForLoadState("networkidle");
// await page.waitForLoadState("networkidle");
await expect(page.locator('[data-testid="empty-screen"]')).toHaveCount(1);
await expect(page.locator(`h2:has-text("${title(org.name)}")`)).toHaveCount(1);
await expect(page.locator(`div:text("${description("organization")}")`)).toHaveCount(1);
@@ -84,7 +84,7 @@ test.describe("Unpublished", () => {
const [{ slug: subteamSlug, id: subteamId }] = org.children as { slug: string; id: number }[];
const { slug: subteamEventSlug } = await owner.getFirstTeamEvent(subteamId);
await page.goto(`/org/${requestedSlug}/team/${subteamSlug}/${subteamEventSlug}`);
await page.waitForLoadState("networkidle");
// await page.waitForLoadState("networkidle");
await expect(page.locator('[data-testid="empty-screen"]')).toHaveCount(1);
await expect(page.locator(`h2:has-text("${title(org.name)}")`)).toHaveCount(1);
@@ -97,7 +97,7 @@ test.describe("Unpublished", () => {
const { team: org } = await owner.getOrgMembership();
const { requestedSlug } = org.metadata as { requestedSlug: string };
await page.goto(`/org/${requestedSlug}/${owner.username}`);
await page.waitForLoadState("networkidle");
// await page.waitForLoadState("networkidle");
await expect(page.locator('[data-testid="empty-screen"]')).toHaveCount(1);
await expect(page.locator(`h2:has-text("${title(org.name)}")`)).toHaveCount(1);
await expect(page.locator(`div:text("${description("organization")}")`)).toHaveCount(1);
@@ -110,7 +110,7 @@ test.describe("Unpublished", () => {
const { requestedSlug } = org.metadata as { requestedSlug: string };
const [{ slug: ownerEventType }] = owner.eventTypes;
await page.goto(`/org/${requestedSlug}/${owner.username}/${ownerEventType}`);
await page.waitForLoadState("networkidle");
// await page.waitForLoadState("networkidle");
await expect(page.locator('[data-testid="empty-screen"]')).toHaveCount(1);
await expect(page.locator(`h2:has-text("${title(org.name)}")`)).toHaveCount(1);
await expect(page.locator(`div:text("${description("organization")}")`)).toHaveCount(1);