Skip to content

Commit

Permalink
feat: nouveau visuel de la page resultat avec progress bar et texte (#…
Browse files Browse the repository at this point in the history
…152)

* feat: ajout d'une v1 pour une progress bar du resultat

* feat: nouveau visuel de la page resultat avec progress bar et texte

* fix: enlever le csp pour les source maman blues, mpedia, site parents (#153)

* fix: enlever le csp pour les source maman blues, mpedia, site parents

* fix: ajout de la source 1000 premiers jours pour l'enlevement du csp

* chore(release): 1.61.1

* feat: synchro du chat manuel avec les horaires depuis le back office (#151)

* chore(release): 1.62.0

* feat: refont du visuel de la page resultas + page annuaire

* feat: nouveau visuel de la page de résultat

* feat: ajout urgence numero + changement du texte

* fix: rajout du css pour le logo

* feat: ajout de l'article sur la DPP

* fix: remove useless package

* fix: ul balise not inside p balise,

* fix: style in article and change logo score

* fix: ajout virgule texte wanda

* fix: test pour faire marcher la geolocalisation sur mobile

* feat: ajout des témoignagne + fix style

* feat: ajout des tracker matomo pour la nouvelle page de résultat

* fix: tracker for Tile contact

* fix: tracker condition for article and results

* fix: boolean condition for article tracker

* fix: style custom tile component

* fix: tag matomo

* fix: lien j'ai besoin d'urgence + enlever l'abtesting du mode de contact

* feat: ajout de l'activation de la tuile de contact depuis la BO

* fix: lien de l'article redirige vers le bon

* fix: texte non centrer + margin sur la derniere tuile

* fix: enlevement de la liste des pros jusqu'a que l'annuaire soit dispo

---------

Co-authored-by: Social Groovy Bot <45039513+SocialGroovyBot@users.noreply.github.com>
  • Loading branch information
mbarry-ippon and SocialGroovyBot authored Apr 28, 2023
1 parent e4754f5 commit c86f0af
Show file tree
Hide file tree
Showing 41 changed files with 1,421 additions and 502 deletions.
32 changes: 0 additions & 32 deletions __tests__/components/ab-testing/give-access-to-resources.test.js

This file was deleted.

10 changes: 0 additions & 10 deletions __tests__/pages/contact/to-be-contacted.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import { RequestContact } from "../../../src/constants/constants"

describe("Demande de contact", () => {
describe("Validité des choix seléctionnés", () => {
test("Sélection du type Chat => choix valide", () => {
const result = isValidButtonEnabled(RequestContact.type.chat, undefined)
expect(result).toEqual(true)
})

test("Sélection du type RDV => choix valide", () => {
const result = isValidButtonEnabled(
RequestContact.type.rendezvous,
Expand All @@ -19,11 +14,6 @@ describe("Demande de contact", () => {
expect(result).toEqual(true)
})

test("Sélection du type Email => choix valide", () => {
const result = isValidButtonEnabled(RequestContact.type.email, undefined)
expect(result).toEqual(true)
})

test("Sélection du type SMS sans horaire => choix invalide", () => {
const result = isValidButtonEnabled(RequestContact.type.sms, undefined)
expect(result).toEqual(false)
Expand Down
27 changes: 1 addition & 26 deletions __tests__/utils/contact.utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,10 @@ import * as TrackerUtils from "../../src/utils/tracker.utils"
* @param {*} label
*/
const sendTrackerContactConfirmed = (contactType) => {
if (contactType === "chat") {
TrackerUtils.trackerForContact(`Ouverture ${contactType}`)
} else {
TrackerUtils.trackerForContact(`Confirmation ${contactType}`)
}
TrackerUtils.trackerForContact(`Confirmation ${contactType}`)
}

describe("Contact Utils", () => {
describe("trackerContactName", () => {
test("Should return confirmation mail if email type is selected", () => {
expect(ContactUtils.trackerContactName("email")).toEqual(
"Confirmation email"
)
})
test("Should return confirmation mail if chat type is selected", () => {
expect(ContactUtils.trackerContactName("chat")).toEqual("Ouverture chat")
})
})
describe("sendTrackerContactConfirmed", () => {
let trackerSpy
localStorage.setItem(STORAGE_SOURCE, "1000-premiers-jours")
Expand All @@ -36,21 +22,10 @@ describe("Contact Utils", () => {
jest.restoreAllMocks()
})

test("Should send tracker with email confirmation", () => {
sendTrackerContactConfirmed(RequestContact.type.email)
expect(trackerSpy).toHaveBeenCalledWith("Confirmation email")
})

test("Should send tracker with sms confirmation", () => {
sendTrackerContactConfirmed(RequestContact.type.sms)
expect(trackerSpy).toHaveBeenCalledWith(`Confirmation sms`)
})

test("Should send tracker with chat opening", () => {
sendTrackerContactConfirmed(RequestContact.type.chat)
expect(trackerSpy).toHaveBeenCalled()
expect(trackerSpy).toHaveBeenCalledWith("Ouverture chat")
})
})

describe("isMamanBluesAvailableHours", () => {
Expand Down
42 changes: 30 additions & 12 deletions apollo-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@ export const client = new ApolloClient({
link: new HttpLink({ uri: `${API_URL}/graphql?nocache`, fetch }),
})

export const GET_INFORMATION_PRO_SANTE = gql`
query annuaire1000JBlues {
annuaire1000JBlues {
type
prenom
nom
profession
telephone1
telephone2
adresse
ville
code_postal
region
departement
longitude
latitude
tarif
conventionne_securite_sociale
}
}
`

export const GET_ACTIVATION_TILE_STATUS = gql`
query activationTile {
activationTile {
activation_tile
}
}
`

export const EPDS_ADD_SURVEY_RESULTS = gql`
mutation (
$genre: ENUM_REPONSESEPDS_GENRE!
Expand Down Expand Up @@ -78,18 +108,6 @@ export const EPDS_CONTACT_INFORMATION = gql`
}
`

export const GET_ACTIVATION_CHAT_STATUS = gql`
query activationChat {
activationChat {
activation_chat
matin_de
matin_a
apres_midi_de
apres_midi_a
}
}
`

export const GET_TEMOIGNAGES_CHIFFRES = gql`
query temoignages {
temoignages {
Expand Down
8 changes: 6 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
const withTM = require("next-transpile-modules")(["@codegouvfr/react-dsfr"])

module.exports = withTM({
reactStrictMode: true,
swcMinify: true,
i18n: {
locales: ["fr-FR"],
defaultLocale: "fr-FR",
Expand All @@ -21,4 +24,5 @@ module.exports = {

return config
},
}
transpilePackages: ["@codegouvfr/react-dsfr"],
})
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,28 @@
},
"dependencies": {
"@apollo/client": "^3.5.7",
"@codegouvfr/react-dsfr": "^0.46.4",
"@dataesr/react-dsfr": "^3.3.5",
"@gouvfr/dsfr": "^1.8.1",
"@socialgouv/matomo-next": "^1.4.0",
"@socialgouv/nos1000jours-lib": "^1.7.0",
"bootstrap": "^5.1.3",
"crisp-sdk-web": "^1.0.5",
"cross-fetch": "^3.1.4",
"framer-motion": "^10.11.4",
"graphql": "^16.2.0",
"html-react-parser": "^3.0.4",
"jspdf": "^2.5.1",
"moment": "^2.29.1",
"next": "12.2.6",
"next-transpile-modules": "^10.0.0",
"papaparse": "^5.3.2",
"react": "17.0.2",
"react-bootstrap": "^2.1.0",
"react-bootstrap-icons": "^1.7.2",
"react-calendly": "^4.1.1",
"react-dom": "17.0.2",
"react-router-dom": "^6.10.0",
"remixicon": "^3.2.0",
"sass": "^1.48.0",
"swr": "^1.3.0"
},
Expand Down
1 change: 1 addition & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "bootstrap/dist/css/bootstrap.css"
import "../styles/index.scss"
import "remixicon/fonts/remixicon.css"
import "@gouvfr/dsfr/dist/dsfr/dsfr.min.css"

import { init } from "@socialgouv/matomo-next"
Expand Down
Loading

0 comments on commit c86f0af

Please sign in to comment.