mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* feat: Cal.diy — community-driven MIT-licensed fork of Cal.com This squashed commit contains all Cal.diy changes applied on top of calcom/cal.com main: - Rebrand Cal.com to Cal.diy across the entire codebase - Remove Enterprise Edition (EE) features, license checks, and AGPL restrictions - Switch license from AGPL-3.0 to MIT - Remove docs/ directory (migrated to Nextra at cal.diy) - Remove dead code: org tests, EE tips, platform nav, premium username, SAML/SSO, etc. - Clean up .env.example for self-hosted Cal.diy - Update Docker image references to calcom/cal.diy - Update README, CONTRIBUTING.md, and issue templates for Cal.diy community fork - Add PR welcome bot for Cal.diy contributors - Fix API v2 breaking changes oasdiff ignore entries - Replace Blacksmith CI runners with default GitHub Actions 3893 files changed, 20789 insertions(+), 411020 deletions(-) Co-Authored-By: [email protected] <[email protected]> * refactor: remove org-specific /organizations/:orgId endpoints from API v2 atoms controllers (#1701) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: revert Cal.diy Inc to Cal.com, Inc. in license files, copyright notices, and package metadata (#1702) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * rip out org related comments in api v2 --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
75 lines
3.1 KiB
TypeScript
75 lines
3.1 KiB
TypeScript
import { expect } from "@playwright/test";
|
|
|
|
import { test } from "./lib/fixtures";
|
|
|
|
// IMPORTANT: we do NOT load different translations based on URL locale
|
|
// We load different translations based on the browser locale or Cal.diy User settings
|
|
// This test suite is just to make sure that the routing works correctly
|
|
test.describe("Locale-specific pages must not 404", () => {
|
|
for (const locale of ["en", "fr"]) {
|
|
test.describe(`/${locale}/* pages`, () => {
|
|
test(`/${locale}/login shouldn't 404`, async ({ page }) => {
|
|
const response = await page.goto(`/${locale}/login`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("login-form")).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/auth/login shouldn't 404`, async ({ page }) => {
|
|
const response = await page.goto(`/${locale}/auth/login`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("login-form")).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/[user] page shouldn't 404`, async ({ page, users }) => {
|
|
const user = await users.create();
|
|
const response = await page.goto(`/${locale}/${user.username}`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("event-types")).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/[user]/[type] page shouldn't 404`, async ({ page, users }) => {
|
|
const user = await users.create();
|
|
const response = await page.goto(`/${locale}/${user.username}/30-min`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("booker-container")).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/event-types page shouldn't 404`, async ({ page, users }) => {
|
|
const user = await users.create();
|
|
await user.apiLogin();
|
|
const response = await page.goto(`/${locale}/event-types`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("subtitle").first()).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/availability page shouldn't 404`, async ({ page, users }) => {
|
|
const user = await users.create();
|
|
await user.apiLogin();
|
|
const response = await page.goto(`/${locale}/availability`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByTestId("subtitle").first()).toBeVisible();
|
|
});
|
|
|
|
test(`/${locale}/bookings/upcoming page shouldn't 404`, async ({ page, users }) => {
|
|
const user = await users.create();
|
|
await user.apiLogin();
|
|
const response = await page.goto(`/${locale}/bookings/upcoming`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.getByRole("heading", { name: "No upcoming bookings" })).toBeVisible();
|
|
});
|
|
|
|
// Teams, routing forms, and insights pages are removed in cal.diy
|
|
});
|
|
}
|
|
});
|
|
|
|
test.describe("Locale-specific APIs must not 404", () => {
|
|
for (const locale of ["en"]) {
|
|
test(`/${locale}/api/logo shouldn't 404`, async ({ page }) => {
|
|
const response = await page.goto(`/${locale}/api/logo`);
|
|
expect(response?.status()).not.toBe(404);
|
|
await expect(page.locator("svg")).toBeVisible();
|
|
});
|
|
}
|
|
});
|