Skip to content

Commit 04fcd9f

Browse files
authored
cleanup(team-org): remove e2e tests for removed team/org paths (calcom#28953)
1 parent 1cc365e commit 04fcd9f

2 files changed

Lines changed: 0 additions & 47 deletions

File tree

apps/web/playwright/app-router-not-found.e2e.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expectPageToBeNotFound } from "playwright/lib/testUtils";
2-
32
import { test } from "./lib/fixtures";
43

54
test.describe.configure({ mode: "parallel" });
@@ -11,8 +10,6 @@ test.describe("App Router - error handling", () => {
1110
page,
1211
}) => {
1312
await expectPageToBeNotFound({ page, url: "/123491234" });
14-
await expectPageToBeNotFound({ page, url: "/team/123491234" });
15-
await expectPageToBeNotFound({ page, url: "/org/123491234" });
1613
await expectPageToBeNotFound({ page, url: "/insights/123491234" });
1714
await expectPageToBeNotFound({ page, url: "/login/123491234" });
1815
});

apps/web/playwright/lib/testUtils.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -586,50 +586,6 @@ export async function confirmBooking(page: Page, url = "/api/book/event") {
586586
});
587587
}
588588

589-
export async function bookTeamEvent({
590-
page,
591-
team,
592-
event,
593-
teamMatesObj,
594-
opts,
595-
}: {
596-
page: Page;
597-
team: {
598-
slug: string | null;
599-
name: string | null;
600-
};
601-
event: { slug: string; title: string; schedulingType: SchedulingType | null };
602-
teamMatesObj?: { name: string }[];
603-
opts?: { attendeePhoneNumber?: string };
604-
}) {
605-
// Note that even though the default way to access a team booking in an organization is to not use /team in the URL, but it isn't testable with playwright as the rewrite is taken care of by Next.js config which can't handle on the fly org slug's handling
606-
// So, we are using /team in the URL to access the team booking
607-
// There are separate tests to verify that the next.config.js rewrites are working
608-
// Also there are additional checkly tests that verify absolute e2e flow. They are in __checks__/organization.spec.ts
609-
await page.goto(`/team/${team.slug}/${event.slug}`);
610-
611-
await selectFirstAvailableTimeSlotNextMonth(page);
612-
await bookTimeSlot(page, opts);
613-
await expect(page.getByTestId("success-page")).toBeVisible();
614-
615-
// The title of the booking
616-
if (event.schedulingType === SchedulingType.ROUND_ROBIN && teamMatesObj) {
617-
const bookingTitle = await page.getByTestId("booking-title").textContent();
618-
619-
const isMatch = teamMatesObj?.some((teamMate) => {
620-
const expectedTitle = `${event.title} between ${teamMate.name} and ${testName}`;
621-
return expectedTitle.trim() === bookingTitle?.trim();
622-
});
623-
624-
expect(isMatch).toBe(true);
625-
} else {
626-
const BookingTitle = `${event.title} between ${team.name} and ${testName}`;
627-
await expect(page.getByTestId("booking-title")).toHaveText(BookingTitle);
628-
}
629-
// The booker should be in the attendee list
630-
await expect(page.getByTestId(`attendee-name-${testName}`)).toHaveText(testName);
631-
}
632-
633589
export async function expectPageToBeNotFound({ page, url }: { page: Page; url: string }) {
634590
await page.goto(`${url}`);
635591
await expect(page.getByTestId(`404-page`)).toBeVisible();

0 commit comments

Comments
 (0)