Skip to content

Commit

Permalink
pr feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulEntourage committed Dec 7, 2023
1 parent 09e90cf commit a1edde8
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 7 deletions.
48 changes: 47 additions & 1 deletion cypress/e2e/parcours-orienter.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,51 @@ describe('Parcours Orienter', () => {

cy.get('.ReactModalPortal div').should('not.exist');
});
});
})


describe('Nous contacter', () => {
it('Remplir le formulaire, envoyer et fermer', () => {
cy.get('[data-testid="button-contact"]')
.scrollIntoView()
.first()
.click();

cy.wait(500);

cy.get('.ReactModalPortal div').first().should('be.visible');

cy.get('#form-interest-lastName').scrollIntoView().type('Doe');

cy.get('#form-interest-firstName').scrollIntoView().type('John');

cy.get('#form-interest-email').scrollIntoView().type('johndoe@gmail.com');

cy.get('#form-interest-phone').scrollIntoView().type('0698754321');

cy.get('#form-interest-structure').scrollIntoView().type('Test');

cy.get('#form-interest-message').scrollIntoView().type('Form test');

cy.get('#form-interest-heardAbout-container')
.should('be.visible')
.scrollIntoView()
.click()
.find('.option')
.contains('Autre')
.click();

cy.get('label[for="form-interest-cgu"]').scrollIntoView().click();

cy.get('button').contains('Envoyer').click();

cy.wait('@postContact');

cy.get('[data-testid="success-modal-content"]').should('be.visible');

cy.get('[data-testid="success-close-modal"]').click();

cy.get('[data-testid="success-modal-content"]').should('not.exist');
});
});;
});
1 change: 1 addition & 0 deletions src/components/partials/EnSavoirPlus/EnSavoirPlus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const EnSavoirPlus = () => {
gaEvent(GA_TAGS.PAGE_ORIENTER_CONTACT_CLIC);
openModal(<ModalInterestLinkedOut />);
},
dataTestId: 'button-contact',
},
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/components/partials/MultipleCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface MultipleCTAProps {
onClick?: () => void;
size?: UIKIT_BUTTON_SIZES;
style?: UIKIT_BUTTON_STYLES_SPEC;
dataTestId?: string;
};
}[];
animate?: boolean;
Expand Down Expand Up @@ -117,6 +118,7 @@ export const MultipleCTA = ({
toggle={item.button.modal}
onClick={item.button.onClick}
size={item.button.size}
dataTestId={item.button.dataTestId}
>
{item.button.label}
<ChevronRightIcon />
Expand Down
56 changes: 56 additions & 0 deletions src/components/partials/Reviews/Reviews.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';
import { Reviews } from './Reviews';

const meta = {
title: 'Reviews',
component: Reviews,
decorators: [
(Story) => {
return <Story />;
},
],
};

const reviews = [
{
image: '/static/img/temoignage-entreprise-stephane-danny.jpg',
author: 'Stéphane',
authorStatus: 'Recruteur de Danny',
company: 'Les copains de Bastien',
review: (
<>
&ldquo;Bien plus qu&apos;un candidat standard, on sent qu&apos;il y a un
enjeu personnel et une dimension impactante&nbsp;!&ldquo;
</>
),
},
{
image: '/static/img/temoignage-entreprise-gregoire-mbemba.jpg',
author: 'Grégoire',
company: 'Dani Alu',
authorStatus: "Recruteur de M'Bemba",
review: (
<>
&ldquo;Le recrutement de M&apos;Bemba a ressoudé les équipes. Elles se
sont investies dans un projet. Elles peuvent être très fières d’avoir
fait en sorte que M&apos;Bemba soit épanoui et polyvalent dans
l’atelier.&ldquo;
</>
),
},
];

const Template = () => {
return (
<Reviews
title="Plus de 60 entreprises partenaires nous font confiance à LinkedOut"
reviews={reviews}
/>
);
};

export const PartialReviews = {
render: Template,
};

export default meta;
2 changes: 1 addition & 1 deletion src/components/utils/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AnyToFix } from 'src/utils/Types';

interface ButtonProps {
children: React.ReactNode;
href?: string | { pathname: string; query: AnyToFix };
href?: string | { pathname: string; query?: AnyToFix };
disabled?: boolean;
visible?: UIKIT_SCREENS;
style?: UIKIT_BUTTON_STYLES_SPEC | '';
Expand Down
10 changes: 5 additions & 5 deletions src/pages/merci/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Grid, Section } from 'src/components/utils';
import { Button } from 'src/components/utils/Button';
import { GA_TAGS } from 'src/constants/tags';

const thankYouMessages = {
const ThankYouMessages = {
coach: (
<>
<h2 className="uk-text-bold">
Expand Down Expand Up @@ -38,20 +38,20 @@ const thankYouMessages = {
),
} as const;

type ThankYouMessageType = keyof typeof thankYouMessages;
type ThankYouMessagesType = keyof typeof ThankYouMessages;

const Merci = () => {
const {
query: { type },
} = useRouter();

const currentType = type as ThankYouMessageType;
const currentType = type as ThankYouMessagesType;

return (
<Layout title="Merci ! - LinkedOut" noIndex>
<Section className="uk-text-center" style="default" size="large">
<>
{thankYouMessages[currentType] || (
{ThankYouMessages[currentType] || (
<h2 className="uk-text-bold">
Merci beaucoup d&apos;avoir répondu au formulaire&nbsp;!
</h2>
Expand All @@ -61,7 +61,7 @@ const Merci = () => {
<h4 className="uk-text-italic">L&apos;équipe LinkedOut</h4>
<Grid middle column gap="collapse">
<Button
href={{ pathname: '/', query: {} }}
href={{ pathname: '/' }}
style="secondary"
className="uk-margin-large-top"
>
Expand Down

0 comments on commit a1edde8

Please sign in to comment.