diff --git a/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap b/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap index 21fd8812daa636ed1024359edac706c777f38768..b46e53af78be475eba42478b401973525044d938 100644 --- a/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap +++ b/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap @@ -8,7 +8,7 @@ exports[`LegalNoticeView component should be rendered correctly 1`] = ` className="legal-notice-content" > <div - className="legal-notice-header text-14-normal-uppercase" + className="legal-notice-header text-16-normal-uppercase" > LEGAL.TITLE_LEGAL </div> diff --git a/src/components/LegalNotice/legalNoticeLink.scss b/src/components/LegalNotice/legalNoticeLink.scss index f7cc9f02963bde10fdd99c54983129bdd698724c..ca6855f9ecf9204d99983ffac22d6ffcf13c20be 100644 --- a/src/components/LegalNotice/legalNoticeLink.scss +++ b/src/components/LegalNotice/legalNoticeLink.scss @@ -8,7 +8,7 @@ align-items: center; justify-content: center; color: $white; - padding: 1.5rem 1.5rem 0; + padding: 1rem 1.5rem 0; margin-top: 1rem; .legal-notice-header { margin-bottom: 1.25rem; diff --git a/src/components/Options/OptionsView.tsx b/src/components/Options/OptionsView.tsx index e58f22d61b9a40c3bd04638138f120eeb62afe80..862b77ab0e97f1e3ed824172da3ded2b5cbf034e 100644 --- a/src/components/Options/OptionsView.tsx +++ b/src/components/Options/OptionsView.tsx @@ -29,8 +29,8 @@ const OptionsView: React.FC = () => { ></Header> <Content height={headerHeight}> <KonnectorViewerList isParam={true} /> - <ReportOptions /> <ProfileTypeOptions /> + <ReportOptions /> <FAQLink /> <LegalNoticeLink /> <div className="parameters-logos"> diff --git a/src/components/Options/profileTypeOptions.scss b/src/components/Options/profileTypeOptions.scss index e3c56b7b3fb6f824ad93b4cf5b104134bda43c3d..c3d8d3298fe18e3cf6bffec31b171c38ec30ea9c 100644 --- a/src/components/Options/profileTypeOptions.scss +++ b/src/components/Options/profileTypeOptions.scss @@ -2,7 +2,7 @@ @import 'src/styles/base/breakpoint'; .profile-type-root { - margin-top: 2.5rem; + margin-top: 1.75rem; padding: 0 1.5rem; .profile-type-content { margin: 0 auto; diff --git a/src/components/Options/reportOptions.scss b/src/components/Options/reportOptions.scss index e1b6cef43f4a69ef7a742b4685e451ddb2471642..c8e10fbffaf916fe5ee36226bb996505c273bd42 100644 --- a/src/components/Options/reportOptions.scss +++ b/src/components/Options/reportOptions.scss @@ -6,6 +6,7 @@ align-items: center; justify-content: center; padding: 0 1.5rem; + margin: 1rem 0; .report-option-content { width: 45.75rem; @media #{$large-phone} { @@ -13,7 +14,7 @@ } } .head { - margin: 2rem 0 1rem; + margin: 1rem 0; color: $grey-bright; } .switch-container { diff --git a/src/utils/date.spec.ts b/src/utils/date.spec.ts index 2a5137fb64a62f4872c7059f99a41852f2dc2cc5..576c3e19c24bba39faabc08cf59228f69f72213a 100644 --- a/src/utils/date.spec.ts +++ b/src/utils/date.spec.ts @@ -1,7 +1,8 @@ import { FluidType } from 'enum/fluid.enum' import { TimeStep } from 'enum/timeStep.enum' import { DateTime } from 'luxon' -import { TimePeriod } from 'models' +import { Dataload, TimePeriod } from 'models' +import { graphData } from '../../test/__mocks__/datachartData.mock' import { compareDates, isLastDateReached, @@ -369,14 +370,7 @@ describe('date utils', () => { }) describe('convertDateToShortDateString test', () => { - const timePeriod: TimePeriod = { - startDate: DateTime.fromISO('2020-01-01T00:09:00.000Z', { - zone: 'utc', - }), - endDate: DateTime.fromISO('2020-12-29T23:59:59.999Z', { - zone: 'utc', - }), - } + const actualData: Dataload[] = graphData.actualData it('should return an empty string when the TimePeriod is unknown', () => { const result = convertDateToShortDateString(null, 99) @@ -386,29 +380,29 @@ describe('date utils', () => { describe('should return the correct short date string', () => { it('case HALF_AN_HOUR', () => { const result = convertDateToShortDateString( - timePeriod, + actualData, TimeStep.HALF_AN_HOUR ) - expect(result).toBe('mercredi 01 janvier') + expect(result).toBe('jeudi 01 octobre') }) it('case WEEK', () => { - const result = convertDateToShortDateString(timePeriod, TimeStep.WEEK) - expect(result).toBe('du 01/01 au 29/12') + const result = convertDateToShortDateString(actualData, TimeStep.WEEK) + expect(result).toBe('du 01/10 au 03/10') }) it('case DAY', () => { - const result = convertDateToShortDateString(timePeriod, TimeStep.DAY) - expect(result).toBe('janvier 2020') + const result = convertDateToShortDateString(actualData, TimeStep.DAY) + expect(result).toBe('octobre 2020') }) it('case MONTH', () => { - const result = convertDateToShortDateString(timePeriod, TimeStep.MONTH) + const result = convertDateToShortDateString(actualData, TimeStep.MONTH) expect(result).toBe('année 2020') }) it('case YEAR', () => { - const result = convertDateToShortDateString(timePeriod, TimeStep.YEAR) + const result = convertDateToShortDateString(actualData, TimeStep.YEAR) expect(result).toBe('de 2020 à 2020') }) })