diff --git a/cypress/e2e/auth/logInWithPassword.cy.ts b/cypress/e2e/auth/logInWithPassword.cy.ts index ea3eb908b..9853e6dfc 100644 --- a/cypress/e2e/auth/logInWithPassword.cy.ts +++ b/cypress/e2e/auth/logInWithPassword.cy.ts @@ -86,12 +86,4 @@ describe('Email and Password Validation', () => { // Signing in with a valid email but empty password cy.signInPasswordAndCheck(AUTH_MEMBERS.INVALID_PASSWORD); }); - - // // Signing in with a valid email but empty password - // cy.signInPasswordAndCheck(AUTH_MEMBERS.WRONG_PASSWORD); - // // Signing in with a valid email and password - // cy.signInPasswordAndCheck(AUTH_MEMBERS.GRAASP); - - // cy.get(`#${PASSWORD_SUCCESS_ALERT}`).should('be.visible'); - // }); }); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 075017221..86ac12f79 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -211,9 +211,7 @@ Cypress.Commands.add( getItemError || getCurrentMemberError, ); mockGetItemChat({ chatMessages }); - // mockGetItemMembershipsForItem(items, currentMember); - // mockGetItemsTags(items, currentMember); mockGetLoginSchemaType(itemLogins); mockGetChildren(items, currentMember); diff --git a/cypress/support/server.ts b/cypress/support/server.ts index 166e04f13..dca21d30e 100644 --- a/cypress/support/server.ts +++ b/cypress/support/server.ts @@ -490,54 +490,6 @@ export const mockGetItemChat = ({ ).as('getItemChat'); }; -// export const mockGetItemMembershipsForItem = ( -// items: MockItem[], -// currentMember: Member | null, -// ): void => { -// cy.intercept( -// { -// method: HttpMethod.Get, -// url: new RegExp( -// `${API_HOST}/${parseStringToRegExp( -// buildGetItemMembershipsForItemsRoute([]), -// )}`, -// ), -// }, -// ({ reply, url }) => { -// const itemIds = new URLSearchParams(new URL(url).search).getAll('itemId'); -// const selectedItems = items.filter(({ id }) => itemIds?.includes(id)); -// const allMemberships = selectedItems.map( -// ({ creator, id, memberships }) => { -// // build default membership depending on current member -// // if the current member is the creator, it has membership -// // otherwise it should return an error -// const defaultMembership = -// creator?.id === currentMember?.id -// ? [ -// { -// permission: PermissionLevel.Admin, -// memberId: creator, -// itemId: id, -// }, -// ] -// : { statusCode: StatusCodes.UNAUTHORIZED }; - -// // if the defined memberships does not contain currentMember, it should throw -// const currentMemberHasMembership = memberships?.find( -// ({ memberId }) => memberId === currentMember?.id, -// ); -// if (!currentMemberHasMembership) { -// return defaultMembership; -// } - -// return memberships || defaultMembership; -// }, -// ); -// reply(allMemberships); -// }, -// ).as('getItemMemberships'); -// }; - export const mockGetChildren = ( items: MockItem[], member: Member | null, @@ -648,46 +600,6 @@ export const mockDefaultDownloadFile = ( ).as('downloadFile'); }; -// export const mockGetItemsTags = ( -// items: MockItem[], -// member: Member | null, -// ): void => { -// cy.intercept( -// { -// method: HttpMethod.Get, -// url: new RegExp(`${API_HOST}/items/tags\\?id\\=`), -// }, -// ({ reply, url }) => { -// const ids = new URL(url).searchParams.getAll('id'); - -// const result = items -// .filter(({ id }) => ids.includes(id)) -// .reduce( -// (acc, item) => { -// const error = checkMemberHasAccess({ item, items, member }); - -// return isError(error) -// ? { ...acc, error: [...acc.errors, error] } -// : { -// ...acc, -// data: { -// ...acc.data, -// [item.id]: ([item.public, item.hidden] -// .filter(Boolean) -// .map((t) => ({ item, ...t })) ?? []) as ItemVisibility[], -// }, -// }; -// }, -// { data: {}, errors: [] } as ResultOf, -// ); -// reply({ -// statusCode: StatusCodes.OK, -// body: result, -// }); -// }, -// ).as('getItemsTags'); -// }; - export const mockGetLoginSchemaType = (itemLogins: { [key: string]: string; }): void => { diff --git a/src/locales/fr/landing.json b/src/locales/fr/landing.json index f3cdbe2d5..54230a9a3 100644 --- a/src/locales/fr/landing.json +++ b/src/locales/fr/landing.json @@ -258,7 +258,7 @@ "CONTENT": { "TITLE": "Contenu", "HOME": "Accueil", - "FEATURES": "Fonctionnalité", + "FEATURES": "Fonctionnalités", "ABOUT_US": "À propos de nous", "SUPPORT": "Support utilisateur", "CONTACT_US": "Contactez-nous" diff --git a/src/modules/landing/features/CallOutSection.tsx b/src/modules/landing/features/CallOutSection.tsx index 9f7f692ff..8d1d690d7 100644 --- a/src/modules/landing/features/CallOutSection.tsx +++ b/src/modules/landing/features/CallOutSection.tsx @@ -31,7 +31,7 @@ export function CallOutSection({ children, actions, image, -}: CallOutSectionProps) { +}: Readonly) { return ( diff --git a/src/modules/landing/features/pricing/IncludedOption.tsx b/src/modules/landing/features/pricing/IncludedOption.tsx index 6d75cc7a6..2a2de9821 100644 --- a/src/modules/landing/features/pricing/IncludedOption.tsx +++ b/src/modules/landing/features/pricing/IncludedOption.tsx @@ -4,7 +4,7 @@ import { useButtonColor } from '@graasp/ui'; import { CheckIcon } from 'lucide-react'; -export function IncludedOption({ text }: { text: string }) { +export function IncludedOption({ text }: Readonly<{ text: string }>) { const { color } = useButtonColor('success'); return ( diff --git a/src/modules/landing/features/pricing/PlanLayout.tsx b/src/modules/landing/features/pricing/PlanLayout.tsx index 8b4697a0c..3d3ab7b2c 100644 --- a/src/modules/landing/features/pricing/PlanLayout.tsx +++ b/src/modules/landing/features/pricing/PlanLayout.tsx @@ -21,7 +21,7 @@ export function PlanLayout({ name, price, children, -}: PlanLayoutProps): JSX.Element { +}: Readonly): JSX.Element { return ( diff --git a/src/modules/landing/features/pricing/PricingPlansSection.tsx b/src/modules/landing/features/pricing/PricingPlansSection.tsx index 1697701c1..ae8e68d76 100644 --- a/src/modules/landing/features/pricing/PricingPlansSection.tsx +++ b/src/modules/landing/features/pricing/PricingPlansSection.tsx @@ -21,7 +21,7 @@ export function PricingPlan({ support, templates, price, -}: PricingPlanProps) { +}: Readonly) { return (