Skip to content

Commit e56e15c

Browse files
authored
Merge branch 'main' into feat/team-hidden
2 parents 9894e83 + c4547c5 commit e56e15c

File tree

51 files changed

+4544
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4544
-252
lines changed

apps/api/v2/src/modules/organizations/event-types/organizations-admin-not-team-member-event-types.e2e-spec.ts

Lines changed: 1231 additions & 0 deletions
Large diffs are not rendered by default.

apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts renamed to apps/api/v2/src/modules/organizations/event-types/organizations-member-team-admin-event-types.e2e-spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import type {
3535
import type { User, Team } from "@calcom/prisma/client";
3636

3737
describe("Organizations Event Types Endpoints", () => {
38-
describe("User Authentication - User is Org Admin", () => {
38+
describe("User Authentication - User is Org member and team admin", () => {
3939
let app: INestApplication;
4040

4141
let userRepositoryFixture: UserRepositoryFixture;
@@ -172,7 +172,7 @@ describe("Organizations Event Types Endpoints", () => {
172172
});
173173

174174
await membershipsRepositoryFixture.create({
175-
role: "ADMIN",
175+
role: "MEMBER",
176176
user: { connect: { id: userAdmin.id } },
177177
team: { connect: { id: org.id } },
178178
accepted: true,
@@ -247,7 +247,7 @@ describe("Organizations Event Types Endpoints", () => {
247247
return request(app.getHttpServer())
248248
.post(`/v2/organizations/${org.id}/teams/${falseTestTeam.id}/event-types`)
249249
.send(body)
250-
.expect(404);
250+
.expect(403);
251251
});
252252

253253
it("should not be able to create event-type for user outside org", async () => {
@@ -511,7 +511,7 @@ describe("Organizations Event Types Endpoints", () => {
511511
it("should not get an event-type of team outside org", async () => {
512512
return request(app.getHttpServer())
513513
.get(`/v2/organizations/${org.id}/teams/${falseTestTeam.id}/event-types/${collectiveEventType.id}`)
514-
.expect(404);
514+
.expect(403);
515515
});
516516

517517
it("should not get a non existing event-type", async () => {
@@ -576,7 +576,7 @@ describe("Organizations Event Types Endpoints", () => {
576576
return request(app.getHttpServer())
577577
.patch(`/v2/organizations/${org.id}/teams/${falseTestTeam.id}/event-types/${collectiveEventType.id}`)
578578
.send(body)
579-
.expect(404);
579+
.expect(403);
580580
});
581581

582582
it("should not be able to update non existing event-type", async () => {
@@ -950,7 +950,7 @@ describe("Organizations Event Types Endpoints", () => {
950950
it("should not delete event-type of team outside org", async () => {
951951
return request(app.getHttpServer())
952952
.delete(`/v2/organizations/${org.id}/teams/${falseTestTeam.id}/event-types/${collectiveEventType.id}`)
953-
.expect(404);
953+
.expect(403);
954954
});
955955

956956
it("should delete event-type not part of the team", async () => {

apps/web/playwright/fixtures/users.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ const createUserFixture = (user: UserWithIncludes, page: Page) => {
684684
},
685685
logout: async () => {
686686
await page.goto("/auth/logout");
687+
const logoutBtn = page.getByTestId("logout-btn");
688+
await expect(logoutBtn).toHaveText("Go back to the login page");
689+
await page.reload();
690+
await expect(logoutBtn).toHaveText("Go back to the login page");
687691
},
688692
getFirstTeamMembership: async () => {
689693
const memberships = await prisma.membership.findMany({

apps/web/playwright/insights.e2e.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ test.describe("Insights", async () => {
271271
];
272272

273273
for (const title of expectedChartTitles) {
274-
const chartCard = page.locator("[data-testid='panel-card'] h2").filter({ hasText: title });
274+
const chartCard = page
275+
.locator("[data-testid='panel-card'] h2")
276+
.filter({ hasText: new RegExp(`^${title}$`) });
275277
await expect(chartCard).toBeVisible();
276278
}
277279
});

apps/web/public/static/locales/ar/common.json

Lines changed: 85 additions & 6 deletions
Large diffs are not rendered by default.

apps/web/public/static/locales/az/common.json

Lines changed: 84 additions & 5 deletions
Large diffs are not rendered by default.

apps/web/public/static/locales/bg/common.json

Lines changed: 83 additions & 4 deletions
Large diffs are not rendered by default.

apps/web/public/static/locales/bn/common.json

Lines changed: 84 additions & 5 deletions
Large diffs are not rendered by default.

apps/web/public/static/locales/ca/common.json

Lines changed: 84 additions & 5 deletions
Large diffs are not rendered by default.

apps/web/public/static/locales/cs/common.json

Lines changed: 85 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)