diff --git a/pro/cypress/e2e/createCollectiveOffer.cy.ts b/pro/cypress/e2e/createCollectiveOffer.cy.ts index 9d316aa8cef..101b47db741 100644 --- a/pro/cypress/e2e/createCollectiveOffer.cy.ts +++ b/pro/cypress/e2e/createCollectiveOffer.cy.ts @@ -55,17 +55,19 @@ describe('Create collective offers', () => { cy.findByLabelText('Lieu *').select(venueName) - cy.findByLabelText('Domaine artistique et culturel *').click() + cy.findByLabelText('Ajoutez un ou plusieurs domaines artistiques *').click() cy.get('#list-domains').find('#option-display-2').click() - cy.findByText('Type d’offre').click() + cy.findByText('Quel est le type de votre offre ?').click() - cy.findByLabelText('Format *').click() + cy.findByLabelText('Ajoutez un ou plusieurs formats *').click() cy.get('#list-formats').find('#option-display-Concert').click() - cy.findByText('Type d’offre').click() + cy.findByText('Quel est le type de votre offre ?').click() cy.findByLabelText('Titre de l’offre *').type(newOfferName) - cy.findByLabelText('Description *').type('Bookable draft offer') + cy.findByLabelText( + 'Décrivez ici votre projet et son interêt pédagogique *' + ).type('Bookable draft offer') cy.findByText('Collège - 6e').click() cy.findByLabelText('Email *').type('example@passculture.app') cy.findByLabelText('Email auquel envoyer les notifications *').type( @@ -89,9 +91,9 @@ describe('Create collective offers', () => { cy.get('#list-institution') .findByText(/COLLEGE 123/) .click() - cy.findByText('Établissement scolaire et enseignant').click() + cy.findByText("Renseignez l'établissement scolaire et l’enseignant").click() - cy.findByText('Établissement scolaire et enseignant').click() + cy.findByText("Renseignez l'établissement scolaire et l’enseignant").click() cy.findByText('Enregistrer et continuer').click() cy.findByText('Enregistrer et continuer').click() @@ -111,9 +113,36 @@ describe('Create collective offers', () => { cy.wait('@collectiveOffers') const expectedResults = [ - ['', '', '', 'Titre', 'Date de l’évènement', 'Lieu', 'Établissement', 'Statut'], - ['', '', '', newOfferName, '10/05/202518h30', venueName, 'COLLEGE 123', 'brouillon'], - ['', '', '', offerDraft.name, 'Toute l’année scolaire', offerDraft.venueName, 'DE LA TOUR', 'brouillon'], + [ + '', + '', + '', + 'Titre', + 'Date de l’évènement', + 'Lieu', + 'Établissement', + 'Statut', + ], + [ + '', + '', + '', + newOfferName, + '10/05/202518h30', + venueName, + 'COLLEGE 123', + 'brouillon', + ], + [ + '', + '', + '', + offerDraft.name, + 'Toute l’année scolaire', + offerDraft.venueName, + 'DE LA TOUR', + 'brouillon', + ], ] expectOffersOrBookingsAreFound(expectedResults) @@ -138,8 +167,26 @@ describe('Create collective offers', () => { cy.findByText('Rechercher').click() const expectedNewResults = [ - ['', '', '', 'Titre', 'Date de l’évènement', 'Lieu', 'Établissement', 'Statut'], - ['', '', '', newOfferName, '10/05/202518h30', venueName, 'COLLEGE 123', 'publiée'], + [ + '', + '', + '', + 'Titre', + 'Date de l’évènement', + 'Lieu', + 'Établissement', + 'Statut', + ], + [ + '', + '', + '', + newOfferName, + '10/05/202518h30', + venueName, + 'COLLEGE 123', + 'publiée', + ], ] expectOffersOrBookingsAreFound(expectedNewResults) diff --git a/pro/src/pages/CollectiveOffer/CollectiveOffer/CollectiveOfferCreation/__specs__/CollectiveOfferCreation.spec.tsx b/pro/src/pages/CollectiveOffer/CollectiveOffer/CollectiveOfferCreation/__specs__/CollectiveOfferCreation.spec.tsx index ccc32597385..37af9bd0ca5 100644 --- a/pro/src/pages/CollectiveOffer/CollectiveOffer/CollectiveOfferCreation/__specs__/CollectiveOfferCreation.spec.tsx +++ b/pro/src/pages/CollectiveOffer/CollectiveOffer/CollectiveOfferCreation/__specs__/CollectiveOfferCreation.spec.tsx @@ -66,7 +66,7 @@ describe('CollectiveOfferCreation', () => { ).toBeInTheDocument() expect( screen.getByRole('heading', { - name: 'Qui propose l’offre ? *', + name: 'Qui propose l’offre ?', }) ).toBeInTheDocument() }) diff --git a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormAccessibility/FormAccessibility.tsx b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormAccessibility/FormAccessibility.tsx index c438e19ddd7..6a17539dda5 100644 --- a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormAccessibility/FormAccessibility.tsx +++ b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormAccessibility/FormAccessibility.tsx @@ -16,7 +16,7 @@ export const FormAccessibility = ({ const { setFieldValue } = useFormikContext() return ( - + { return ( - + + +
+

+ Quand votre offre peut-elle avoir lieu ? * +

{values.datesType === 'specific_dates' && ( @@ -68,7 +74,7 @@ export const FormDates = ({ {`Votre offre sera ${deactivateWording} automatiquement à l’issue des dates précisées ci-dessous.`} - + )} - +
) } diff --git a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormDates/__specs__/FormDates.spec.tsx b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormDates/__specs__/FormDates.spec.tsx index c62074795b5..e9f93c9d66b 100644 --- a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormDates/__specs__/FormDates.spec.tsx +++ b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormDates/__specs__/FormDates.spec.tsx @@ -132,7 +132,7 @@ describe('FormDates', () => { expect( screen.getByRole('radio', { - name: 'Pendant une période précise uniquement', + name: 'À une date ou une période précise', }) ).not.toBeChecked() }) @@ -156,7 +156,7 @@ describe('FormDates', () => { }) const screenSpecific = screen.getByRole('radio', { - name: 'Pendant une période précise uniquement', + name: 'À une date ou une période précise', }) await userEvent.click(radioPermanent) diff --git a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormNotifications/FormNotifications.tsx b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormNotifications/FormNotifications.tsx index b714bd7a893..199a7c41825 100644 --- a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormNotifications/FormNotifications.tsx +++ b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormNotifications/FormNotifications.tsx @@ -19,7 +19,7 @@ export const FormNotifications = ({ const { values } = useFormikContext() return ( - + {({ remove, push }) => ( <> diff --git a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormOfferType/FormOfferType.tsx b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormOfferType/FormOfferType.tsx index 27a7356db80..d1009dda74a 100644 --- a/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormOfferType/FormOfferType.tsx +++ b/pro/src/pages/CollectiveOffer/CollectiveOffer/components/OfferEducational/OfferEducationalForm/FormOfferType/FormOfferType.tsx @@ -12,22 +12,19 @@ import { TextInput } from 'ui-kit/form/TextInput/TextInput' import { InfoBox } from 'ui-kit/InfoBox/InfoBox' import { getNationalProgramsForDomains } from '../../constants/getNationalProgramsForDomains' -import { - DESCRIPTION_LABEL, - DURATION_LABEL, - TITLE_LABEL, -} from '../../constants/labels' export interface FormTypeProps { domainsOptions: SelectOption[] nationalPrograms: SelectOption[] disableForm: boolean + isTemplate: boolean } export const FormOfferType = ({ domainsOptions, nationalPrograms, disableForm, + isTemplate, }: FormTypeProps): JSX.Element => { const { values } = useFormikContext() @@ -41,62 +38,64 @@ export const FormOfferType = ({ ) return ( - - {domainsOptions.length > 0 && ( + <> + + {domainsOptions.length > 0 && ( + + + + )} - )} - - - - {nationalPrograms.length > 0 && ( - - Un dispositif national est un type de programme d’éducation - artistique et culturelle auquel sont rattachées certaines offres. - Si c’est le cas de cette offre, merci de le renseigner. - - } - > - + + )} +