diff --git a/docker/cozy-app-dev-with-app.sh b/docker/cozy-app-dev-with-app.sh index 45571eb6b3c450fb6ed9499f7e581cc19c447c90..7241afc62e6bf017281e74dbb28ddf3a17b8b2f3 100755 --- a/docker/cozy-app-dev-with-app.sh +++ b/docker/cozy-app-dev-with-app.sh @@ -215,9 +215,9 @@ do_install_app() { # echo "Removing konnector enedisgrandlyon..." # cozy-stack konnectors uninstall --domain cozy.tools:8080 enedisgrandlyon # fi - if cozy-stack konnectors ls | grep 'enedis-sge-grandlyon'; then - echo "Removing konnector enedis-sge-grandlyon..." - cozy-stack konnectors uninstall --domain cozy.tools:8080 enedis-sge-grandlyon + if cozy-stack konnectors ls | grep 'enedissgegrandlyon'; then + echo "Removing konnector enedissgegrandlyon..." + cozy-stack konnectors uninstall --domain cozy.tools:8080 enedissgegrandlyon fi if cozy-stack konnectors ls | grep 'grdfgrandlyon'; then echo "Removing konnector grdfgrandlyon..." @@ -228,7 +228,7 @@ do_install_app() { cozy-stack konnectors uninstall --domain cozy.tools:8080 eglgrandlyon fi # cozy-stack konnectors install --domain cozy.tools:8080 enedisgrandlyon git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build - cozy-stack konnectors install --domain cozy.tools:8080 enedis-sge-grandlyon git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git#build + cozy-stack konnectors install --domain cozy.tools:8080 enedissgegrandlyon git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git#build cozy-stack konnectors install --domain cozy.tools:8080 grdfgrandlyon git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-konnector.git#build cozy-stack konnectors install --domain cozy.tools:8080 eglgrandlyon git://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git#build } diff --git a/scripts/createConnections.js b/scripts/createConnections.js index 9d8b95a7255a8f1fe8ef74f37dacd9332b604475..c857d3f6fac014027eb3f1af41151dd75c7a3e41 100644 --- a/scripts/createConnections.js +++ b/scripts/createConnections.js @@ -10,7 +10,7 @@ const headers = { } const dataEnedisAccount = JSON.stringify({ - account_type: 'enedis-sge-grandlyon', + account_type: 'enedissgegrandlyon', name: '', auth: { address: '6 Rue Vaillant Couturier', @@ -66,7 +66,7 @@ const dataEnedisTrigger = JSON.stringify({ options: null, message: { account: '70e68b8450cee09fe2f077610901094d', - konnector: 'enedis-sge-grandlyon', + konnector: 'enedissgegrandlyon', }, cozyMetadata: { doctypeVersion: '1', diff --git a/src/components/Connection/ConnectionNotFound.spec.tsx b/src/components/Connection/ConnectionNotFound.spec.tsx index fec1c0bf1dc7f0c37812b43a5474da5a2119d514..a2b02027cfe45ae4a19a47dc8ebc6d2dca8ab8c1 100644 --- a/src/components/Connection/ConnectionNotFound.spec.tsx +++ b/src/components/Connection/ConnectionNotFound.spec.tsx @@ -14,7 +14,7 @@ jest.mock('cozy-ui/transpiled/react/I18n', () => { }) describe('ConnectionNotFound component test', () => { - const konnectorSlug = 'enedis-sge-grandlyon' + const konnectorSlug = 'enedissgegrandlyon' it('should correctly render connection not found', () => { const result = shallow( @@ -31,7 +31,7 @@ describe('ConnectionNotFound component test', () => { submitStyledButton.simulate('click') expect(global.open).toHaveBeenCalledWith( - 'http://localhost/#/discover/enedis-sge-grandlyon', + 'http://localhost/#/discover/enedissgegrandlyon', '_blank' ) }) diff --git a/src/components/Connection/ExpiredConsentModal.spec.tsx b/src/components/Connection/ExpiredConsentModal.spec.tsx index 7d1f94cf215cdecd0ed9fc640a683a5f39355150..4dd3fb84520227f1de56debcc40c86b70e6e706b 100644 --- a/src/components/Connection/ExpiredConsentModal.spec.tsx +++ b/src/components/Connection/ExpiredConsentModal.spec.tsx @@ -89,7 +89,7 @@ describe('ExpiredConsentModal component', () => { expect(useDispatchSpy).toHaveBeenCalledTimes(2) expect(mockHistoryPush).toHaveBeenCalledTimes(1) }) - it('should click on close modal for Enedis', () => { + it('should click on close modal', () => { const component = mount( <Provider store={store}> <ExpiredConsentModal @@ -101,20 +101,6 @@ describe('ExpiredConsentModal component', () => { </Provider> ) component.find(Button).at(0).simulate('click') - expect(mockHandleCloseClick).toHaveBeenCalledWith(FluidType.ELECTRICITY) - }) - it('should click on close modal for GRDF', () => { - const component = mount( - <Provider store={store}> - <ExpiredConsentModal - open={true} - handleCloseClick={mockHandleCloseClick} - fluidType={FluidType.GAS} - toggleModal={mockToggleModal} - /> - </Provider> - ) - component.find(Button).at(0).simulate('click') - expect(mockHandleCloseClick).toHaveBeenCalledWith(FluidType.GAS) + expect(mockHandleCloseClick).toHaveBeenCalled() }) }) diff --git a/src/components/Connection/ExpiredConsentModal.tsx b/src/components/Connection/ExpiredConsentModal.tsx index 0f7bcab7da024c0693d5276c7c7b43a967524917..8dda3387fd587b2ab2ab1e7e4d807feb480f9609 100644 --- a/src/components/Connection/ExpiredConsentModal.tsx +++ b/src/components/Connection/ExpiredConsentModal.tsx @@ -19,7 +19,7 @@ import { AccountSgeData } from 'models' interface ExpiredConsentModalProps { open: boolean - handleCloseClick: (fluidtype: FluidType) => void + handleCloseClick: () => void fluidType: FluidType toggleModal: () => void } @@ -104,7 +104,7 @@ const ExpiredConsentModal: React.FC<ExpiredConsentModalProps> = ({ <div className="buttons"> <Button aria-label={t('consent_outdated.later')} - onClick={() => handleCloseClick(fluidType)} + onClick={handleCloseClick} classes={{ root: 'btn-secondary-positive', label: 'text-16-normal', diff --git a/src/components/Connection/SGEConnect/SgeModalHint.tsx b/src/components/Connection/SGEConnect/SgeModalHint.tsx index f11c911e9034570c677efb52213629112d08bb7a..005a0a1ec45ef19d2d429782f19ea2545a958c2d 100644 --- a/src/components/Connection/SGEConnect/SgeModalHint.tsx +++ b/src/components/Connection/SGEConnect/SgeModalHint.tsx @@ -41,12 +41,12 @@ const SgeModalHint: React.FC<SgeModalHintProps> = ({ </IconButton> <div className="sgeHintModal"> <div className="title text-20-bold"> - {t('auth.enedis-sge-grandlyon.modalHint.title')} + {t('auth.enedissgegrandlyon.modalHint.title')} </div> <Icon icon={PdlImage} width={240} height={385} /> <Button aria-label={t( - 'auth.enedis-sge-grandlyon.modalHint.button-accessibility' + 'auth.enedissgegrandlyon.modalHint.button-accessibility' )} onClick={handleCloseClick} classes={{ @@ -55,7 +55,7 @@ const SgeModalHint: React.FC<SgeModalHintProps> = ({ }} style={{ height: '40px' }} > - {t('auth.enedis-sge-grandlyon.modalHint.button')} + {t('auth.enedissgegrandlyon.modalHint.button')} </Button> </div> </Dialog> diff --git a/src/components/Connection/SGEConnect/StepAddress.tsx b/src/components/Connection/SGEConnect/StepAddress.tsx index 6bc09cad76533dd33e972baf59910f4ce25d68c9..c5265592c3f82126e1332df5d3d8c2f3aab6a94a 100644 --- a/src/components/Connection/SGEConnect/StepAddress.tsx +++ b/src/components/Connection/SGEConnect/StepAddress.tsx @@ -15,10 +15,10 @@ const StepAddress: React.FC<StepAddressProps> = ({ return ( <div className="sge-step-container stepAddress"> <div className="title text-22-bold"> - {t('auth.enedis-sge-grandlyon.addressTitle')} + {t('auth.enedissgegrandlyon.addressTitle')} </div> <label htmlFor="address" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.address')} + {t('auth.enedissgegrandlyon.address')} </label> <input type="text" @@ -30,7 +30,7 @@ const StepAddress: React.FC<StepAddressProps> = ({ } /> <label htmlFor="zipCode" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.zipCode')} + {t('auth.enedissgegrandlyon.zipCode')} </label> <input type="number" @@ -44,7 +44,7 @@ const StepAddress: React.FC<StepAddressProps> = ({ /> <label htmlFor="city" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.city')} + {t('auth.enedissgegrandlyon.city')} </label> <input type="text" diff --git a/src/components/Connection/SGEConnect/StepConsent.tsx b/src/components/Connection/SGEConnect/StepConsent.tsx index 4386d90ff99aa1c6f9327800eb612a273ff51345..198e33268c04ae69cf49e66515da8ed93730ad54 100644 --- a/src/components/Connection/SGEConnect/StepConsent.tsx +++ b/src/components/Connection/SGEConnect/StepConsent.tsx @@ -17,16 +17,16 @@ const StepConsent: React.FC<StepConsentProps> = ({ return ( <div className="sge-step-container stepConsent"> <div className="head text-16-normal"> - {t('auth.enedis-sge-grandlyon.headConsent')} + {t('auth.enedissgegrandlyon.headConsent')} </div> <div className="title text-22-bold"> - {t('auth.enedis-sge-grandlyon.textConsent')} + {t('auth.enedissgegrandlyon.textConsent')} </div> <ul className="text-16-normal"> - <li>{t('auth.enedis-sge-grandlyon.consentLi1')}</li> - <li>{t('auth.enedis-sge-grandlyon.consentLi2')}</li> - <li>{t('auth.enedis-sge-grandlyon.consentLi3')}</li> - <li>{t('auth.enedis-sge-grandlyon.consentLi4')}</li> + <li>{t('auth.enedissgegrandlyon.consentLi1')}</li> + <li>{t('auth.enedissgegrandlyon.consentLi2')}</li> + <li>{t('auth.enedissgegrandlyon.consentLi3')}</li> + <li>{t('auth.enedissgegrandlyon.consentLi4')}</li> </ul> <hr /> <label @@ -43,7 +43,7 @@ const StepConsent: React.FC<StepConsentProps> = ({ } checked={sgeState.dataConsent} /> - <span>{decoreText(t('auth.enedis-sge-grandlyon.consentCheck1'))}</span> + <span>{decoreText(t('auth.enedissgegrandlyon.consentCheck1'))}</span> </label> <label className={classNames('checkbox', { @@ -59,7 +59,7 @@ const StepConsent: React.FC<StepConsentProps> = ({ } checked={sgeState.pdlConfirm} /> - {decoreText(t('auth.enedis-sge-grandlyon.consentCheck2'))} + {decoreText(t('auth.enedissgegrandlyon.consentCheck2'))} </label> </div> ) diff --git a/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx b/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx index 2eb3f7d8033f71c9ec49be90fc4d86e0e53154c1..e545c2b98c080839c01abc5537c179fb8a6c9776 100644 --- a/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx +++ b/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx @@ -21,10 +21,10 @@ const StepIdentityAndPdl: React.FC<StepIdentityAndPdlProps> = ({ return ( <div className="sge-step-container stepIdentity"> <div className="title text-22-bold"> - {t('auth.enedis-sge-grandlyon.identityTitle')} + {t('auth.enedissgegrandlyon.identityTitle')} </div> <label htmlFor="firstName" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.firstName')} + {t('auth.enedissgegrandlyon.firstName')} </label> <input type="text" @@ -37,7 +37,7 @@ const StepIdentityAndPdl: React.FC<StepIdentityAndPdlProps> = ({ required /> <label htmlFor="lastName" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.lastName')} + {t('auth.enedissgegrandlyon.lastName')} </label> <input type="text" @@ -50,10 +50,10 @@ const StepIdentityAndPdl: React.FC<StepIdentityAndPdlProps> = ({ required /> <div className="title text-22-bold"> - {t('auth.enedis-sge-grandlyon.pdlTitle')} + {t('auth.enedissgegrandlyon.pdlTitle')} </div> <label htmlFor="pdl" className="text-16-normal"> - {t('auth.enedis-sge-grandlyon.pdlLabel')} + {t('auth.enedissgegrandlyon.pdlLabel')} </label> <input id="pdl" @@ -68,7 +68,7 @@ const StepIdentityAndPdl: React.FC<StepIdentityAndPdlProps> = ({ required /> <div onClick={toggleModal} className="pdl-hint text-16-normal"> - {t('auth.enedis-sge-grandlyon.pdlHint')} + {t('auth.enedissgegrandlyon.pdlHint')} </div> <SgeModalHint open={openHintModal} handleCloseClick={toggleModal} /> </div> diff --git a/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap index 349a2f9924fec3dec8d2777bf8b563341a0e70ce..8220e1796da6bbe832cba6fe0a902da4915a7cc8 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap @@ -652,13 +652,13 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.identityTitle + auth.enedissgegrandlyon.identityTitle </div> <label className="text-16-normal" htmlFor="firstName" > - auth.enedis-sge-grandlyon.firstName + auth.enedissgegrandlyon.firstName </label> <input id="firstName" @@ -672,7 +672,7 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` className="text-16-normal" htmlFor="lastName" > - auth.enedis-sge-grandlyon.lastName + auth.enedissgegrandlyon.lastName </label> <input id="lastName" @@ -685,13 +685,13 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.pdlTitle + auth.enedissgegrandlyon.pdlTitle </div> <label className="text-16-normal" htmlFor="pdl" > - auth.enedis-sge-grandlyon.pdlLabel + auth.enedissgegrandlyon.pdlLabel </label> <input id="pdl" @@ -706,7 +706,7 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` className="pdl-hint text-16-normal" onClick={[Function]} > - auth.enedis-sge-grandlyon.pdlHint + auth.enedissgegrandlyon.pdlHint </div> <SgeModalHint handleCloseClick={[Function]} diff --git a/src/components/Connection/SGEConnect/__snapshots__/SgeInit.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/SgeInit.spec.tsx.snap index 0d99d65786b86084707cb9581e5e5c31393a774d..1427c5b554adf3591873040e3b3ed47f441172ec 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/SgeInit.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/SgeInit.spec.tsx.snap @@ -25,7 +25,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` "name": "", "oauth": false, "siteLink": "", - "slug": "enedis-sge-grandlyon", + "slug": "enedissgegrandlyon", }, "shouldLaunchKonnector": false, "trigger": null, @@ -42,9 +42,9 @@ exports[`SgeInit component should be rendered correctly 1`] = ` className="kloginform sge-connect" > <p - className="kloginform-title enedis-sge-grandlyon text-20-bold" + className="kloginform-title enedissgegrandlyon text-20-bold" > - auth.enedis-sge-grandlyon.title + auth.enedissgegrandlyon.title </p> <StyledIcon icon="test-file-stub" @@ -78,15 +78,15 @@ exports[`SgeInit component should be rendered correctly 1`] = ` </Icon> </StyledIcon> <p - className="sge-subtitle enedis-sge-grandlyon text-16-regular" + className="sge-subtitle enedissgegrandlyon text-16-regular" > - auth.enedis-sge-grandlyon.bill + auth.enedissgegrandlyon.bill </p> <div className="kloginform-button" > <WithStyles(ForwardRef(Button)) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" classes={ Object { "label": "text-16-bold", @@ -96,7 +96,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` onClick={[Function]} > <ForwardRef(Button) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" classes={ Object { "colorInherit": "MuiButton-colorInherit", @@ -133,7 +133,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` onClick={[Function]} > <WithStyles(ForwardRef(ButtonBase)) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButton-root btn-highlight MuiButton-text" component="button" disabled={false} @@ -143,7 +143,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` type="button" > <ForwardRef(ButtonBase) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButton-root btn-highlight MuiButton-text" classes={ Object { @@ -160,7 +160,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` type="button" > <button - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButtonBase-root MuiButton-root btn-highlight MuiButton-text" disabled={false} onBlur={[Function]} @@ -181,7 +181,7 @@ exports[`SgeInit component should be rendered correctly 1`] = ` <span className="MuiButton-label text-16-bold" > - auth.enedis-sge-grandlyon.connect + auth.enedissgegrandlyon.connect </span> <WithStyles(memo) center={false} diff --git a/src/components/Connection/SGEConnect/__snapshots__/SgeModalHint.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/SgeModalHint.spec.tsx.snap index 322986326ee5c10286b79c6e0cd73606677f9067..dd4fb2be651ede0b6b401b7109acf6a54b07dfa5 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/SgeModalHint.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/SgeModalHint.spec.tsx.snap @@ -451,7 +451,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` <div class="title text-20-bold" > - auth.enedis-sge-grandlyon.modalHint.title + auth.enedissgegrandlyon.modalHint.title </div> <svg class="styles__icon___23x3R" @@ -463,7 +463,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` /> </svg> <button - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" class="MuiButtonBase-root MuiButton-root btn-highlight MuiButton-text" style="height: 40px;" tabindex="0" @@ -472,7 +472,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` <span class="MuiButton-label text-16-bold" > - auth.enedis-sge-grandlyon.modalHint.button + auth.enedissgegrandlyon.modalHint.button </span> <span class="MuiTouchRipple-root" @@ -822,7 +822,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` <div className="title text-20-bold" > - auth.enedis-sge-grandlyon.modalHint.title + auth.enedissgegrandlyon.modalHint.title </div> <Icon height={385} @@ -849,7 +849,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` </Component> </Icon> <WithStyles(ForwardRef(Button)) - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" classes={ Object { "label": "text-16-bold", @@ -864,7 +864,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` } > <ForwardRef(Button) - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" classes={ Object { "colorInherit": "MuiButton-colorInherit", @@ -906,7 +906,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` } > <WithStyles(ForwardRef(ButtonBase)) - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" className="MuiButton-root btn-highlight MuiButton-text" component="button" disabled={false} @@ -921,7 +921,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` type="button" > <ForwardRef(ButtonBase) - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" className="MuiButton-root btn-highlight MuiButton-text" classes={ Object { @@ -943,7 +943,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` type="button" > <button - aria-label="auth.enedis-sge-grandlyon.modalHint.button-accessibility" + aria-label="auth.enedissgegrandlyon.modalHint.button-accessibility" className="MuiButtonBase-root MuiButton-root btn-highlight MuiButton-text" disabled={false} onBlur={[Function]} @@ -969,7 +969,7 @@ exports[`SgeModalHint component should be rendered correctly 1`] = ` <span className="MuiButton-label text-16-bold" > - auth.enedis-sge-grandlyon.modalHint.button + auth.enedissgegrandlyon.modalHint.button </span> <WithStyles(memo) center={false} diff --git a/src/components/Connection/SGEConnect/__snapshots__/StepAddress.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/StepAddress.spec.tsx.snap index 3414e107bd883a271544835f8f9e3b8394fde859..bffbbf9d0daf4c604fe6515786a9fa9d54a83c71 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/StepAddress.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/StepAddress.spec.tsx.snap @@ -36,13 +36,13 @@ exports[`StepAddress component should be rendered correctly 1`] = ` <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.addressTitle + auth.enedissgegrandlyon.addressTitle </div> <label className="text-16-normal" htmlFor="address" > - auth.enedis-sge-grandlyon.address + auth.enedissgegrandlyon.address </label> <input id="address" @@ -55,7 +55,7 @@ exports[`StepAddress component should be rendered correctly 1`] = ` className="text-16-normal" htmlFor="zipCode" > - auth.enedis-sge-grandlyon.zipCode + auth.enedissgegrandlyon.zipCode </label> <input id="zipCode" @@ -68,7 +68,7 @@ exports[`StepAddress component should be rendered correctly 1`] = ` className="text-16-normal" htmlFor="city" > - auth.enedis-sge-grandlyon.city + auth.enedissgegrandlyon.city </label> <input id="city" diff --git a/src/components/Connection/SGEConnect/__snapshots__/StepConsent.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/StepConsent.spec.tsx.snap index 87b0a995e47e4a216dd64121cb2f595a02117a14..ae2a3ae75c32bc99b19d0150bf843cd930829f14 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/StepConsent.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/StepConsent.spec.tsx.snap @@ -36,27 +36,27 @@ exports[`StepConsent component should be rendered correctly 1`] = ` <div className="head text-16-normal" > - auth.enedis-sge-grandlyon.headConsent + auth.enedissgegrandlyon.headConsent </div> <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.textConsent + auth.enedissgegrandlyon.textConsent </div> <ul className="text-16-normal" > <li> - auth.enedis-sge-grandlyon.consentLi1 + auth.enedissgegrandlyon.consentLi1 </li> <li> - auth.enedis-sge-grandlyon.consentLi2 + auth.enedissgegrandlyon.consentLi2 </li> <li> - auth.enedis-sge-grandlyon.consentLi3 + auth.enedissgegrandlyon.consentLi3 </li> <li> - auth.enedis-sge-grandlyon.consentLi4 + auth.enedissgegrandlyon.consentLi4 </li> </ul> <hr /> @@ -71,7 +71,7 @@ exports[`StepConsent component should be rendered correctly 1`] = ` type="checkbox" /> <span> - auth.enedis-sge-grandlyon.consentCheck1 + auth.enedissgegrandlyon.consentCheck1 </span> </label> <label @@ -84,7 +84,7 @@ exports[`StepConsent component should be rendered correctly 1`] = ` onChange={[Function]} type="checkbox" /> - auth.enedis-sge-grandlyon.consentCheck2 + auth.enedissgegrandlyon.consentCheck2 </label> </div> </StepConsent> diff --git a/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap index 6b069ff7f702427d9ad77b0a345bdc6560a63fd5..e5fd436186347e2a50eaf39f652ef27a388c17ae 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap @@ -36,13 +36,13 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.identityTitle + auth.enedissgegrandlyon.identityTitle </div> <label className="text-16-normal" htmlFor="firstName" > - auth.enedis-sge-grandlyon.firstName + auth.enedissgegrandlyon.firstName </label> <input id="firstName" @@ -56,7 +56,7 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` className="text-16-normal" htmlFor="lastName" > - auth.enedis-sge-grandlyon.lastName + auth.enedissgegrandlyon.lastName </label> <input id="lastName" @@ -69,13 +69,13 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` <div className="title text-22-bold" > - auth.enedis-sge-grandlyon.pdlTitle + auth.enedissgegrandlyon.pdlTitle </div> <label className="text-16-normal" htmlFor="pdl" > - auth.enedis-sge-grandlyon.pdlLabel + auth.enedissgegrandlyon.pdlLabel </label> <input id="pdl" @@ -90,7 +90,7 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` className="pdl-hint text-16-normal" onClick={[Function]} > - auth.enedis-sge-grandlyon.pdlHint + auth.enedissgegrandlyon.pdlHint </div> <SgeModalHint handleCloseClick={[Function]} diff --git a/src/components/Connection/__snapshots__/Connection.spec.tsx.snap b/src/components/Connection/__snapshots__/Connection.spec.tsx.snap index 655e05142ed9ae5b7a8dd3b7bb5d8d9c364d3592..c3cfe15733de7039743ecb266d67ad749fc67a60 100644 --- a/src/components/Connection/__snapshots__/Connection.spec.tsx.snap +++ b/src/components/Connection/__snapshots__/Connection.spec.tsx.snap @@ -36,7 +36,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` "name": "", "oauth": false, "siteLink": "", - "slug": "enedis-sge-grandlyon", + "slug": "enedissgegrandlyon", }, "shouldLaunchKonnector": false, "trigger": null, @@ -75,7 +75,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` "name": "", "oauth": false, "siteLink": "", - "slug": "enedis-sge-grandlyon", + "slug": "enedissgegrandlyon", }, "shouldLaunchKonnector": false, "trigger": null, @@ -92,9 +92,9 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` className="kloginform sge-connect" > <p - className="kloginform-title enedis-sge-grandlyon text-20-bold" + className="kloginform-title enedissgegrandlyon text-20-bold" > - auth.enedis-sge-grandlyon.title + auth.enedissgegrandlyon.title </p> <StyledIcon icon="test-file-stub" @@ -128,15 +128,15 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` </Icon> </StyledIcon> <p - className="sge-subtitle enedis-sge-grandlyon text-16-regular" + className="sge-subtitle enedissgegrandlyon text-16-regular" > - auth.enedis-sge-grandlyon.bill + auth.enedissgegrandlyon.bill </p> <div className="kloginform-button" > <WithStyles(ForwardRef(Button)) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" classes={ Object { "label": "text-16-bold", @@ -146,7 +146,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` onClick={[Function]} > <ForwardRef(Button) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" classes={ Object { "colorInherit": "MuiButton-colorInherit", @@ -183,7 +183,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` onClick={[Function]} > <WithStyles(ForwardRef(ButtonBase)) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButton-root btn-highlight MuiButton-text" component="button" disabled={false} @@ -193,7 +193,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` type="button" > <ForwardRef(ButtonBase) - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButton-root btn-highlight MuiButton-text" classes={ Object { @@ -210,7 +210,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` type="button" > <button - aria-label="auth.enedis-sge-grandlyon.accessibility.connect" + aria-label="auth.enedissgegrandlyon.accessibility.connect" className="MuiButtonBase-root MuiButton-root btn-highlight MuiButton-text" disabled={false} onBlur={[Function]} @@ -231,7 +231,7 @@ exports[`Connection component test should call ConnectionLogin 1`] = ` <span className="MuiButton-label text-16-bold" > - auth.enedis-sge-grandlyon.connect + auth.enedissgegrandlyon.connect </span> <WithStyles(memo) center={false} diff --git a/src/components/Connection/__snapshots__/ExpiredConsentModal.spec.tsx.snap b/src/components/Connection/__snapshots__/ExpiredConsentModal.spec.tsx.snap index 8f50f4fc1bd972b8e9d2e75cd1ee1a1cae0d159e..ab51092b8950c31e6dd58b66cbb7c0e96d7efbad 100644 --- a/src/components/Connection/__snapshots__/ExpiredConsentModal.spec.tsx.snap +++ b/src/components/Connection/__snapshots__/ExpiredConsentModal.spec.tsx.snap @@ -904,7 +904,7 @@ exports[`ExpiredConsentModal component should be rendered correctly 1`] = ` "root": "btn-secondary-positive", } } - onClick={[Function]} + onClick={[MockFunction]} > <ForwardRef(Button) aria-label="consent_outdated.later" @@ -941,7 +941,7 @@ exports[`ExpiredConsentModal component should be rendered correctly 1`] = ` "textSizeSmall": "MuiButton-textSizeSmall", } } - onClick={[Function]} + onClick={[MockFunction]} > <WithStyles(ForwardRef(ButtonBase)) aria-label="consent_outdated.later" @@ -950,7 +950,7 @@ exports[`ExpiredConsentModal component should be rendered correctly 1`] = ` disabled={false} focusRipple={true} focusVisibleClassName="Mui-focusVisible" - onClick={[Function]} + onClick={[MockFunction]} type="button" > <ForwardRef(ButtonBase) @@ -967,7 +967,7 @@ exports[`ExpiredConsentModal component should be rendered correctly 1`] = ` disabled={false} focusRipple={true} focusVisibleClassName="Mui-focusVisible" - onClick={[Function]} + onClick={[MockFunction]} type="button" > <button @@ -975,7 +975,7 @@ exports[`ExpiredConsentModal component should be rendered correctly 1`] = ` className="MuiButtonBase-root MuiButton-root btn-secondary-positive MuiButton-text" disabled={false} onBlur={[Function]} - onClick={[Function]} + onClick={[MockFunction]} onDragLeave={[Function]} onFocus={[Function]} onKeyDown={[Function]} diff --git a/src/components/Connection/connectionLogin.scss b/src/components/Connection/connectionLogin.scss index 7f7b8d508ba6cddaca6b97859483d1e4cd47cb8a..6cd0f09f422f3bf8df53e2fd3feca5480aa59dae 100644 --- a/src/components/Connection/connectionLogin.scss +++ b/src/components/Connection/connectionLogin.scss @@ -8,7 +8,7 @@ text-align: center; margin-bottom: 0; padding: 0 1rem; - &.enedis-sge-grandlyon { + &.enedissgegrandlyon { color: $elec-color; } &.grdfgrandlyon { diff --git a/src/components/Home/ConsumptionView.tsx b/src/components/Home/ConsumptionView.tsx index 5a00901cc570ca24507768b8a932cf1db19b11a4..dbdcdfdc8e8bc9ab4517a55051d83baca7a0752e 100644 --- a/src/components/Home/ConsumptionView.tsx +++ b/src/components/Home/ConsumptionView.tsx @@ -89,13 +89,8 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({ } }, [client, dispatch]) - const handleCloseExpirationModal = useCallback((fluidtype: FluidType) => { - if (fluidtype === FluidType.GAS) { - setopenExpiredConsentModal(false) - } - if (fluidtype === FluidType.ELECTRICITY) { - console.log('should delete enedis') - } + const handleCloseExpirationModal = useCallback(() => { + setopenExpiredConsentModal(false) }, []) useEffect(() => { @@ -116,38 +111,48 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({ let subscribed = true //Check if some fluids have expired consent error const expiredConsents: FluidType[] = [] - //Check for GRDF consent expiration - const gasError = - fluidStatus[FluidType.GAS].connection.triggerState?.last_error - if ( - gasError && - getKonnectorUpdateError(gasError) === 'error_update_oauth' - ) { - expiredConsents.push(fluidStatus[FluidType.GAS].fluidType) - } - //Check for Enedis SGE Consent Expiration - const today = DateTime.local() - .setZone('utc', { - keepLocalTime: true, - }) - .startOf('day') - .toISO() - - const sgeExpirationDate: string | undefined = - fluidStatus[FluidType.ELECTRICITY].connection.account?.data - ?.expirationDate - const isoExpirationDate: string = sgeExpirationDate - ? DateTime.fromISO(sgeExpirationDate) - .setZone('utc', { - keepLocalTime: true, - }) - .startOf('day') - .toISO() - : '' - if (isoExpirationDate <= today) { - expiredConsents.push(fluidStatus[FluidType.ELECTRICITY].fluidType) + + for (const fluid of fluidStatus) { + const error = fluid.connection.triggerState?.last_error + // if (fluid.fluidType === FluidType.ELECTRICITY) + // expiredConsents.push(fluid.fluidType) + if (error && getKonnectorUpdateError(error) === 'error_update_oauth') { + expiredConsents.push(fluid.fluidType) + } } + // //Check for GRDF consent expiration + // const gasError = + // fluidStatus[FluidType.GAS].connection.triggerState?.last_error + // if ( + // gasError && + // getKonnectorUpdateError(gasError) === 'error_update_oauth' + // ) { + // expiredConsents.push(fluidStatus[FluidType.GAS].fluidType) + // } + // //Check for Enedis SGE Consent Expiration + // const today = DateTime.local() + // .setZone('utc', { + // keepLocalTime: true, + // }) + // .startOf('day') + // .toISO() + + // const sgeExpirationDate: string | undefined = + // fluidStatus[FluidType.ELECTRICITY].connection.account?.data + // ?.expirationDate + // const isoExpirationDate: string = sgeExpirationDate + // ? DateTime.fromISO(sgeExpirationDate) + // .setZone('utc', { + // keepLocalTime: true, + // }) + // .startOf('day') + // .toISO() + // : '' + // if (isoExpirationDate <= today) { + // expiredConsents.push(fluidStatus[FluidType.ELECTRICITY].fluidType) + // } + if (subscribed) setconsentExpiredFluids(expiredConsents) return () => { subscribed = false diff --git a/src/components/PartnersIssue/__snapshots__/PartnersIssueModal.spec.tsx.snap b/src/components/PartnersIssue/__snapshots__/PartnersIssueModal.spec.tsx.snap index 34b0a12811a6dd85b4f9704552f139c334371c06..cfd29f71c3158adc5db8c8b7bfa81e4b31fc877a 100644 --- a/src/components/PartnersIssue/__snapshots__/PartnersIssueModal.spec.tsx.snap +++ b/src/components/PartnersIssue/__snapshots__/PartnersIssueModal.spec.tsx.snap @@ -26,7 +26,7 @@ exports[`PartnersIssueModal component should render correctly 1`] = ` "name": "", "oauth": false, "siteLink": "", - "slug": "enedis-sge-grandlyon", + "slug": "enedissgegrandlyon", }, "shouldLaunchKonnector": false, "trigger": null, diff --git a/src/constants/config.json b/src/constants/config.json index 581709801bba25a1ea6ed4c852a5c231c656e56f..de666adb9fbb5954cd558d2a562b9401db62a5ea 100644 --- a/src/constants/config.json +++ b/src/constants/config.json @@ -9,7 +9,7 @@ "konnectorConfig": { "name": "Enedis", "oauth": false, - "slug": "enedis-sge-grandlyon", + "slug": "enedissgegrandlyon", "siteLink": "https://mon-compte-client.enedis.fr/", "activation": "https://mon-compte-particulier.enedis.fr/donnees/" } diff --git a/src/enum/fluidSlug.enum.ts b/src/enum/fluidSlug.enum.ts index 46404243550a7dde4574bf97b3e9ad2ee944f553..6f9ec91414be1866c7d071a6e02e880c5d07c36f 100644 --- a/src/enum/fluidSlug.enum.ts +++ b/src/enum/fluidSlug.enum.ts @@ -1,5 +1,5 @@ export enum FluidSlugType { - ELECTRICITY = 'enedis-sge-grandlyon', + ELECTRICITY = 'enedissgegrandlyon', WATER = 'eglgrandlyon', GAS = 'grdfgrandlyon', } diff --git a/src/locales/fr.json b/src/locales/fr.json index d12000478ec823eb95a12a3ab1736ea1755ad54e..a9ce6c4b97e3937c8f042314f9cd62ca03ae9b91 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -136,7 +136,7 @@ "text5": "Cette puissance varie d'un mois à l'autre, regardez cette valeur sur l'ensemble de l'année pour vérifier si votre puissance souscrite correspond bien à votre usage." }, "auth": { - "enedis-sge-grandlyon": { + "enedissgegrandlyon": { "title": "Ecolyo doit se connecter à votre compte Enedis", "bill": "Munissez-vous d’une <span>facture d’électricité</span> pour valider la connexion", "connect": "Je me connecte à l'électricité", @@ -795,7 +795,7 @@ "2": "Veuillez re-donner votre accord pour que GRDF nous transmette vos données de consommation." }, "text2": { - "0": "Voulez-vous donner votre accord sur votre compte ENEDIS maintenant ?", + "0": "Souhaitez-vous renouveler votre accord dès maintenant pour un an ?", "2": "Voulez-vous donner votre accord sur votre compte GRDF maintenant ?" }, "later": "Plus tard", diff --git a/src/migrations/migration.data.ts b/src/migrations/migration.data.ts index 39a18c6d6fb75441c1114346c73f3ed22126fd55..6b13d1239be0fefaeda7da85deefc80499a05a70 100644 --- a/src/migrations/migration.data.ts +++ b/src/migrations/migration.data.ts @@ -537,7 +537,7 @@ export const migrations: Migration[] = [ appVersion: '1.11.0', description: 'Inform user of the new SGE konnector', releaseNotes: { - title: 'Vos connecteurs evoluent !', + title: 'Vos connecteurs évoluent !', description: "Pour continuer à accéder à vos données, merci de vous reconnecter via ce nouveau parcours. Aucune donnée ne sera perdue, et vos données seront à nouveau mises à jour quotidiennement. <p>Pourquoi ce changement ?</p> Pour faciliter l'accès aux données de consommation au plus grand nombre. Plus besoin de se créer un compte Enedis, l'accès aux données en est facilité. N'hésitez pas à en parler autour de vous ! :)", }, diff --git a/src/services/account.service.spec.ts b/src/services/account.service.spec.ts index 26eb9eee1f200e121b0641297fced61dc99cb879..c52dfac07ef6af8d05f3d14f6d6da1b07b62ade5 100644 --- a/src/services/account.service.spec.ts +++ b/src/services/account.service.spec.ts @@ -86,7 +86,7 @@ describe('Account service', () => { expect(result).toBe(null) }) it('should return the account linked to oldest trigger when several account', async () => { - const mockType = 'enedis-sge-grandlyon' + const mockType = 'enedissgegrandlyon' const mockAccounts = accountsData mockAccounts[1].account_type = mockType mockAccounts[2].account_type = mockType @@ -107,7 +107,7 @@ describe('Account service', () => { describe('getAccountsByType method', () => { it('should return all accounts for a type when several account', async () => { - const mockType = 'enedis-sge-grandlyon' + const mockType = 'enedissgegrandlyon' const mockAccounts = accountsData mockAccounts[1].account_type = mockType mockAccounts[2].account_type = mockType diff --git a/src/services/fluid.service.spec.ts b/src/services/fluid.service.spec.ts index e20c2f3fec6fe82f5afa41a1e64ab84f916a3f38..3386a9e185d6e3a7a0cfcccb9d015aa4e4f676bd 100644 --- a/src/services/fluid.service.spec.ts +++ b/src/services/fluid.service.spec.ts @@ -94,7 +94,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -180,7 +180,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -266,7 +266,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -352,7 +352,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -439,7 +439,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -534,7 +534,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -568,7 +568,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -602,7 +602,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -636,7 +636,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -674,7 +674,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, @@ -731,7 +731,7 @@ describe('FLuid service', () => { konnectorConfig: { name: 'Enedis', oauth: false, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, diff --git a/src/services/konnector.service.spec.ts b/src/services/konnector.service.spec.ts index 053c06e2de7a3aef9287170768d20050d16f08e9..2e72db7c9615093a8c421e29dca55f409462391e 100644 --- a/src/services/konnector.service.spec.ts +++ b/src/services/konnector.service.spec.ts @@ -30,7 +30,7 @@ describe('KonnectorService service', () => { skip: 0, } mockClient.query.mockResolvedValueOnce(mockQueryResult) - const result = await konnectorService.getKonnector('enedis-sge-grandlyon') + const result = await konnectorService.getKonnector('enedissgegrandlyon') expect(result).toEqual(konnectorsData[0]) }) @@ -42,7 +42,7 @@ describe('KonnectorService service', () => { skip: 0, } mockClient.query.mockResolvedValueOnce(mockQueryResult) - const result = await konnectorService.getKonnector('enedis-sge-grandlyon') + const result = await konnectorService.getKonnector('enedissgegrandlyon') expect(result).toBeNull() }) }) diff --git a/src/store/global/global.reducer.spec.ts b/src/store/global/global.reducer.spec.ts index 03b3919361f0927ecb5b6d82bcdd148bed325d98..1ee06db35273caa1f9f44398d6626b7e2b54a6dd 100644 --- a/src/store/global/global.reducer.spec.ts +++ b/src/store/global/global.reducer.spec.ts @@ -141,7 +141,7 @@ describe('global reducer', () => { konnectorConfig: { name: 'Enedis', oauth: true, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-particulier.enedis.fr/donnees/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, diff --git a/src/utils/picto.spec.ts b/src/utils/picto.spec.ts index 1e8838e7626615cdb4882cbf9f18dcfe06f45255..29258cd1f3fa72e1fa161772f2963c19bd50bac8 100644 --- a/src/utils/picto.spec.ts +++ b/src/utils/picto.spec.ts @@ -115,11 +115,11 @@ describe('picto utilis test', () => { describe('getPartnerPicto test', () => { it('should return enedis logo icon', () => { - const result = getPartnerPicto('enedis-sge-grandlyon', false) + const result = getPartnerPicto('enedissgegrandlyon', false) expect(result).toBe(iconEnedisLogo) }) it('should return white enedis logo icon', () => { - const result = getPartnerPicto('enedis-sge-grandlyon', true) + const result = getPartnerPicto('enedissgegrandlyon', true) expect(result).toBe(iconEnedisWhiteLogo) }) it('should return egl logo icon', () => { diff --git a/tests/__mocks__/accountsData.mock.ts b/tests/__mocks__/accountsData.mock.ts index 03593587b2fa2d909b2c01572e2da6fce3842b49..7b0a6ea948ef619c4360e29ea7525413433db07e 100644 --- a/tests/__mocks__/accountsData.mock.ts +++ b/tests/__mocks__/accountsData.mock.ts @@ -5,7 +5,7 @@ export const accountsData: Account[] = [ { _id: '88e68b8450cee09fe2f077610901094d', _rev: '1-88e68b8450cee09fe2f077610901094d', - account_type: 'enedis-sge-grandlyon', + account_type: 'enedissgegrandlyon', name: '', oauth: { access_token: 'MY_ACCESS_TOCKEN', diff --git a/tests/__mocks__/fluidStatusData.mock.ts b/tests/__mocks__/fluidStatusData.mock.ts index 895146aee0d1b7ad478897b85e33473634cc71f7..e9c340eba480380d237fdcc29665989eeab09d5b 100644 --- a/tests/__mocks__/fluidStatusData.mock.ts +++ b/tests/__mocks__/fluidStatusData.mock.ts @@ -199,7 +199,7 @@ export const SgeStatusWithAccout: FluidStatus = { account: { _id: '88e68b8450cee09fe2f077610901094d', _rev: '1-88e68b8450cee09fe2f077610901094d', - account_type: 'enedis-sge-grandlyon', + account_type: 'enedissgegrandlyon', name: '', oauth: { access_token: 'MY_ACCESS_TOCKEN', diff --git a/tests/__mocks__/konnectorsData.mock.ts b/tests/__mocks__/konnectorsData.mock.ts index f0671c57702ff4a945a9df22a596ca03731d688a..455fcb57b49f3f907162b69386df2ecd6d0e1515 100644 --- a/tests/__mocks__/konnectorsData.mock.ts +++ b/tests/__mocks__/konnectorsData.mock.ts @@ -2,9 +2,9 @@ import { Konnector } from 'models' export const konnectorsData: Konnector[] = [ { - _id: 'io.cozy.konnectors/enedis-sge-grandlyon', + _id: 'io.cozy.konnectors/enedissgegrandlyon', name: 'Enedis', - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', state: 'ready', }, { diff --git a/tests/__mocks__/mockConfig.mock.ts b/tests/__mocks__/mockConfig.mock.ts index 0a09c66984c13ef33654064323155375debf0f21..a972bca615479316b7db30ca771cab53f5ddd25f 100644 --- a/tests/__mocks__/mockConfig.mock.ts +++ b/tests/__mocks__/mockConfig.mock.ts @@ -10,7 +10,7 @@ const mockConfig = { konnectorConfig: { name: 'Enedis', oauth: true, - slug: 'enedis-sge-grandlyon', + slug: 'enedissgegrandlyon', siteLink: 'https://mon-compte-client.enedis.fr/', activation: 'https://mon-compte-particulier.enedis.fr/donnees/', }, diff --git a/tests/__mocks__/store.ts b/tests/__mocks__/store.ts index 277965cee139acae9fcba815fd762f2084b97923..74949eaa4a35fdd2f30fc66bb9d649fd5e7b469f 100644 --- a/tests/__mocks__/store.ts +++ b/tests/__mocks__/store.ts @@ -146,7 +146,7 @@ export const mockExpiredElec: FluidStatus = { last_execution: '', last_manual_execution: '', last_manual_job_id: '', - last_error: '', + last_error: 'USER_ACTION_NEEDED.OAUTH_OUTDATED', }, konnectorConfig: { name: '', diff --git a/tests/__mocks__/triggersData.mock.ts b/tests/__mocks__/triggersData.mock.ts index b24db384bb7381a226cfdf10a22a500a64228b46..5ca88daa41cbffb2be3f0048f47b99503051848f 100644 --- a/tests/__mocks__/triggersData.mock.ts +++ b/tests/__mocks__/triggersData.mock.ts @@ -12,7 +12,7 @@ export const triggersData: Trigger[] = [ options: null, message: { account: '88e68b8450cee09fe2f077610901094d', - konnector: 'enedis-sge-grandlyon', + konnector: 'enedissgegrandlyon', }, cozyMetadata: { doctypeVersion: '1', @@ -78,7 +78,7 @@ export const triggersEnedisData: Trigger[] = [ options: null, message: { account: '88e68b8450cee09fe2f077610901094d', - konnector: 'enedis-sge-grandlyon', + konnector: 'enedissgegrandlyon', }, cozyMetadata: { doctypeVersion: '1', @@ -99,7 +99,7 @@ export const triggersEnedisData: Trigger[] = [ options: null, message: { account: '90e68b8450cee09fe2f077610901094d', - konnector: 'enedis-sge-grandlyon', + konnector: 'enedissgegrandlyon', }, cozyMetadata: { doctypeVersion: '1', @@ -120,7 +120,7 @@ export const triggersEnedisData: Trigger[] = [ options: null, message: { account: '89e68b8450cee09fe2f077610901094d', - konnector: 'enedis-sge-grandlyon', + konnector: 'enedissgegrandlyon', }, cozyMetadata: { doctypeVersion: '1', diff --git a/yarn.lock b/yarn.lock index 6ed912bdbfe9a4840753f23ddd77e35b95be2533..8a0f03bef7707747e3b8a96514b96d28b8f6ff21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5668,6 +5668,13 @@ cozy-device-helper@^1.7.5: dependencies: lodash "^4.17.19" +cozy-device-helper@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/cozy-device-helper/-/cozy-device-helper-2.4.1.tgz#abe6ac3bb3ab8d0fc695b477593ba3c988d5342f" + integrity sha512-f/AJBlKHFGRucW2NSmnDkFmpTxE2Ia9vwiaRQA/RMmYqMjUaW54k6Y6Qmicz1M8an2Q2mTwOH02VxhldD3W+qA== + dependencies: + lodash "^4.17.19" + cozy-doctypes@^1.83.8: version "1.83.8" resolved "https://registry.yarnpkg.com/cozy-doctypes/-/cozy-doctypes-1.83.8.tgz#99ec864059034bd032f6f01e322b57fea130a5d3"